# Code Refactor (remote · code-refactor-api.app.workbuddy.host)

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

- Trust score: 72/100 (medium)
- Change this week: +10
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- remote · `code-refactor-api.app.workbuddy.host`: 72/100 (this document), [markdown](https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api.md), [page](https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api)
- npm · `workbuddy-code-refactor-connector`: 79/100, [markdown](https://verifymcp.io/servers/zhouhengchang-code-refactor/workbuddy-code-refactor-connector.md), [page](https://verifymcp.io/servers/zhouhengchang-code-refactor/workbuddy-code-refactor-connector)

## Channel facts

- Endpoint: `https://code-refactor-api.app.workbuddy.host/mcp`
- Transports: `streamable-http`
- Auth: `required (not validated)`
- Version: `1.0.4`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically against the live server, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Endpoint Security**: 83/100
  - The endpoint's TLS certificate is valid, in date, and uses a strong key.
  - Authorisation is enforced on tool calls, but the challenge carries no valid RFC 9728 metadata, so a client cannot discover where to get a token.
  - HTTPS is enforced; there's no plaintext access path.
  - HSTS check failed: the Strict-Transport-Security header is absent.
  - DNSSEC check failed: this domain isn't protected by DNSSEC.
- **Transport & Reachability**: 100/100
  - Verified streamable-http transport via a live MCP handshake.
- **Schema Quality & AI Usability**: 69/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 2378 tokens (~132/item across 18 items; 18 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability check failed: schema churn in the 17 days we've observed: 2 tool removals, 0 breaking changes, 0 auth/transport breaks, 18 additions.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 18 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 19 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 60/100
  - Spec-recency check failed: implements MCP spec 2025-06-18; the latest is 2026-07-28.

## Install

### How do I install the Code Refactor MCP server?

Code Refactor is a hosted endpoint at https://code-refactor-api.app.workbuddy.host/mcp, so there is nothing to install locally. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add --transport http zhouhengchang-code-refactor 'https://code-refactor-api.app.workbuddy.host/mcp'
```

### Cursor

```json
{
  "mcpServers": {
    "zhouhengchang-code-refactor": {
      "url": "https://code-refactor-api.app.workbuddy.host/mcp"
    }
  }
}
```

### VS Code

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

### Codex

```toml
[mcp_servers.zhouhengchang-code-refactor]
url = "https://code-refactor-api.app.workbuddy.host/mcp"
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "zhouhengchang-code-refactor": {
      "type": "remote",
      "url": "https://code-refactor-api.app.workbuddy.host/mcp",
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add zhouhengchang-code-refactor --url 'https://code-refactor-api.app.workbuddy.host/mcp' --transport streamable-http
```

### Hermes

```yaml
mcp_servers:
  zhouhengchang-code-refactor:
    url: "https://code-refactor-api.app.workbuddy.host/mcp"
```

### Netclaw

```json
{
  "McpServers": {
    "zhouhengchang-code-refactor": {
      "Transport": "http",
      "Url": "https://code-refactor-api.app.workbuddy.host/mcp"
    }
  }
}
```

### Vellum

```bash
assistant mcp add zhouhengchang-code-refactor -t streamable-http -u 'https://code-refactor-api.app.workbuddy.host/mcp'
```

### Other

```json
{
  "mcpServers": {
    "zhouhengchang-code-refactor": {
      "type": "http",
      "url": "https://code-refactor-api.app.workbuddy.host/mcp"
    }
  }
}
```

The mcpServers block is a cross-client convention. Remote transports vary, so check your client's docs.

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-05 (score 72, 0)

- [security regression] Stability: unverified → fail
- [security regression] Authorization: unverified → fail
- [security improvement] Injection markers: unverified → pass
- [security improvement] Transport: fail → pass
- [functional regression] MCP protocol: unverified → fail
- [functional improvement] Endpoint reachability: unreachable → reachable
- [functional improvement] Tool coverage: unverified → 100

### 2026-11-04 (score 72, 0)

- [security regression] Endpoint reachability: reachable → unreachable
- [security regression] Stability: fail → unverified
- [security regression] Tool safety: pass → unverified
- [security regression] Authorization: fail → unverified
- [security regression] Transport: pass → fail
- [functional regression] Capabilities: fail → unverified
- [functional regression] Tool coverage: 100 → unverified

### 2026-10-30 (score 72, +10)

- [security regression] Authorization: unverified → fail

### 2026-10-29 (score 62, −10)

- [security regression] Authorization: fail → unverified

### 2026-10-25 (score 72, +10)

- [security improvement] Transport: fail → pass
- [functional regression] Schema quality: 1648 → 2378
- [functional] New tool “codetrans”
- [functional] New tool “regexgen”
- [functional] New tool “errfix”
- [functional] New tool “codeexplain”
- [functional] New tool “commitmsg”

### 2026-10-24 (score 62, −10)

- [security regression] Transport: pass → fail

### 2026-10-23 (score 72, +49)

- [security regression] Stability: unverified → fail
- [security regression] Authorization: unverified → fail
- [security regression] A breaking change shipped without a version bump: still 1.0.0
- [security regression] Tool “check_status” was removed
- [security regression] Tool “refactor_code” was removed
- [security improvement] Injection markers: unverified → pass
- [security improvement] Transport: fail → pass
- [security] The server rewrote its instructions, which are the text every model session reads
- [security] The server changed its declared name: code-refactor → skillgateway
- [functional regression] MCP protocol: unverified → fail
- [functional regression] Schema quality: pass → fail
- [functional improvement] Endpoint reachability: not serving MCP → reachable
- [functional improvement] Tool coverage: unverified → 100
- [functional] New tool “codegen”
- [functional] New tool “contract”
- [functional] New tool “copywriter”
- [functional] New tool “docgen”
- [functional] New tool “get_order”
- [functional] New tool “list_orders”
- [functional] New tool “resume”
- [functional] New tool “review”
- [functional] New tool “script”
- [functional] New tool “skill_info”
- [functional] New tool “sqlgen”
- [functional] New tool “testgen”
- [functional] New tool “translate”

### 2026-10-22 (score 23, −41)

- [security regression] Endpoint reachability: reachable → not serving MCP
- [security regression] Tool safety: pass → unverified
- [security regression] Stability: 0.07 → unverified
- [security regression] Transport: pass → fail
- [security] Authorization: Authorisation not yet verified: we couldn't confirm whether this endpoint requires it.
- [functional regression] Capabilities: fail → unverified
- [functional regression] Tool coverage: 100 → unverified

## MCP tools (18)

### `codegen` (~128 tokens)

AI 代码生成（按次计费）

根据需求描述生成可运行的示例代码。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `language` (string): 目标编程语言。
- `prompt` (string, required): 代码需求描述，最多 4000 字。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `style` (string): 可选风格要求，如「函数式」「兼容 Python 3.8」。

### `review` (~126 tokens)

AI 代码审查（按次计费）

审查代码并给出分级的修改建议。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `code` (string, required): 待审查的代码原文，最多 20000 字符。
- `focus` (string): 审查重点，默认全部。
- `language` (string): 代码语言，不填则自动判断。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。

### `copywriter` (~133 tokens)

爆款文案生成（按次计费）

小红书/抖音/公众号等多平台文案，一次给 3 个版本。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `brief` (string, required): 产品/内容描述，写清卖点、人群、场景，最多 2000 字。
- `platform` (string): 目标平台。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `tone` (string): 文案调性。

### `translate` (~140 tokens)

翻译与母语级润色（按次计费）

10 种语言，直译+润色+术语表三档输出。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `style` (string): literal 忠实直译 / polished 母语润色 / seo 关键词布局 / academic 学术正式。
- `target` (string, required): 目标语言。
- `text` (string, required): 待翻译内容，最多 8000 字符。

### `sqlgen` (~139 tokens)

SQL 生成与优化（按次计费）

按表结构生成/优化 SQL，自动拦截破坏性语句。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `dialect` (string): 数据库类型。
- `question` (string, required): 查询需求，例如「统计最近 7 天每日新增用户数」。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `schema` (string): 相关表结构（CREATE TABLE 或字段说明），给得越准 SQL 越准。

### `testgen` (~194 tokens)

单元测试生成（按次计费）

为核心代码生成可运行的单元测试（自动 mock 外部依赖）。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `code` (string, required): 被测代码，最多 20000 字符。
- `framework` (string): 测试框架，按语言可选：python=[pytest|unittest]，javascript=[jest|vitest|mocha]，typescript=[jest|vitest]，java=[junit5|testng]，go=[gotest]，rust=[cargo-test]，csharp=[xunit|nunit]，php=[phpunit]
- `language` (string): 代码语言，不填则自动判断。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。

### `docgen` (~164 tokens)

技术文档生成（按次计费）

README / API 文档 / 变更日志 / 技术方案一键生成。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `audience` (string): developer=开发者 / pm=产品 / ops=运维 / enduser=最终用户。
- `docType` (string): readme=项目说明 / api=接口文档 / changelog=变更日志 / design=技术方案 / onboarding=上手指南。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `source` (string, required): 代码或接口说明素材，最多 20000 字符。

### `resume` (~150 tokens)

简历优化与岗位匹配（按次计费）

按 JD 诊断匹配度并用 STAR 结构重写（绝不虚构经历）。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `goal` (string): optimize=整体优化 / match=匹配度诊断 / rewrite=按 JD 重写。
- `jd` (string): 目标岗位 JD（goal 为 match/rewrite 时必填）。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `resume` (string, required): 原始简历全文，最多 12000 字符。

### `contract` (~122 tokens)

合同条款风险审查（按次计费）

标出高/中风险条款与缺失条款，并给出可替换表述。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `party` (string): 审查立场：站在哪一方看这份合同。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `text` (string, required): 合同文本，最多 20000 字符。

### `script` (~134 tokens)

短视频脚本与分镜（按次计费）

开头钩子 3 版 + 分镜表 + 口播文案，可直接拍摄。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `duration` (string): 目标时长。
- `platform` (string): 发布平台，决定节奏与时长习惯。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `topic` (string, required): 视频主题或产品卖点，最多 1500 字。

### `regexgen` (~150 tokens)

正则表达式生成（按次计费）

自然语言 → 精确正则 + 逐段解释 + 匹配示例，防灾难性回溯。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `flavor` (string): 正则方言。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `requirement` (string, required): 匹配需求，用自然语言描述，如「匹配中国大陆手机号」。
- `sample` (string): 可选：待匹配的示例文本，给得越准结果越准。

### `commitmsg` (~148 tokens)

Git 提交信息生成（按次计费）

粘贴 diff → Conventional Commits 中英双语提交信息 + 风险提示。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `context` (string): 可选：变更背景（需求单/bug 单号等）。
- `diff` (string, required): git diff 或变更描述，最多 12000 字符。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `style` (string): conventional=规范提交 / plain=简洁一句话 / detailed=详细变更说明。

### `codeexplain` (~147 tokens)

代码逐行讲解（按次计费）

按读者水平（零基础→资深）拆解代码逻辑、关键点与坑。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `code` (string, required): 要讲解的代码，最多 20000 字符。
- `language` (string): 代码语言，不填自动判断。
- `level` (string): 读者水平：beginner=零基础 / intermediate=中等 / expert=资深。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。

### `codetrans` (~131 tokens)

代码语言迁移（按次计费）

A 语言 → B 语言等价实现 + 依赖替换与行为差异清单。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `code` (string, required): 要迁移的源代码，最多 20000 字符。
- `from` (string): 源语言，不填自动判断。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。
- `to` (string, required): 目标语言。

### `errfix` (~154 tokens)

报错诊断与修复（按次计费）

报错栈 + 代码 → 根因定位 + 最小修复补丁 + 验证步骤。按次计费：业务成功才确认扣款，内容违规、模型超时或生成失败会自动全额退款。

Input parameters:

- `code` (string): 可选：相关代码，给了能定位更准。
- `context` (string): 可选：运行环境（Node 版本 / OS / 框架版本等）。
- `error` (string, required): 报错信息 / 堆栈，最多 6000 字符。
- `requestId` (string): 幂等键。同一次业务重试时复用同一个值，可避免重复扣费。

### `get_order` (~47 tokens)

查询订单

按订单号查询一笔调用的状态、金额、耗时与失败原因。不收费。

Input parameters:

- `orderNo` (string, required): 订单号，形如 SG20261018…

### `list_orders` (~92 tokens)

订单列表

列出最近的调用订单，可按状态或平台过滤，用于对账。不收费。

Input parameters:

- `limit` (integer): 返回条数，默认 20，最大 100
- `platform` (string): 按来源平台过滤，如 coze、dify、gpts
- `status` (string): 按状态过滤：created / preauthorized / succeeded / failed / refunding / refunded

### `skill_info` (~29 tokens)

技能与定价信息

返回当前技能是否上架、单次价格、支持的编程语言与免责声明。不收费。

## Diagnostics

Captured diagnostic sections: TLS, DNSSEC, Authorisation, Transports. The full working is on the page: https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api#diagnostics

## Score history

- 2026-11-05: 72
- 2026-11-04: 72
- 2026-11-03: 72
- 2026-11-02: 72
- 2026-11-01: 72
- 2026-10-31: 72
- 2026-10-30: 72
- 2026-10-29: 62
- 2026-10-28: 72
- 2026-10-27: 72
- 2026-10-26: 72
- 2026-10-25: 72
- 2026-10-24: 62
- 2026-10-23: 72
- 2026-10-22: 23
- 2026-10-21: 64
- 2026-10-20: 63
- 2026-10-19: 63
- 2026-10-18: 35

## Common questions

### What is the Code Refactor MCP server?

Code Refactor is an MCP server listed in the public MCP registry as io.github.zhouhengchang/code-refactor. Refactor legacy code into modern, idiomatic code without changing its behavior. This page covers its hosted endpoint (https://code-refactor-api.app.workbuddy.host/mcp).

### Is the Code Refactor MCP server safe to use?

Code Refactor scores 72 out of 100 on VerifyMCP. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the Code Refactor MCP server expose?

Code Refactor exposes 18 tools: codegen, review, copywriter, translate, sqlgen, and 13 more. Their descriptions and schemas cost roughly 2,328 tokens of context every time the server is loaded.

### Does the Code Refactor MCP server require authentication?

Yes. Code Refactor asked us for credentials when we connected, so you will need to authorise it in your MCP client before it can do anything.

### Is the Code Refactor MCP server still maintained?

Code Refactor is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

## Links

- Remote endpoint: https://code-refactor-api.app.workbuddy.host/mcp
- Repository: https://github.com/zhouhengchang/code-refactor
- Website: https://code-refactor-api.app.workbuddy.host/
- Changelog RSS feed: https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api.xml
- Changelog JSON feed: https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api.json
- HTML version of this page: https://verifymcp.io/servers/zhouhengchang-code-refactor/code-refactor-api
