context-bridge
Context Bridge is a lightweight MCP server that builds a persistent semantic knowledge graph of your codebase, enabling AI assistants to query complex codebases with sub-millisecond latency without re-reading files every session.
README
Context Bridge
Bridge the context gap between your codebase and AI coding tools.
Context Bridge is a lightweight MCP (Model Context Protocol) server that builds a persistent semantic knowledge graph of your codebase. It enables AI assistants to query complex codebases with sub-millisecond latency, eliminating the need to re-read files every session.
Why?
AI coding tools are powerful but suffer from a context gap:
- They re-read the same files in every session
- They lack deep understanding of your architecture
- They can't learn from your coding conventions
- 23 minutes of developer focus are lost per context switch
Context Bridge solves this by indexing your codebase into a local knowledge graph that persists across sessions.
Features
- Semantic Code Search — Query code with natural language
- Persistent Knowledge Graph — SQLite-based, survives restarts
- Sub-millisecond Queries — FTS5 + precomputed embeddings
- MCP Protocol — Works with Claude Code, Cursor, and any MCP client
- Auto-indexing — Watches files and updates the index automatically
- Zero Cloud — Everything runs locally
Quick Start
# Install globally
npm install -g context-bridge
# Initialize in your project
cd your-project
context-bridge init
# Start the MCP server
context-bridge serve
# Or use with Claude Code
claude mcp add context-bridge -- node context-bridge serve
Configuration
Create .context-bridge.json in your project root:
{
"include": ["src/**/*.{js,ts,jsx,tsx}", "lib/**/*.py"],
"exclude": ["node_modules/**", "dist/**", "*.test.js"],
"dbPath": ".context-bridge/db.sqlite",
"watch": true,
"maxFileSizeKB": 500
}
MCP Tools
| Tool | Description |
|---|---|
search_code |
Search code with natural language or regex |
get_symbol |
Get full context of a function/class/variable |
get_dependencies |
Show what a file depends on |
get_callers |
Find all callers of a function |
summarize_module |
Get a high-level summary of a module |
Architecture
┌─────────────────┐ ┌──────────────┐ ┌────────────────┐
│ Claude Code │────▶│ Context │────▶│ SQLite + FTS5 │
│ Cursor │ │ Bridge MCP │ │ Knowledge Graph│
│ Other MCP │◀────│ Server │◀────│ (persistent) │
│ Clients │ │ │ │ │
└─────────────────┘ └──────────────┘ └────────────────┘
│
▼
┌──────────────┐
│ File Watcher │
│ (auto-index) │
└──────────────┘
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.