CodeGraphContext
@Shashankss1205
关于 CodeGraphContext
An MCP server that indexes local code into a graph database to provide context to AI assistants.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"CodeGraphContext": {
"command": "cgc",
"args": [
"start"
],
"env": {
"NEO4J_URI": "YOUR_NEO4J_URI",
"NEO4J_USERNAME": "YOUR_NEO4J_USERNAME",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
},
"tools": {
"alwaysAllow": [
"add_code_to_graph",
"add_package_to_graph",
"check_job_status",
"list_jobs",
"find_code",
"analyze_code_relationships",
"watch_directory",
"find_dead_code",
"execute_cypher_query",
"calculate_cyclomatic_complexity",
"find_most_complex_functions",
"list_indexed_repositories",
"delete_repository",
"visualize_graph_query",
"list_watched_paths",
"unwatch_directory"
],
"disabled": false
},
"disabled": false,
"alwaysAllow": []
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is CodeGraphContext?
CodeGraphContext is an MCP server that indexes local source code into a Neo4j graph database to provide structured code context to AI assistants. It is designed for developers who want to enable their AI tools to understand code relationships, dependencies, and call chains across a codebase.
How to use CodeGraphContext?
Install with pip install codegraphcontext, then run cgc setup for an interactive wizard that configures the Neo4j database connection and optionally sets up supported IDEs (VS Code, Cursor, Claude, etc.). After setup, start the server with cgc start. The server is then ready to accept natural language commands from an MCP client (e.g., Claude, VS Code) to index, query, and analyze code.
Key features of CodeGraphContext
- Code Indexing: Analyzes code and builds a knowledge graph of its components.
- Relationship Analysis: Query for callers, callees, class hierarchies, and call chains.
- Live Updates: Watches local files for changes and automatically updates the graph.
- Interactive Setup: A user-friendly command-line wizard for easy configuration.
- File Ignoring: Supports
.cgcignorefiles to exclude specific files and directories.
Use cases of CodeGraphContext
- Static code analysis in AI assistants
- Graph-based visualization of projects
- Dead code and complexity detection
- Impact analysis before making code changes
- Debugging by tracing execution paths across hundreds of files
FAQ from CodeGraphContext
What dependencies does CodeGraphContext require?
The server requires Python packages including neo4j, watchdog, tree-sitter, tree-sitter-languages, typer, rich, and others. It also needs a running Neo4j database (local via Docker, Linux binary, or remote hosted instance).
How do I ignore certain files or directories?
Create a .cgcignore file in the root of your project using the same syntax as .gitignore. Example: /build/, /node_modules/, *.log.
Does the server support live file watching?
Yes. When you tell the AI assistant to watch a directory, the server performs an initial full index and then continuously monitors the directory for changes, automatically updating the graph.
What transports or authentication does it use?
The server communicates via the MCP (Model Context Protocol) using Neo4j credentials (URI, username, password) stored in ~/.codegraphcontext/.env. It does not expose other transports or authentication methods.
What are the known limitations?
The README does not list explicit limitations, but it notes that the cgc setup command may fail on some systems requiring a PATH fix script, and that the tool requires a working Neo4j instance.
其他 分类下的更多 MCP 服务器
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Mcp
browsermcpBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
Codelf
unbugA search tool helps dev to solve the naming things problem.
评论