larkx MCP Server for Claude Code
Connect once, get 6 instant code navigation tools - no file reading required.
How it works
Claude Code's VS Code extension reads a file called .mcp.json in your project root. Each entry tells the extension how to spawn an MCP server. When you open the project, Claude Code asks for approval, then connects.
- 1
Make sure larkx is installed
bashnpm install -g larkx larkx --version - 2
Create .mcp.json (or let init do it)
If you ran
larkx init, this file already exists. Otherwise create it manually in the project root:.mcp.json{ "mcpServers": { "larkx": { "command": "larkx", "args": ["mcp"] } } }If
larkxis not on your PATH, point at the bin directly:json{ "mcpServers": { "larkx": { "command": "node", "args": ["C:\\path\\to\\larkx\\bin\\larkx.js", "mcp"] } } } - 3
Reload VS Code
bashCtrl+Shift+P → Developer: Reload Window(macOS: Cmd+Shift+P)
- 4
Approve the server
Claude Code will show a prompt asking you to approve the larkx MCP server for this project. Click Allow. Once approved it auto-connects in future sessions.
- 5
Verify
Check the CLI
bashlarkx --version # → larkx v0.1.0If the command is not found, make sure your Node global bin is on PATH.
Check the index
bashlarkx statsShould print file counts, detected frameworks, and per-level token estimates.
If the index is empty, run
larkx indexfirst.Check the MCP server
bashlarkx mcp --check # → ✓ MCP server responding correctlyThis confirms the MCP server can start and answer basic JSON-RPC health checks.
Check inside your AI agent
Open the Claude Code chat and ask:
"Which MCP servers do you have?"
The response should include
larkxwith 6 tools listed.Ask a follow-up question such as:
- "Show me the project index."
- "Where is the
indexProjectfunction defined?"
If Claude opens source files directly, the MCP hook is not being used.
Not working?- Confirm .mcp.json exists in the project root.
- Reload VS Code: Ctrl+Shift+P → Developer: Reload Window.
- Check that larkx is on PATH or use the full node path in .mcp.json.
- Run larkx index --force to rebuild the graph.
If the server is not listed or is unresponsive:
- Confirm
.mcp.jsonexists in the project root. - Reload VS Code with
Ctrl+Shift+P→ Developer: Reload Window. - Check that
larkxis on PATH or use the full node path in.mcp.json. - Run
larkx index --forceto rebuild the graph.
Common scopes
| Scope | File | When to use |
|---|---|---|
| Per project | .mcp.json in repo root | Different MCP servers per project (recommended) |
| Global (CLI only) | claude mcp add | Terminal Claude Code, all projects |
| Global (VS Code) | Not supported as of v0.1 | Use per-project .mcp.json instead |
Next steps
- Global setup for terminal Claude Code
- Set up Cursor, Copilot, Codex, Gemini
- UserPromptSubmit hook, make Claude always use MCP first