Skip to content
Back to search

mcp-code-graph

MCP Server for code graph analysis and visualization by CodeGPT

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/diffbot--mcp-code-graph/badge.svg)](/listings/diffbot--mcp-code-graph)

HTML

<a href="/listings/diffbot--mcp-code-graph"><img src="/api/listings/diffbot--mcp-code-graph/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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](https://app.codegpt.co)) 2. Uploaded a repository to [Code Graph](https://help.codegpt.co/en/articles/9912447-code-graphs) 3. Get your API Key from [CodeGPT API Keys page](https://app.codegpt.co/user/api-keys) (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"
        ]
      }
   }
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 200 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![Open in DeepGraph](https://img.shields.io/badge/%E2%9C%A8%20Open%20in-DeepGraph-a465f7?style=flat)](https://deepgraph.co/JudiniLabs/mcp-code-graph)
  2. [![GitHub stars](https://img.shields.io/github/stars/JudiniLabs/mcp-code-graph?style=flat&logo=github)](https://github.com/JudiniLabs/mcp-code-graph/stargazers)
  3. [![GitHub pull requests](https://img.shields.io/github/issues-pr/JudiniLabs/mcp-code-graph?style=flat&logo=github)](https://github.com/JudiniLabs/mcp-code-graph/pulls)
  4. <hr>
  5. # Deep Graph MCP Server by [CodeGPT](https://codegpt.co/)
  6. A [Model Context Protocol](https://modelcontextprotocol.io/quickstart/server) server that enables seamless interaction with Code Graphs.
  7. <img width="1373" alt="Screenshot 2025-06-11 at 14 01 15" src="https://github.com/user-attachments/assets/a588bafc-d5a8-4955-8d48-3addaf3ed71c" />
  8. ## How this works
  9. This MCP allows you to interact with knowledge graphs available in your CodeGPT account or with public graphs from [DeepGraph](https://deepgraph.co).
  10. To create a graph from any GitHub repository, simply change the URL from `github.com` to `deepgraph.co`. For example:
  11. - GitHub repo: `https://github.com/username/repo`
  12. - DeepGraph URL: `https://deepgraph.co/username/repo`
  13. <video src="https://github.com/user-attachments/assets/31f60fe6-6da4-4c67-a845-031908476351" controls autoplay></video>
  14. 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.
  15. ## Available Tools
  16. - `list-graphs`: Lists available repository graphs with basic information.
  17. - `get-code`: Retrieves the complete source code for a specific functionality from the graph.
  18. - `find-direct-connections`: Explores the direct relationships of a functionality within the code graph.
  19. - `nodes-semantic-search`: Semantically searches for code functionalities using natural language.
  20. - `docs-semantic-search`: Semantically searches repository documentation.
  21. - `get-usage-dependency-links`: Analyzes and lists functionalities affected by changes to a code entity.
  22. - `folder-tree-structure`: Retrieves the tree structure of a folder in the repository.
  23. ## For Public Code Graphs (No Account Required)
  24. You can interact with public graphs from [DeepGraph](https://deepgraph.co):
  25. 1. Find any public repository on [deepgraph.co](https://deepgraph.co)
  26. 2. Use the repository reference (e.g., `username/repository-name`)
  27. ## Installation using npx
  28. Add the following configuration to your MCP client (CodeGPT Extension, Cursor, Copilot, Claude Desktop, Windsurf, etc.):
  29. ```json
  30. {
  31. "mcpServers": {
  32. "Deep Graph MCP": {
  33. "command": "npx",
  34. "args": ["-y" , "mcp-code-graph@latest",
  35. "username/repository-name", // DeepGraph repository URL
  36. "username2/repository-name2" // Add more repositories if needed
  37. ]
  38. }
  39. }
  40. }
  41. ```
  42. ### For Private Graphs (CodeGPT Account Required)
  43. Before using the CodeGPT MCP Server with private graphs, ensure you have:
  44. 1. A CodeGPT account (sign up at [app.codegpt.co](https://app.codegpt.co))
  45. 2. Uploaded a repository to [Code Graph](https://help.codegpt.co/en/articles/9912447-code-graphs)
  46. 3. Get your API Key from [CodeGPT API Keys page](https://app.codegpt.co/user/api-keys) (required).
  47. 4. Get your Organization ID (optional) and Graph ID (optional).
  48. ### Installation with npx
  49. Add the following configuration to your MCP client (CodeGPT Extension, Cursor, Copilot, Claude Desktop, Windsurf, etc.):
  50. ```json
  51. {
  52. "mcpServers": {
  53. "Deep Graph MCP": {
  54. "command": "npx",
  55. "args": ["-y" , "mcp-code-graph@latest",
  56. "CODEGPT_API_KEY",
  57. "CODEGPT_ORG_ID",
  58. "CODEGPT_GRAPH_ID"
  59. ]
  60. }
  61. }
  62. }
  63. ```
  64. # CLI Providers
  65. ## Adding to Gemini CLI
  66. Add the JSON configuration to your settings.json file:
  67. <video src="https://github.com/user-attachments/assets/22f601dd-0564-46ac-8973-161de3017e34" controls autoplay></video>
  68. Gemini CLI uses settings.json files for persistent configuration. There are two locations for these files:
  69. - User settings file:
  70. Location: ~/.gemini/settings.json (where ~ is your home directory).
  71. Scope: Applies to all Gemini CLI sessions for the current user.
  72. - Project settings file:
  73. Location: .gemini/settings.json within your project's root directory.
  74. Scope: Applies only when running Gemini CLI from that specific project. Project settings override user settings.
  75. ## Adding to Claude Code
  76. Follow these steps to integrate Deep Graph MCP Server with Claude Code.
  77. ## Quick Setup
  78. ### For Private Graphs
  79. ```bash
  80. claude mcp add "Deep Graph MCP" npx -- -y mcp-code-graph@latest CODEGPT_API_KEY CODEGPT_ORG_ID CODEGPT_GRAPH_ID
  81. ```
  82. ### For Public Graphs
  83. ```bash
  84. claude mcp add "Deep Graph MCP" npx -- -y mcp-code-graph@latest username/repository-name
  85. ```
  86. **For team sharing**, add the `-s project` flag:
  87. ```bash
  88. claude mcp add -s project "Deep Graph MCP" npx -- -y mcp-code-graph@latest CODEGPT_API_KEY CODEGPT_ORG_ID CODEGPT_GRAPH_ID
  89. # or for public graphs
  90. claude mcp add -s project "Deep Graph MCP" npx -- -y mcp-code-graph@latest username/repository-name username2/repository-name
  91. ```
  92. ## Verification
  93. ```bash
  94. # Verify installation
  95. claude mcp list
  96. # Get server details
  97. claude mcp get "Deep Graph MCP"
  98. ```
  99. ## Advanced Workflows with Claude Code Custom Commands
  100. Claude Code supports custom slash commands that combine multiple MCP Code Graph tools for comprehensive analysis workflows.
  101. ### Setup
  102. **Copy the commands directory** from this repository to your project root:
  103. ```bash
  104. cp -r .claude/ /path/to/your/project/
  105. ```
  106. Commit to your project's git:
  107. ```bash
  108. git add .claude/commands/
  109. git commit -m "Add custom Claude Code commands for Deep Graph MCP"
  110. ```
  111. ## Available Commands
  112. Repository-wide analysis commands (no parameters needed):
  113. ```bash
  114. /project:analyze-architecture # Complete architectural overview
  115. /project:security-audit # Comprehensive security analysis
  116. /project:test-coverage-analyzer # Test coverage and quality analysis
  117. /project:technical-debt-analyzer # Technical debt assessment
  118. /project:api-ecosystem-analyzer # Complete API ecosystem analysis
  119. /project:repository-onboarding # Full repository onboarding guide
  120. ```
  121. Component-specific commands (require parameters):
  122. ```bash
  123. /project:migration-planner [component/technology] # Smart migration planning
  124. /project:performance-optimizer [component/function] # Performance optimization
  125. /project:component-onboarding [component/feature] # Component-specific training
  126. ```
  127. ## Usage Examples
  128. ```bash
  129. /project:analyze-architecture
  130. /project:migration-planner React to Vue.js
  131. /project:performance-optimizer DatabaseService.getUserData
  132. /project:component-onboarding authentication system
  133. ```
  134. ## 📈 Star History
  135. [![Star History Chart](https://api.star-history.com/svg?repos=JudiniLabs/mcp-code-graph&type=Date)](https://star-history.com/#JudiniLabs/mcp-code-graph&Date)
  136. ## Support
  137. For support and feedback:
  138. - Email: support@codegpt.co
  139. - Website: [app.codegpt.co](https://app.codegpt.co)
  140. ## License
  141. [MIT License](https://opensource.org/licenses/MIT)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.