MCP Code Graph MCP Server

Analyze and visualize code graphs using CodeGPT.

Local serverstdio

What is the MCP Code Graph MCP server?

Analyze and visualize code graphs using CodeGPT. The mcp code graph mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 8 defined tools rather than through you.

What it actually does

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

Its toolset

Everything the assistant can do here goes through one of these:

  • 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
  • Setup — Commit to your project's git: bash git add .claude/commands/ git commit -m "Add custom Claude Code commands for Deep Graph MCP"

Configuration

You will need 3 environment variables: CODEGPT_API_KEY, CODEGPT_ORG_ID, CODEGPT_GRAPH_ID. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at Add on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP Code Graph's toolset — list-graphs, get-code, find-direct-connections and 5 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp code graph mcp server does with a few real requests.

Available tools

ToolWhat it does
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.
SetupCommit to your project's git: bash git add .claude/commands/ git commit -m "Add custom Claude Code commands for Deep Graph MCP"

How to install the MCP Code Graph MCP server

{
   "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
        ]
      }
   }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
CODEGPT_API_KEYCredential the server authenticates with.Yes
CODEGPT_ORG_IDConfiguration value read at startup.Optional
CODEGPT_GRAPH_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Code Graph to list-graphs.
  • Use MCP Code Graph to get-code.
  • Use MCP Code Graph to find-direct-connections.

Frequently asked questions

It connects MCP Code Graph to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (list-graphs, get-code, find-direct-connections, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Code Graph directly.