MCP directory
CR

Code Refactor

by github.com/zhouhengchang · v1.0.4 · updated Oct 18, 2026

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

Remotenpm

Connect to the hosted server

Add this URL as a custom connector in your AI client.

Server URL

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

Claude Code

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

Run it locally

Install the package and point your AI client at it.

Environment variables

  • REFACTOR_BACKEND

    Inference backend: 'ollama' (local, code stays on your machine, default) or 'openai' (any OpenAI-compatible cloud endpoint, e.g. DeepSeek).

  • OPENAI_BASE_URL

    Base URL of the OpenAI-compatible endpoint, e.g. https://api.deepseek.com/v1. Required when REFACTOR_BACKEND=openai.

  • OPENAI_API_KEYsecret

    API key for the cloud endpoint, e.g. a DeepSeek key. Only needed when REFACTOR_BACKEND=openai.

  • OPENAI_MODEL

    Cloud model name, e.g. deepseek-chat.

  • OLLAMA_HOST

    Ollama server address used when REFACTOR_BACKEND=ollama.

  • OLLAMA_MODEL

    Ollama model name used when REFACTOR_BACKEND=ollama.

  • REFACTOR_TIMEOUT_MS

    Per-call timeout in milliseconds. Raise it for slow local CPU inference.

More MCP servers