L'Agora
MCPKey required

Code Refactor

io.github.zhouhengchang/code-refactor

Refactor legacy code into modern, idiomatic code without changing its behavior.

Repository
github.com/zhouhengchang/code-refactor
Website
code-refactor-api.app.workbuddy.host/
Server address
https://code-refactor-api.app.workbuddy.host/mcp (streamable-http)
Version
1.0.4
Author
zhouhengchang (namespace verified by the registry)
Source
Official MCP registry (updated Oct 18, 2026)

How to install it

Variables to fill in: REFACTOR_BACKEND, OPENAI_BASE_URL, OPENAI_API_KEY, OPENAI_MODEL, OLLAMA_HOST, OLLAMA_MODEL, REFACTOR_TIMEOUT_MS.

Remote server (nothing to install)

Claude Code

In a terminal:

claude mcp add --transport http code-refactor https://code-refactor-api.app.workbuddy.host/mcp
Claude (app and claude.ai)

Open Settings, then Connectors, and add a custom connector with this address. If the server asks you to sign in, Claude will walk you through it.

https://code-refactor-api.app.workbuddy.host/mcp
ChatGPT

In Settings, Apps & Connectors section, turn on developer mode, then create a connector with this address.

https://code-refactor-api.app.workbuddy.host/mcp
Cursor ~/.cursor/mcp.json

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in the project):

{
  "mcpServers": {
    "code-refactor": {
      "url": "https://code-refactor-api.app.workbuddy.host/mcp"
    }
  }
}
VS Code .vscode/mcp.json

Add this to your project’s .vscode/mcp.json:

{
  "servers": {
    "code-refactor": {
      "type": "http",
      "url": "https://code-refactor-api.app.workbuddy.host/mcp"
    }
  }
}

On your machine

Claude Code

The server runs on your machine (npm package). In a terminal:

claude mcp add code-refactor -e REFACTOR_BACKEND=YOUR_REFACTOR_BACKEND -e OPENAI_BASE_URL=YOUR_OPENAI_BASE_URL -e OPENAI_API_KEY=YOUR_OPENAI_API_KEY -e OPENAI_MODEL=YOUR_OPENAI_MODEL -e OLLAMA_HOST=YOUR_OLLAMA_HOST -e OLLAMA_MODEL=YOUR_OLLAMA_MODEL -e REFACTOR_TIMEOUT_MS=YOUR_REFACTOR_TIMEOUT_MS -- npx -y [email protected]
Claude Desktop claude_desktop_config.json

Settings, Developer, Edit config, then add:

{
  "mcpServers": {
    "code-refactor": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "REFACTOR_BACKEND": "YOUR_REFACTOR_BACKEND",
        "OPENAI_BASE_URL": "YOUR_OPENAI_BASE_URL",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "OPENAI_MODEL": "YOUR_OPENAI_MODEL",
        "OLLAMA_HOST": "YOUR_OLLAMA_HOST",
        "OLLAMA_MODEL": "YOUR_OLLAMA_MODEL",
        "REFACTOR_TIMEOUT_MS": "YOUR_REFACTOR_TIMEOUT_MS"
      }
    }
  }
}
Cursor ~/.cursor/mcp.json

In ~/.cursor/mcp.json:

{
  "mcpServers": {
    "code-refactor": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "REFACTOR_BACKEND": "YOUR_REFACTOR_BACKEND",
        "OPENAI_BASE_URL": "YOUR_OPENAI_BASE_URL",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "OPENAI_MODEL": "YOUR_OPENAI_MODEL",
        "OLLAMA_HOST": "YOUR_OLLAMA_HOST",
        "OLLAMA_MODEL": "YOUR_OLLAMA_MODEL",
        "REFACTOR_TIMEOUT_MS": "YOUR_REFACTOR_TIMEOUT_MS"
      }
    }
  }
}
VS Code .vscode/mcp.json

In .vscode/mcp.json:

{
  "servers": {
    "code-refactor": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "REFACTOR_BACKEND": "YOUR_REFACTOR_BACKEND",
        "OPENAI_BASE_URL": "YOUR_OPENAI_BASE_URL",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "OPENAI_MODEL": "YOUR_OPENAI_MODEL",
        "OLLAMA_HOST": "YOUR_OLLAMA_HOST",
        "OLLAMA_MODEL": "YOUR_OLLAMA_MODEL",
        "REFACTOR_TIMEOUT_MS": "YOUR_REFACTOR_TIMEOUT_MS"
      }
    }
  }
}
ChatGPT

ChatGPT only connects to remote servers (an https address). This package runs locally: use one of the apps above.

These configurations are built from the information published by the author. Check the repository before installing a local server.

Our test

Key required Key required. The server responds but expects an access key: we do not bypass this step.

Date
Nov 28, 2026, 10:00 (test run by L’Atlas)
Response time
4,885 ms (whole test)
Next test
Dec 5, 2026

What the test does: it opens an MCP session (initialize) and asks for the tool list (tools/list), with no key or account. No tool is ever called. Learn more

Reviews

No review yet.

Sign in to leave a review. Your email is all you need.

Comments

No comment yet. A question, a tip? Start the discussion.

Sign in to comment.

Is this your project? Sign in to claim this entry.

Badge for your README

io.github.zhouhengchang/code-refactor on L’Agora

Show that your project is listed (and tested, if it responds): paste this code in your README. The badge follows the latest test and links back to this entry.

Markdown (GitHub)

[![io.github.zhouhengchang/code-refactor on L’Agora](https://lagora.dev/badge/io.github.zhouhengchang/code-refactor.svg?lang=en)](https://lagora.dev/en/entry/io.github.zhouhengchang/code-refactor)

HTML

<a href="https://lagora.dev/en/entry/io.github.zhouhengchang/code-refactor"><img src="https://lagora.dev/badge/io.github.zhouhengchang/code-refactor.svg?lang=en" alt="io.github.zhouhengchang/code-refactor on L’Agora" height="20"></a>

Promote

For the entry’s author only: sign in to continue.

Report this entry