Search / io.github.zhouhengchang/code-refactor
Code Refactor
R0· no sign-inRefactor legacy code into modern, idiomatic code without changing its behavior.
v1.0.4 · active · repository · website · descriptor JSON · versions
Search / io.github.zhouhengchang/code-refactor
R0· no sign-inRefactor legacy code into modern, idiomatic code without changing its behavior.
v1.0.4 · active · repository · website · descriptor JSON · versions
{
"mcpServers": {
"code-refactor": {
"type": "http",
"url": "https://code-refactor-api.app.workbuddy.host/mcp"
}
}
}claude mcp add --transport http code-refactor https://code-refactor-api.app.workbuddy.host/mcp[mcp_servers.code-refactor]
url = "https://code-refactor-api.app.workbuddy.host/mcp"
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"code-refactor": {
"type": "remote",
"url": "https://code-refactor-api.app.workbuddy.host/mcp",
"enabled": true
}
}
}{
"mcpServers": {
"code-refactor": {
"type": "http",
"url": "https://code-refactor-api.app.workbuddy.host/mcp"
}
},
"deeplink": "cursor://anysphere.cursor-deeplink/mcp/install?name=code-refactor&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29kZS1yZWZhY3Rvci1hcGkuYXBwLndvcmtidWRkeS5ob3N0L21jcCJ9"
}{
"servers": {
"code-refactor": {
"type": "http",
"url": "https://code-refactor-api.app.workbuddy.host/mcp"
}
}
}{
"mcpServers": {
"code-refactor": {
"httpUrl": "https://code-refactor-api.app.workbuddy.host/mcp"
}
}
}extensions:
"code-refactor":
enabled: true
name: "code-refactor"
type: streamable_http
uri: "https://code-refactor-api.app.workbuddy.host/mcp"
timeout: 300
protocol.modernnewest supported version is 2025-06-18; 2026-07-28 not supported, older versions are deprecated until 2027-07-28protocol.statelessonly applies to 2026-07-28 serversprotocol.transportstreamable HTTPprotocol.list_ttlonly applies to 2026-07-28 serversauth.prm, auth.as_metadata, auth.cimdno remote uses OAuthauth.secret_in_urlno templated URLtools.descriptionsevery tool has a descriptiontools.description_lengthdescriptions are concisetools.schemasevery tool has an object input schematools.annotationsno tool declares readOnlyHint or destructiveHint, so clients cannot tell safe calls from risky onestools.directory_hintsno tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: refactor_code (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); check_status (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)tools.token_costabout 140 tokens to load every tooltools.api_dumptools are not a one-to-one API dumpstability.changes, stability.rug_pulltool history recorded for 2 of the 7 days neededNo tool definition changes recorded. A server's first observation is its baseline; later probes record what changes.
Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed. How it is computed.
+repository +namespace-matches-repo +website +reachable +uptime-100% +updated-2d-ago
Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed. How it is computed.
[email protected] npmthis version is not known to the dependency resolver
Dependency graphs from deps.dev; advisories from OSV.dev, including the GitHub Advisory Database and the PyPI Advisory Database; all CC BY 4.0. The graph is what a clean install of this version resolves today; nothing was installed or run. How it is checked.
| remote | auth | reachable | uptime 30d | p50 | protocol | last ok |
|---|---|---|---|---|---|---|
https://code-refactor-api.app.workbuddy.host/mcp streamable-http | none | yes | 100% | 5119 ms | 2025-06-18 | 2026-10-20 |
| package | registry | version | runtime | secrets |
|---|---|---|---|---|
workbuddy-code-refactor-connector | npm | 1.0.4 | – | OPENAI_API_KEY |
check_status | 检查重构服务与云端模型(DeepSeek)是否可用,返回后端类型、模型名与密钥校验状态。建议在调用 refactor_code 前先调用本工具。 |
refactor_code | 把遗留代码重构为现代规范代码,行为保持不变。会做语义化重命名、补全类型标注、生成中文注释、优化结构。适用于 Python / JavaScript / TypeScript / Java / Go / Rust / C / C++。 |
Schemas: list_tools.
{
"name": "io.github.zhouhengchang/code-refactor",
"title": "Code Refactor",
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"remotes": [
{
"url": "https://code-refactor-api.app.workbuddy.host/mcp",
"type": "streamable-http"
}
],
"version": "1.0.4",
"packages": [
{
"version": "1.0.4",
"transport": {
"type": "stdio"
},
"identifier": "workbuddy-code-refactor-connector",
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"environmentVariables": [
{
"name": "REFACTOR_BACKEND",
"default": "ollama",
"description": "Inference backend: 'ollama' (local, code stays on your machine, default) or 'openai' (any OpenAI-compatible cloud endpoint, e.g. DeepSeek)."
},
{
"name": "OPENAI_BASE_URL",
"description": "Base URL of the OpenAI-compatible endpoint, e.g. https://api.deepseek.com/v1. Required when REFACTOR_BACKEND=openai."
},
{
"name": "OPENAI_API_KEY",
"isSecret": true,
"description": "API key for the cloud endpoint, e.g. a DeepSeek key. Only needed when REFACTOR_BACKEND=openai."
},
{
"name": "OPENAI_MODEL",
"default": "deepseek-chat",
"description": "Cloud model name, e.g. deepseek-chat."
},
{
"name": "OLLAMA_HOST",
"default": "http://127.0.0.1:11434",
"description": "Ollama server address used when REFACTOR_BACKEND=ollama."
},
{
"name": "OLLAMA_MODEL",
"default": "qwen2.5-coder",
"description": "Ollama model name used when REFACTOR_BACKEND=ollama."
},
{
"name": "REFACTOR_TIMEOUT_MS",
"default": "180000",
"description": "Per-call timeout in milliseconds. Raise it for slow local CPU inference."
}
]
}
],
"repository": {
"url": "https://github.com/zhouhengchang/code-refactor",
"source": "github",
"subfolder": "workbuddy-connector/server"
},
"websiteUrl": "https://code-refactor-api.app.workbuddy.host",
"description": "Refactor legacy code into modern, idiomatic code without changing its behavior."
}