Configure Claude Code CLI to communicate with mcp-injector and cut context costs on heavy terminal sessions.
Claude Code is Anthropic's interactive command-line coding assistant. Because it runs directly inside your shell, Claude Code frequently pulls entire files into its context window for simple tasks. In large codebases, this adds up to high API bills. mcp-injector folds code bodies into lightweight signatures and forces byte-identical deterministic sorting. This guarantees maximum Anthropic KV cache hits and keeps context sizes to a fraction of the raw project size.
Download and run the setup script:
Claude Code reads MCP configuration from the standard Claude Desktop layout config file. To register mcp-injector, open or create your config file:
~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd the server settings:
{
"mcpServers": {
"mcp-injector": {
"command": "/usr/local/bin/mcp-injector",
"env": {
"MCP_WORKSPACE": "${workspaceFolder}"
}
}
}
}
When starting your Claude Code session, make sure it is configured to discover local MCP servers. Launch it inside your project folder:
Test the connection by asking Claude:
Claude Code will fetch the folded signature catalog from the sqlite local daemon.