Koskamo

Code Refactor MCP

A community MCP server that refactors legacy code into modern, idiomatic code without changing its behavior. It supports naming normalization, duplicate logic extraction, control flow simplification, type annotation supplementation, documentation generation, and syntax modernization for languages like Python, JavaScript, TypeScript, Java, Go, Rust, C, and C++. It runs locally via Ollama or OpenAI-compatible APIs.

Package and access

Local package with source-attributed installation metadata. Koskamo does not execute packages during review.

Code Refactor MCP logo, by zhouhengchangCommunity listingLocal stdioSource reviewed; not executedPublished by zhouhengchang
Vendor documentation

What you can do with it

  • Refactor legacy code into modern, idiomatic code without changing its behavior
  • Normalize variable and function names to express intent
  • Extract duplicate logic into independent functions or methods
  • Simplify control flow by replacing nested conditions with early returns

Source and maintenance

Community listingRegistry 1.0.4
Maintenance checked

Packages and installation

Source-provided package data. Koskamo has not executed or live-probed this package.

workbuddy-code-refactor-connector 1.0.4

npm
workbuddy-code-refactor-connector package definition
{
  "version": "1.0.4",
  "transport": "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",
      "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."
    }
  ]
}

Tools

Reported by the attributed source; not independently observed by Koskamo.

No tool definitions available.

Connect from your client

Each snippet configures the same source-provided package; replace placeholders before use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Cursor

Merge this local stdio configuration, replace every placeholder environment value, and restart Cursor. Koskamo has not executed this package.
Cursor configuration
{
  "mcpServers": {
    "code-refactor-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "workbuddy-code-refactor-connector@1.0.4"
      ],
      "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>"
      }
    }
  }
}

Cline

Merge this local stdio configuration, replace every placeholder environment value, and restart Cline. Koskamo has not executed this package.
Cline configuration
{
  "mcpServers": {
    "code-refactor-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "workbuddy-code-refactor-connector@1.0.4"
      ],
      "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

Merge this local stdio configuration, replace every placeholder environment value, and restart VS Code. Koskamo has not executed this package.
VS Code configuration
{
  "servers": {
    "code-refactor-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "workbuddy-code-refactor-connector@1.0.4"
      ],
      "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>"
      }
    }
  }
}

Claude Desktop

Merge this local stdio configuration, replace every placeholder environment value, and restart Claude Desktop. Koskamo has not executed this package.
Claude Desktop configuration
{
  "mcpServers": {
    "code-refactor-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "workbuddy-code-refactor-connector@1.0.4"
      ],
      "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>"
      }
    }
  }
}

Let your agent find its tools

Find servers like Code Refactor MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.