CodeGraphContext
Verified Safeby Shashankss1205
Overview
An AI pair programmer that provides real-time, accurate, context-aware assistance by indexing and analyzing codebases (local projects and dependencies) using a graph database, facilitating code understanding, writing, and refactoring across multiple programming languages.
Installation
python -m codegraphcontext startEnvironment Variables
- DATABASE_TYPE
- CGC_RUNTIME_DB_TYPE
- DEFAULT_DATABASE
- NEO4J_URI
- NEO4J_USERNAME
- NEO4J_PASSWORD
- CGC_DATA_DIR
- LOG_LEVEL
- IGNORE_DIRS
- PATH
- PYTHONUNBUFFERED
Security Notes
The server's primary communication method is via stdin/stdout, which limits direct network exposure. It includes robust checks to prevent arbitrary write operations when executing Cypher queries, by filtering forbidden keywords after stripping string literals. While `subprocess.run` is used for language-specific package discovery (e.g., `npm`, `go list`), these calls are generally well-defined with `shell=False`, reducing the risk of command injection.
Similar Servers
chunkhound
Provides local-first codebase intelligence, extracting architecture, patterns, and institutional knowledge for AI assistants.
code-index-mcp
Intelligent code indexing and analysis for Large Language Models, enabling tasks such as code review, refactoring, documentation generation, debugging assistance, and architectural analysis.
CodeGraphContext
This MCP Server acts as an expert AI pair programmer's backend, providing real-time, accurate code analysis, indexing, and relationship information from a local codebase to assist with understanding, writing, and refactoring code.
codegraph-rust
Transforms codebases into a semantically searchable knowledge graph, enabling AI agents to reason about code relationships, architecture, and impact rather than just performing text-based searches.