Claude Code Setup
Connect Context Chain to Claude Code so it can query design decisions while you code.
Configuration
Add the following to your project's .mcp.json file (create it if it doesn't exist):
{
"mcpServers": {
"context-chain": {
"command": "/bin/bash",
"args": ["/path/to/context-chain/mcp-start.sh"]
}
}
}Replace /path/to/context-chain with the absolute path to your Context Chain installation.
TIP
Add .mcp.json to your .gitignore — paths are machine-specific.
Verify Connection
Start Claude Code in your project directory:
claudeThen run /mcp to check server status. You should see context-chain listed as connected.
If it shows as failed, debug with:
claude --debugOr test the MCP server directly:
cd /path/to/context-chain
npm run mcp 2>&1Using It
Once connected, Claude Code automatically has access to the four MCP tools. You don't need to explicitly invoke them — Claude Code will query the knowledge graph when it determines context would be helpful.
You can also prompt it directly:
- "What design decisions were made about the auth middleware?"
- "Why was this function written this way?"
- "What are the callers of
processPayment?" - "Are there any decisions related to rate limiting in this service?"
Custom Port
If you're running Memgraph on a non-default port (e.g., for the dogfooding setup):
{
"mcpServers": {
"context-chain": {
"command": "/bin/bash",
"args": ["/path/to/context-chain/mcp-start.sh"],
"env": {
"CKG_MEMGRAPH_PORT": "7688"
}
}
}
}Cursor
The same MCP configuration works with Cursor. Add the server in Cursor's MCP settings with the same command and args.