README
¶
codeveloce-mcp
Compiler-grade code intelligence for coding agents, warm in milliseconds.
codeveloce-mcp is a single Go binary that gives Claude Code, Codex and any MCP client the answers a compiler knows and grep does not: which declaration a call really runs, every true caller, every implementer, every use including aliased imports and tests, type errors after an edit, and renames and imports written by the language server. It drives your real local language servers (gopls, tsserver, Pyright, HTML/CSS), keeps no index, and sends nothing off the machine.
who calls it → get_incoming_calls what does this call run → follow_definition / get_definition
every use, tests too → find_references what is this type → describe_symbol
every implementer → find_implementations did my edit break types → check_errors
rename safely → rename_symbol add the missing imports → resolve_imports
Why it is different
- One warm set of language servers for every session. Agents start a fresh MCP process per session, subagent and worktree, and each one normally waits for gopls or tsserver to load the project again. With
--shared(registered bysetup) the first session starts a per-workspace daemon and every later session attaches to it. On Hono, a new session's firstfind_referencesdropped from 13.0 s to 0.20 s. The daemon exits after 15 idle minutes. - The same tools from the shell.
codeveloce-mcp call get_incoming_calls path=src/url.ts symbol_path=getPathanswers from the same warm daemon in tens of milliseconds, so scripts, git hooks, CI and agents without MCP support get the same answers. - Tools shaped by agent A/B runs, not by the LSP spec. Each tool answers one question in one call with a complete, sorted, deduplicated list and says explicitly when a list is partial (
Incomplete: …) or empty (No callers found…). That wording was tuned against Codex sessions so the agent stops re-checking withrg. - Edits come from the language server, never from guessed text replacement. Renames, quick fixes and imports are the server's
WorkspaceEdit, validated (workspace confinement, no symlinks, no overlapping ranges, staleness check) before anything is written. - Zero configuration. Go, Python, TypeScript/JavaScript, HTML and CSS projects, monorepos included, are detected automatically.
--auto-install-lspinstalls pinned language servers into a private cache once.
Quick start
go install github.com/tamutamu/codeveloce-mcp/cmd/codeveloce-mcp@latest # or download a release binary
codeveloce-mcp setup claude --apply --auto-install-lsp # or: setup codex
setup registers the server through the client's own CLI (with --result-format readable --shared) and adds a short usage block to ~/.claude/CLAUDE.md or ~/.codex/AGENTS.md. Restart the agent session. codeveloce-mcp doctor --workspace . shows which language servers were detected. Plugin installs for both agents are described below.
Try it without an agent:
cd your-project
codeveloce-mcp call # list the tools and their parameters
codeveloce-mcp call find_references path=src/app.ts symbol_path=createApp
codeveloce-mcp call check_errors # type errors in changed files and the files that import them
Measured with Claude Code on Hono
Claude Code (claude-sonnet-5-5) ran thirteen ordinary Japanese requests on Hono 75ff8e3, with and without the MCP, alternating arms, 3 laps each, a fresh clone per session. Prompts name no tool and no answer; list answers are graded against the TypeScript compiler and edits by tests. User settings, hooks and plugins were excluded in both arms. The MCP arm attached to a warm shared daemon, as a session in a repository you already work in does. Medians:
| Task | Time | Cost |
|---|---|---|
| List callers | 20.6s → 8.4s (−59%) | −64% |
| List every implementer of an interface | 12.3s → 6.7s (−46%) | −31% |
| Find the declaration a call runs (same-named helpers exist) | 12.9s → 8.4s (−35%) | −14% |
| File outline | 9.0s → 7.6s (−16%) | ±0 |
| Change a return contract and its aliased callers | 27.4s → 23.7s (−14%) | ±0 |
| Rename a function that has a same-named decoy | 14.0s → 13.3s (−5%) | −3% |
| All 13 tasks, 39 sessions per arm | 823s → 589s (−28%) | −18% |
On Hugo (Go, gopls, 11 tasks × 2 laps) the same harness measured 2046s → 1328s (−35%) and −45% cost; listing interface implementers went 73s → 14s and listing callers 92s → 24s.
Correct on the first attempt on Hono: 34/39 without the MCP, 38/39 with it (Hugo: 19/22 → 22/22); one baseline run never found the declaration a call runs. Tasks where the agent did not call the MCP (symptom-only bug fixes, a name search) moved within run-to-run noise, and a few cost slightly more; every row is in the report, with the bugs these runs exposed and fixed. Earlier Codex, Hugo and FastAPI measurements are in the benchmark history.
MCP tools
Positions are one-based and paths workspace-relative (absolute paths inside the workspace are normalized). symbol_path is a name inside the file given by path (Go methods as Type.Method). Tools take no language argument; it is inferred from path.
| Tool | Required | Optional | Returns |
|---|---|---|---|
search_symbols |
query |
include_source, limit |
Declarations with that exact name across every project language, monorepo subprojects included. The body only when exactly one matches. |
get_definition |
path, name |
line, column |
The declaration a call runs; a missing or wrong line falls back to the declaration of name in that file. |
follow_definition |
path, name |
line |
Follows a call through getters, wrappers, aliases and re-exports, one line per hop, then the body of the real implementation. |
find_references |
path, symbol_path |
— | One sorted path:line: preview list, tests and aliased imports included, same-named symbols omitted. |
get_incoming_calls |
path, symbol_path |
— | Functions and methods that call the declaration, with the call site line. |
find_implementations |
path, symbol_path |
— | Classes implementing an interface, including aliases and extended interfaces (Go: embedding). |
describe_symbol |
path, name |
line |
Signature, type and docs (library types too) plus the members of its type with their lines. |
file_outline |
path |
— | The declarations of one file as a tree with line ranges. |
check_errors |
— | paths |
Errors and warnings for paths, or for the files git reports as changed plus every file that imports them (tests included), computed for their current content. An interface change reports its broken implementers, not just the edited file. |
rename_symbol |
symbol_path, new_name |
path, apply |
Renames one declaration everywhere, tests included; same-named declarations stay. apply=false previews. |
refactor |
path |
line, name, end_line, action |
Lists the server's code actions for a line, range or file; with action, applies one. |
resolve_imports |
path, names |
apply |
Finds the project module exporting each name and writes the import lines in the file's style; lists every candidate when a name is ambiguous. |
rename_symbol, refactor and resolve_imports are annotated destructive; the rest are read-only. Ambiguous names return AMBIGUOUS_SYMBOL instead of guessing. rg remains the right tool for literal text.
Readable output
setup and the plugin .mcp.json register --result-format readable: empty results say what to check, partial results carry an Incomplete: … line, errors are Error (CODE): message plus Next: <what to do> with stack traces stripped, and an applied rename reports changed files and edit counts. --result-format both (the default) returns JSON text plus structured content; call --json prints the structured result.
Shared daemon
With --shared, the stdio process the agent starts is a thin pipe to a background daemon keyed by workspace, binary and server flags. The first session spawns it; later sessions, subagents and codeveloce-mcp call attach to it and find the language servers already warm.
codeveloce-mcp shared status # running daemons, their workspace and log file
codeveloce-mcp shared stop # stop them all
- Sockets, locks and logs live in a private per-user directory (
$XDG_RUNTIME_DIR/codeveloce-mcp, else$TMPDIR/codeveloce-mcp-<uid>, mode 0700; override withCODEVELOCE_RUNTIME_DIR). - A rebuilt binary or different flags get a separate daemon; old ones exit after
--shared-idle(default 15m) without clients. - The daemon keeps the environment (for example
PATH) of the session that started it. - Shared mode needs unix sockets (Linux, macOS). Elsewhere, or if the daemon cannot start, the server runs in-process as before.
Command line
| Command | Purpose |
|---|---|
codeveloce-mcp [flags] |
Run the MCP server on stdio. |
codeveloce-mcp call [--workspace DIR] [--json] <tool> key=value… |
Run one tool through the shared daemon. Values are typed by the tool schema; repeat a key for arrays. Exit status 1 on a tool error. |
codeveloce-mcp shared status|stop |
Inspect or stop shared daemons. |
codeveloce-mcp setup claude|codex [--apply] [--auto-install-lsp] [--no-guidance] |
Register with the client (preview without --apply). |
codeveloce-mcp doctor --workspace . [--probe FILE] |
Show detected language servers; --probe really starts one. |
codeveloce-mcp guidance |
Print the agent usage block setup writes. |
Server options
| Option | Default | Description |
|---|---|---|
--workspace |
current directory | Workspace root |
--result-format |
both |
both, text or readable (agent-oriented text; registered by setup) |
--shared |
false |
Share warm language servers through the per-workspace daemon (registered by setup) |
--shared-idle |
15m |
Stop the daemon after this long without clients |
--prewarm |
true |
Start one installed server per language and load the TypeScript project in the background; never downloads |
--auto-install-lsp |
false |
Install pinned language servers into a private cache on first use (needs Node.js/npm or Go) |
--request-timeout |
15s (180s managed) |
Timeout per LSP request |
--diagnostics-wait |
2s |
Wait for push diagnostics |
--max-results |
500 |
Maximum results per tool |
--log-level |
info |
debug, info, warn, error |
--version |
Print the version |
Design boundaries
- No index, no embeddings, no network service. Answers come live from local language servers; code never leaves the machine.
- Bounded project warm-up. tsserver and Pyright only see opened files, so files that mention the target are opened under limits (40000 files, 512 MiB, 512 matching files), cached per query and invalidated on change. Past a limit, read tools return what they found marked
Incomplete;rename_symbolfails instead. - The agent decides. Tools return facts for one question; they do not impose a workflow or synthesize opinions.
See SECURITY.md for the write and confinement model and docs/evidence.md for what the real-language-server tests prove.
Supported languages
| Language | LSP configuration profile | Typical extensions |
|---|---|---|
python |
python |
.py |
typescript, typescriptreact |
typescript-javascript |
.ts, .tsx |
javascript, javascriptreact |
typescript-javascript |
.js, .jsx |
go |
go |
.go |
html |
html |
.html |
css |
css |
.css |
The language name and the LSP configuration profile are different. For example, TypeScript maps to the shared typescript-javascript profile. Tools take no language argument: target-based tools infer it from the extension of path, and search_symbols searches every configured project language (Go, Python, TypeScript), including monorepo subprojects.
Setup from inside the coding agent
Once the codeveloce-mcp plugin is installed, run the bundled setup skill directly in the agent. It checks the host, installs an official checksummed binary if needed, inspects existing MCP registrations before changing anything, auto-detects the workspace, and probes real language servers. No manual setup commands or per-language Claude Code plugins are required.
- Claude Code:
/codeveloce-mcp-setup(full name/codeveloce-mcp:codeveloce-mcp-setup). - Codex:
$codeveloce-mcp-setup(Codex's skill invocation syntax, not a custom/command).
The skill must be installed before it can be invoked. The plugin includes it via skills/codeveloce-mcp-setup/SKILL.md; installing only the standalone MCP binary does not add an agent slash command. The skill's release installer uses official SHA-256-verified GitHub assets and never needs administrator rights. If you are developing from an unpublished local checkout, the skill can build the local binary with Go instead. Client registration or plugin startup may require restarting the agent session; the skill will report that status rather than falsely claiming connection.
The packaged .mcp.json already enables managed LSP provisioning for plugin users. Every detected language server is installed under the private versioned cache and launched by an absolute path, without requiring an LSP executable on PATH. Third-party packages are fetched only when that language is first used. See Security for this behavior. CLI-only users can still choose the explicit --auto-install-lsp flag shown below.
Automatic LSP setup (no per-language plugins)
Register codeveloce-mcp once with Claude Code or Codex. You do not need
separate LSP plugins for each language. Without any .codeveloce.yaml, the MCP
automatically discovers Go, Python, TypeScript/JavaScript, HTML and CSS projects
(including monorepos). With --prewarm (default) it starts one installed
server per language in the background at startup; others start when an MCP
tool needs them. In the default no-download mode, the MCP uses LSPs installed on PATH;
managed mode instead uses its own isolated versioned cache. Detection does not modify workspace files or
install any packages.
For a single opt-in that also downloads missing language servers, run:
codeveloce-mcp setup claude --apply --auto-install-lsp
# or
codeveloce-mcp setup codex --apply --auto-install-lsp
Managed mode uses pinned packages and installs them exactly once into the
user cache (~/.cache/codeveloce-mcp/servers/ on Linux, or the platform's user
cache directory). The package installer uses npm install (Pyright,
TypeScript Language Server, HTML/CSS) or go install (gopls), but the actual
language server is subsequently started directly by absolute path, never
by searching PATH or invoking npx / go run again. No LSP global install and
no PATH modifications are necessary. Versions are isolated and shared across
workspaces. Override the cache location with the absolute-path environment
variable CODEVELOCE_CACHE_DIR.
The host needs Node.js and npm to install Node-based servers (and Node.js to
run them), or Go for the first gopls installation. The MCP does not install
those runtimes. Go must remain available for Go workspace analysis. First use may access the network; subsequent launches use the
managed cache, even when offline. No package installation occurs on startup or
when running doctor without --probe. Without --auto-install-lsp, missing
LSP executables are reported rather than downloaded.
An existing .codeveloce.yaml (or .codeveloce.yml) always wins over discovery
and the managed defaults. For custom language servers, project-specific settings
or unusual layouts, create .codeveloce.yaml yourself; CLI setup and doctor handle client registration and diagnostics. Ordinary projects need
no YAML and no restart after detection.
Inspect without installing
codeveloce-mcp doctor --workspace .
codeveloce-mcp doctor --workspace . --auto-install-lsp
# --probe is optional: it really starts the LSP (and may download in managed mode).
codeveloce-mcp doctor --workspace . --auto-install-lsp --probe frontend/src/main.ts
Configuration Format
.codeveloce.yaml maps workspace relative paths (e.g. . for root, apps/frontend, apps/backend) to language server profiles and custom options:
.:
python:
command: pyright-langserver
args: ["--stdio"]
go:
command: gopls
args: []
apps/frontend:
typescript-javascript:
command: typescript-language-server
args: ["--stdio"]
settings:
tsserver:
maxTsServerMemory: 4096
apps/backend:
python:
command: pyright-langserver
args: ["--stdio"]
env:
PYTHONPATH: "apps/backend"
Each server entry supports:
command: Command executable name or pathargs: Command-line argumentspattern: Optional file match pattern to route requestsenv: Map of custom environment variablessettings: Custom settings map passed viaworkspace/didChangeConfigurationinitialization_options: Custom options passed during LSP initialization
Requirements
- Go 1.26 or later when building from this repository
- An installed LSP server for each language, or Node.js/npm and/or Go with
--auto-install-lsp - An MCP client such as Codex or Claude Code
No separate Claude Code LSP plugin is needed. The plugin-managed LSP mode installs and launches pinned language servers entirely from a private cache; individual LSP executables need not be on PATH. A managed server that is not yet installed is installed and started on the first request for its language; prewarm does not install it.
| Language | LSP server | Example installation |
|---|---|---|
| Python | pyright-langserver |
npm install -g pyright |
| TypeScript / JavaScript | typescript-language-server |
npm install -g typescript@6 typescript-language-server |
| Go | gopls |
go install golang.org/x/tools/gopls@latest |
| HTML / CSS | vscode-html-language-server, vscode-css-language-server |
npm install -g vscode-langservers-extracted |
To avoid global installation, configure a launcher such as npx as shown for HTML and CSS above. command and args are passed directly to the process launcher, not through a shell: ~, environment-variable expansion, pipes, and shell argument splitting are unavailable.
Installation
Prebuilt binaries for Linux, macOS, and Windows (amd64 and arm64) are attached
to every release.
Download the archive for your platform, extract it, and place codeveloce-mcp
on your PATH.
With Go 1.26 or later installed:
go install github.com/tamutamu/codeveloce-mcp/cmd/codeveloce-mcp@latest
To build from a checkout of this repository:
go build -o codeveloce-mcp ./cmd/codeveloce-mcp
Place the resulting executable on the MCP client's PATH, or specify its absolute path as the configured command.
Verify the binary your client will launch: run command -v codeveloce-mcp (Windows: where.exe codeveloce-mcp), then codeveloce-mcp --version. If a version is older than the release you installed, update PATH or register the new binary by absolute path with codeveloce-mcp setup claude|codex --apply (remove any existing registration first; setup refuses to overwrite it). Restart the client after replacing a running binary. A fresh Git checkout does not upgrade a previously installed executable automatically.
One-command setup and diagnostics
Install the binary and use the clients' own MCP registration commands without manually editing JSON or TOML:
codeveloce-mcp doctor --workspace .
codeveloce-mcp doctor --workspace . --probe internal/tools/engine.go
codeveloce-mcp setup claude # preview only
codeveloce-mcp setup claude --apply # explicitly register; no downloads
codeveloce-mcp setup codex --apply
codeveloce-mcp setup claude --apply --auto-install-lsp # permit first-use downloads
codeveloce-mcp setup codex --apply --auto-install-lsp
doctor reports auto-discovered or explicitly configured LSPs, the running binary/version, and missing executables. It never writes configuration and only attempts a first-use package download if both --auto-install-lsp and --probe are supplied. setup defaults to preview, does not download software, and refuses to overwrite existing registrations. --apply registers the MCP using the selected client's CLI. To change an existing MCP registration to managed mode, remove it using that client's CLI before registering again.
--apply also adds a short usage block, between <!-- codeveloce:begin --> and <!-- codeveloce:end --> markers, to the client's global instruction file: ~/.codex/AGENTS.md (or $CODEX_HOME/AGENTS.md) for Codex and ~/.claude/CLAUDE.md for Claude Code. It maps each kind of question to its tool. Codex shows the model only the first ~247 characters of the MCP's own instructions, and in the A/B below the agent skipped the MCP in most sessions without this block. Rerunning setup replaces the block in place; --no-guidance skips it, and codeveloce-mcp guidance prints it for a manual install.
Codex configuration
Codex plugin package
The repository is directly installable as a Codex local plugin marketplace. Install the codeveloce-mcp binary on PATH, then:
codex plugin marketplace add tamutamu/codeveloce-mcp
codex plugin add codeveloce-mcp@codeveloce-mcp
The package uses .codex-plugin/plugin.json plus the root .mcp.json; the existing .claude-plugin/marketplace.json is also recognized by current Codex plugin tooling as a compatible repository marketplace. Start a new Codex session after installing or updating the plugin so the MCP tool list and server instructions are reloaded.
For direct MCP registration instead of the plugin package, add the following to ~/.codex/config.toml. command may be a name on PATH or an absolute path to the built executable. --workspace is optional and defaults to the process current working directory.
[mcp_servers.codeveloce]
command = "codeveloce-mcp"
In Codex, call the particular LSP tool that answers your question: search_symbols to find the file declaring a name, get_definition for the declaration a call runs, find_references for every use, get_incoming_calls for callers, and rename_symbol for an LSP-calculated rename. The MCP infers the language from the file path. setup codex also adds --result-format readable; add args = ["--result-format", "readable"] to get the same output with a manual registration.
Claude Code configuration
With the binary on your PATH, add it as a project or user MCP server:
claude mcp add codeveloce -- codeveloce-mcp
Or add this configuration directly:
{
"mcpServers": {
"codeveloce": {
"command": "codeveloce-mcp"
}
}
}
codeveloce-mcp setup claude --apply registers the same command with --result-format readable.
This repository is also a Claude Code plugin (.claude-plugin/plugin.json), so
it can be installed from a marketplace pointing at this repository instead of
hand-editing MCP config:
claude plugin marketplace add tamutamu/codeveloce-mcp
claude plugin install codeveloce-mcp@codeveloce-mcp
The plugin includes the /codeveloce-mcp-setup skill. Run it from Claude Code to install the binary and verify LSPs from inside the agent. Codex includes the same skill as $codeveloce-mcp-setup. If you install the binary separately, it still needs to be resolvable by the MCP client or registered by absolute path; a session restart may be necessary.
Design reference: 39 coding-agent actions mapped to required information and appropriate providers. The action-first MCP tool and small Codex A/B report (older architecture) includes direct wire-size checks and an independently graded two-task sample (4/4 passes); this preliminary sample is not evidence of universal productivity improvement. This is the source of truth for selecting LSP-derived information; file reading, Git, tests and judgment remain outside the MCP.
LSP-backed editing
codeveloce-mcp never guesses text replacements for semantic edits. rename_symbol asks the configured language server for a cross-file WorkspaceEdit and, with apply=true, writes it. refactor applies the WorkspaceEdit of the chosen code action; when the action is a server command, the edits the server sends back through workspace/applyEdit during that command are collected and written the same way.
Before any write, every edit is validated: paths must stay inside the running workspace, targets must be regular non-symlink files, ranges must be valid and non-overlapping, and LSP resource operations such as create/delete/rename-file are rejected. All target files are rechecked for staleness before the first write.
Verification
go test ./... && go test -race ./... && go vet ./... must pass; CI also runs integration tests against real gopls, typescript-language-server and Pyright, and the mixed-language examples/react-fastapi-monorepo fixture.
Contributing
Bug reports, new language profiles, and documentation fixes are all welcome. See CONTRIBUTING.md for the development setup and the design constraints a change needs to respect. Please also read the Code of Conduct.
Security
See SECURITY.md to report a vulnerability, and for the security model this server is designed around.
Changelog
See CHANGELOG.md.
License
MIT. See LICENSE.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
codeveloce-mcp
command
|
|
|
internal
|
|
|
core
Package core defines protocol-neutral values shared by tool handlers.
|
Package core defines protocol-neutral values shared by tool handlers. |
|
daemon
Package daemon lets several MCP clients share one warm engine.
|
Package daemon lets several MCP clients share one warm engine. |
|
lsp/transport
Package transport implements the LSP Content-Length JSON-RPC stream.
|
Package transport implements the LSP Content-Length JSON-RPC stream. |
|
managedlsp
Package managedlsp provisions pinned language servers in a user-owned cache.
|
Package managedlsp provisions pinned language servers in a user-owned cache. |
|
tools
Package tools implements semantic navigation and explicit LSP-backed edit operations.
|
Package tools implements semantic navigation and explicit LSP-backed edit operations. |