
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@sdsrs/code-graph-mcp
Advanced tools
MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing
A high-performance code knowledge graph server implementing the Model Context Protocol (MCP). Indexes codebases into a structured AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing — designed to give AI coding assistants deep, structured understanding of your code.
embed-model)src/
├── mcp/ # MCP protocol layer (JSON-RPC, tool registry, server)
├── parser/ # Tree-sitter parsing, relation extraction, language support
├── indexer/ # 3-phase pipeline, Merkle tree, file watcher
├── storage/ # SQLite schema, CRUD, FTS5 full-text search
├── graph/ # Recursive CTE call graph queries
├── search/ # RRF fusion search combining BM25 + vector
├── embedding/ # Candle embedding model (optional)
├── sandbox/ # Context compressor with token estimation
└── utils/ # Language detection, config
# Default build (with local embedding model)
cargo build --release
# Without embedding model (lighter build)
cargo build --release --no-default-features
The server communicates via JSON-RPC 2.0 over stdin/stdout:
cd /path/to/your/project
code-graph-mcp
Add to your MCP settings:
{
"mcpServers": {
"code-graph": {
"command": "/path/to/code-graph-mcp",
"cwd": "/path/to/your/project"
}
}
}
| Tool | Description |
|---|---|
semantic_code_search | Hybrid BM25 + vector + graph search for AST nodes |
get_call_graph | Trace upstream/downstream call chains for a function |
find_http_route | Map route path to backend handler function |
get_ast_node | Extract a specific code symbol from a file |
read_snippet | Read original code snippet by node ID with context |
start_watch / stop_watch | Start/stop file system watcher for incremental indexing |
get_index_status | Query index status and health |
rebuild_index | Force full index rebuild |
TypeScript, JavaScript, Go, Python, Rust, Java, C, C++, HTML, CSS
Uses SQLite with:
Data is stored in .code-graph/index.db under the project root (auto-created, gitignored).
# Run tests
cargo test
# Run tests without embedding model
cargo test --no-default-features
# Check compilation
cargo check
See LICENSE for details.
FAQs
MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing
We found that @sdsrs/code-graph-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.