Quickstart
Get Context Chain running on your codebase in under 10 minutes.
Prerequisites
- Node.js 18+
- Docker (for Memgraph)
- Joern (install guide)
- Claude CLI (
claude -p, from Claude Max subscription)
1. Clone and Install
bash
git clone https://github.com/Tommylilinfeng/context-chain.git
cd context-chain && npm install2. Start Memgraph
bash
docker compose up -dThis starts Memgraph on port 7687 and Memgraph Lab on port 3000 (http://localhost:3000).
3. Start the Dashboard
bash
npm run dashboard
# → http://localhost:30014. Setup via Dashboard
- System → Add your repo (name, path, language)
- System → Generate CPG (Joern code analysis)
- System → Full Setup (schema + import code structure)
- Quick Scan → Pick a repo, click Scan → decisions appear
Or Setup via CLI
bash
npm run db:schema # init schema
npm run ingest:cpg -- --file data/your-repo.json # import code structure
npm run analyze -- --repo my-repo # full scan
npm run mcp # start MCP serverTIP
Full scan supports pause/resume: press Ctrl+C to stop, npm run analyze -- --repo my-repo --continue to resume where you left off.
5. Connect Claude Code
Add to your project's .mcp.json:
json
{
"mcpServers": {
"context-chain": {
"command": "/bin/bash",
"args": ["/path/to/context-chain/mcp-start.sh"]
}
}
}Now when Claude Code works on your codebase, it can query "why was this written this way?" and get real answers.
What's Next
- Learn about Five-Slot Retrieval — how decisions are indexed and found
- Configure ckg.config.json for multi-repo setups
- Set up Session Ingestion to capture decisions from AI coding sessions
- Browse the MCP tools available to your coding AI