Mechanical code decomposition. AI plans module boundaries, deterministic extraction copies the code. JS/Python built in.
Mechanical code decomposition. AI plans module boundaries, deterministic extraction copies the code. JS/Python built in. Exposed over MCP by the refactory mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Refactory splits monolith source files into clean modules. It uses an LLM for one thing — deciding which functions group together. Everything else is mechanical: function boundary detection, import resolution, module assembly, syntax validation, scoring.
Everything the assistant can do here goes through one of these:
clean_rate — modules that load without errors / total modulessize_reduction — 1 − (largest module / original file)Metric — ValueLanguage — ExtractionProvider — OutputInstallation goes through your MCP client rather than a global install: point it at node on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
You will need 4 environment variables: GROQ_API_KEY, GOOGLE_API_KEY, OPENROUTER_API_KEY, SAMBANOVA_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Refactory's toolset — clean_rate, size_reduction, Metric and 2 more — is a fair guide to whether it matches your workflow. It is maintained by codedrop-codes; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Refactory's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| clean_rate | modules that load without errors / total modules |
| size_reduction | 1 − (largest module / original file) |
| Metric | Value |
| Language | Extraction |
| Provider | Output |
{
"mcpServers": {
"refactory": {
"command": "npx",
"args": ["@refactory/mcp"],
"env": {
"GROQ_API_KEY": "your-key-here"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| GROQ_API_KEY | Credential the server authenticates with. | Yes |
| GOOGLE_API_KEY | Credential the server authenticates with. | Yes |
| OPENROUTER_API_KEY | Credential the server authenticates with. | Yes |
| SAMBANOVA_API_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.