Skip to content

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):

json
{
  "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:

bash
claude

Then run /mcp to check server status. You should see context-chain listed as connected.

If it shows as failed, debug with:

bash
claude --debug

Or test the MCP server directly:

bash
cd /path/to/context-chain
npm run mcp 2>&1

Using 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):

json
{
  "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.

Released under the Apache 2.0 License.