Code Graph

Developer tools

MCP Server for code graph analysis and visualization by CodeGPT.

Your AI app calls the Code Graph MCP server, which does the work through tools like list-graphs, get-code, find-direct-connections and nodes-semantic-search and sends the result back to the chat.

About Code Graph

Code Graph is a community MCP server from diffbot, filed in our directory under developer tools. MCP Server for code graph analysis and visualization by CodeGPT.

The README for Code Graph lists tools such as list-graphs, get-code, find-direct-connections and nodes-semantic-search, which your AI app can call once the server is connected.

At a glance

Publisher
diffbot (community)
Runs
See the README for setup
Written in
JavaScript
License
MIT
GitHub stars
401

Tools Code Graph gives your AI app

  • list-graphsLists available repository graphs with basic information.
  • get-codeRetrieves the complete source code for a specific functionality from the graph.
  • find-direct-connectionsExplores the direct relationships of a functionality within the code graph.
  • nodes-semantic-searchSemantically searches for code functionalities using natural language.
  • docs-semantic-searchSemantically searches repository documentation.
  • get-usage-dependency-linksAnalyzes and lists functionalities affected by changes to a code entity.
  • folder-tree-structureRetrieves the tree structure of a folder in the repository.

Tool names as the Code Graph README lists them. Your AI app shows the live list once Code Graph is connected.

How to set up Code Graph

  1. Follow the install steps in the Code Graph README; it is written in JavaScript, so have that toolchain ready.
  2. Check the Code Graph README for keys or settings; the registry lists none that Code Graph requires.
  3. Add Code Graph to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Code Graph tools to confirm the connection.
  5. Run one read-only task with Code Graph first, such as a call to list-graphs, before you allow anything that writes or sends.

Code Graph compared with similar servers

  • Context Engine by Context-Engine-AI has fewer GitHub stars than Code Graph (401 against 401); both are community servers, and both run locally.
  • Erickwendel Contributions by ErickWendel has more GitHub stars than Code Graph (405 against 401); both are community servers, and both run locally. The Erickwendel Contributions README lists 4 tools to Code Graph's 7.
  • Flutter MCP Toolkit by Arenukvern has fewer GitHub stars than Code Graph (401 against 401); both are community servers, and both run locally.

Before you connect Code Graph

  • Give Code Graph its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Code Graph tool call until you trust what it does with them.
  • Treat text that Code Graph fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Code Graph on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Code Graph

How marketing and sales teams put Code Graph to work, by company size. Pick the size closest to yours and start Code Graph on one use case.

Small business

  • A small business with a developer can use Code Graph to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Code Graph to explain and fix a marketing site issue without context switching between tools.
  • Code Graph runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Code Graph to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Code Graph to keep scripts and automations documented and versioned as they change.
  • Start with list-graphs and get-code, the tools Code Graph lists first, and add more once the team trusts the results.

Enterprise

  • Enterprise engineering teams can roll out Code Graph with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Code Graph so web and marketing engineering share one reviewed way of working with AI.
  • Code Graph is a community server, so have security review the code and pin a version before Code Graph touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Code Graph README

From diffbot/mcp-code-graph on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Deep Graph MCP Server by CodeGPT

A Model Context Protocol server that enables seamless interaction with Code Graphs.

How this works

This MCP allows you to interact with knowledge graphs available in your CodeGPT account or with public graphs from DeepGraph.

To create a graph from any GitHub repository, simply change the URL from github.com to deepgraph.co. For example:

  • GitHub repo: https://github.com/username/repo
  • DeepGraph URL: https://deepgraph.co/username/repo

You'll be able to use these advanced graph-based queries across different MCP Hosts such as ChatGPT, Cursor, Windsurf, CodeGPT Extension, GitHub Copilot, Claude Desktop, Claude Code, Gemini CLI, and others.

Available Tools

  • list-graphs: Lists available repository graphs with basic information.

  • get-code: Retrieves the complete source code for a specific functionality from the graph.

  • find-direct-connections: Explores the direct relationships of a functionality within the code graph.

  • nodes-semantic-search: Semantically searches for code functionalities using natural language.

  • docs-semantic-search: Semantically searches repository documentation.

  • get-usage-dependency-links: Analyzes and lists functionalities affected by changes to a code entity.

  • folder-tree-structure: Retrieves the tree structure of a folder in the repository.

For Public Code Graphs (No Account Required)

You can interact with public graphs from DeepGraph:

  1. Find any public repository on deepgraph.co
  2. Use the repository reference (e.g., username/repository-name)

Installation using npx

Add the following configuration to your MCP client (CodeGPT Extension, Cursor, Copilot, Claude Desktop, Windsurf, etc.):

