Set it up with your agent
One prompt, written for an MCP client that this documentation does not cover by name to read rather than you. It installs the server, registers it, reloads, and proves the tool works with a real verification.What every client needs to know
There is no HTTP or SSE endpoint, no API key, and no network call. The server reads your repository, runs your tests in a temporary shadow copy, and writes the verdict back over stdout.
The root key differs by client
This is where most setups fail. The block is otherwise identical.
The
mcpServers form, which most clients accept:
Without a global install
-p flag is required. refactron-mcp is a second binary of the refactron package, not a package of its own, so npx refactron-mcp looks up a package by that name and fails with a registry 404 unless a global install already put the binary on your PATH.
Clients without a page of their own
Zed
Zed calls MCP servers “context servers” and configures them in its mainsettings.json, at the top-level key context_servers. A block copied from Claude Desktop or Cursor does nothing here, with no error.
settings.json, so no editor restart is needed. Some builds also expect "source": "custom" on a hand-written entry. If the server does not appear after saving, add it through Agent Panel then Settings then Add Custom Server, which writes the shape your build expects.
Cline
Cline manages servers from its own panel inside VS Code, backed bycline_mcp_settings.json in the extension’s storage directory. Open it with the MCP Servers icon at the top of the Cline pane, then Configure MCP Servers.
timeout is in seconds here and it matters. Cline defaults to 60, and verify_change runs your whole test suite, so a real project blows past that and Cline reports a failure that is really a timeout. Cline stores this file separately from VS Code’s own .vscode/mcp.json: configuring one does not configure the other.
From a source checkout
Contributors running an unpublished build point the client at the compiled server with an absolute path:Confirm it works before blaming the client
Send oneinitialize request straight to the binary:
PATH that holds refactron-mcp.
Client requirements that trip people up
- A test-suite run is the unit of work. Clients with a default tool timeout under a minute will cut off a real verification. Raise the timeout where the client allows it, and check the unit: Cline and Codex CLI count seconds, Gemini CLI counts milliseconds.
- Absolute paths only.
repoRootmust be an absolute path. Clients that pass a relative working directory will not help you here. - Tools need an agent mode. Chat-only or ask-only modes in most editors do not call tools at all.