提交

CodeGraphContext

@Shashankss1205

An MCP server that indexes local code into a graph database to provide context to AI assistants.
概览

What is CodeGraphContext?

CodeGraphContext is an MCP server that indexes local code into a graph database, providing context to AI assistants for better code understanding and analysis.

How to use CodeGraphContext?

To use CodeGraphContext, install it via pip, set up your Neo4j database connection using the interactive command-line wizard, and start the server with the command cgc start.

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: Automatically updates the graph when local files change.
  • Interactive Setup: User-friendly command-line wizard for easy configuration.

Use cases of CodeGraphContext?

  1. Static code analysis in AI assistants.
  2. Graph-based visualization of projects.
  3. Dead code and complexity detection.

FAQ from CodeGraphContext?

  • Can CodeGraphContext be used with any programming language?

Yes, as long as the code can be indexed, CodeGraphContext can analyze it.

  • Is CodeGraphContext free to use?

Yes! CodeGraphContext is open-source and free for everyone.

  • How does CodeGraphContext handle large codebases?

It efficiently indexes and analyzes large codebases using graph database capabilities.

服务器配置

{
  "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": []
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.