{
   "mcpServers": {
      "Deep Graph MCP": {
         "command": "npx",
         "args": ["-y" , "mcp-code-graph@latest", 
         "username/repository-name",  // DeepGraph repository URL
         "username2/repository-name2" // Add more repositories if needed
        ]
      }
   }
}
For Private Graphs (CodeGPT Account Required)

Before using the CodeGPT MCP Server with private graphs, ensure you have:

  1. A CodeGPT account (sign up at app.codegpt.co)
  2. Uploaded a repository to Code Graph
  3. Get your API Key from CodeGPT API Keys page (required).
  4. Get your Organization ID (optional) and Graph ID (optional).
Installation with npx

Add the following configuration to your MCP client (CodeGPT Extension, Cursor, Copilot, Claude Desktop, Windsurf, etc.):

{
   "mcpServers": {
      "Deep Graph MCP": {
         "command": "npx",
         "args": ["-y" , "mcp-code-graph@latest", 
         "CODEGPT_API_KEY",
         "CODEGPT_ORG_ID",
         "CODEGPT_GRAPH_ID"
        ]
      }
   }
}

CLI Providers

Adding to Gemini CLI

Add the JSON configuration to your settings.json file:

Gemini CLI uses settings.json files for persistent configuration. There are two locations for these files:

  • User settings file: Location: ~/.gemini/settings.json (where ~ is your home directory). Scope: Applies to all Gemini CLI sessions for the current user.

  • Project settings file: Location: .gemini/settings.json within your project's root directory. Scope: Applies only when running Gemini CLI from that specific project. Project settings override user settings.

Adding to Claude Code

Follow these steps to integrate Deep Graph MCP Server with Claude Code.

Quick Setup

For Private Graphs
claude mcp add "Deep Graph MCP" npx -- -y mcp-code-graph@latest CODEGPT_API_KEY CODEGPT_ORG_ID CODEGPT_GRAPH_ID
For Public Graphs
claude mcp add "Deep Graph MCP" npx -- -y mcp-code-graph@latest username/repository-name

For team sharing, add the -s project flag:

claude mcp add -s project "Deep Graph MCP" npx -- -y mcp-code-graph@latest CODEGPT_API_KEY CODEGPT_ORG_ID CODEGPT_GRAPH_ID
# or for public graphs
claude mcp add -s project "Deep Graph MCP" npx -- -y mcp-code-graph@latest username/repository-name username2/repository-name

Verification

# Verify installation
claude mcp list

# Get server details
claude mcp get "Deep Graph MCP"

Advanced Workflows with Claude Code Custom Commands

Claude Code supports custom slash commands that combine multiple MCP Code Graph tools for comprehensive analysis workflows.

Setup

Copy the commands directory from this repository to your project root:

cp -r .claude/ /path/to/your/project/

Commit to your project's git:

git add .claude/commands/
git commit -m "Add custom Claude Code commands for Deep Graph MCP"

Available Commands

Repository-wide analysis commands (no parameters needed):

/project:analyze-architecture          # Complete architectural overview
/project:security-audit               # Comprehensive security analysis
/project:test-coverage-analyzer       # Test coverage and quality analysis
/project:technical-debt-analyzer      # Technical debt assessment
/project:api-ecosystem-analyzer       # Complete API ecosystem analysis
/project:repository-onboarding        # Full repository onboarding guide

Component-specific commands (require parameters):

/project:migration-planner [component/technology]     # Smart migration planning
/project:performance-optimizer [component/function]   # Performance optimization
/project:component-onboarding [component/feature]     # Component-specific training

Usage Examples

/project:analyze-architecture
/project:migration-planner React to Vue.js
/project:performance-optimizer DatabaseService.getUserData
/project:component-onboarding authentication system

📈 Star History

Support

For support and feedback:

License

MIT License

Questions about Code Graph

What is the Code Graph MCP server?

MCP Server for code graph analysis and visualization by CodeGPT. Code Graph is maintained by diffbot on GitHub at diffbot/mcp-code-graph, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Code Graph MCP server?

Code Graph doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (diffbot/mcp-code-graph). Like most servers, Code Graph ends with a command or URL you paste into your AI app's MCP config.

Does Code Graph need an API key?

The registry lists no required keys for Code Graph. Check the Code Graph README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Code Graph an official MCP server?

No. Code Graph is a community server maintained by diffbot. Community servers can be excellent; read the code and the open issues before you give Code Graph access to company data.

What license is Code Graph under?

Code Graph is released under the MIT license, according to its GitHub repository. The license covers the code of Code Graph; the service it connects to has its own terms.