
CodeGPT Code Graph
STDIOMCP server for interacting with Code Graphs from CodeGPT
MCP server for interacting with Code Graphs from CodeGPT
A Model Context Protocol server that enables seamless interaction with Code Graphs by CodeGPT
This MCP allows you to interact with the knowledge graphs available in your CodeGPT account.
You’ll be able to use these advanced graph-based queries across different MCP Hosts such as ChatGPT, Cursor, Windsurf, GitHub Copilot, Claude Desktop, and others.
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.
Before using the CodeGPT MCP Server, ensure you have:
{ "mcpServers": { "Deep Graph MCP - CodeGPT": { "command": "npx", "args": ["-y", "mcp-code-graph@latest"], "env": { "CODEGPT_API_KEY": "your-api-key", "CODEGPT_GRAPH_ID": "your-graph-id", // optional "CODEGPT_ORG_ID": "your-org-id" // optional } } } }
This is the recommended way to run the server locally. (stdio mode is the default mode for MCP servers)
git clone https://github.com/JudiniLabs/mcp-code-graph.git cd mcp-code-graph
pnpm install
pnpm build
Set up your environment variables, or you could add them to your MCP client configuration.
cp .env.example .env
CODEGPT_API_KEY=your-api-key
CODEGPT_ORG_ID=your-org-id # Optional
CODEGPT_GRAPH_ID=your-graph-id # Optional
Add the following configuration to your MCP client (Cursor, Claude Desktop, Windsurf, etc.)
{ "mcpServers": { "Code Graph MCP Server": { "command": "node", "args": ["/path/to/build/directory", "/index.js"] } } }
The server handles various error scenarios:
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript files
├── .env # Environment configuration(not included in version control)
├── .gitignore # Git ignore rules
└── package.json # Project metadata and dependencies
For support and feedback: