A **Model Context Protocol (MCP)** server implementation of **CodeFuse-CGM** (Code Graph Model), providing graph-integrated large language model
Cgm mcp mcp server lets Claude, Cursor and other MCP clients work with Cgm MCP directly. A Model Context Protocol (MCP) server implementation of CodeFuse-CGM (Code Graph Model), providing graph-integrated large language model capabilities for repository-level software engineering tasks.
A Model Context Protocol (MCP) server implementation of CodeFuse-CGM (Code Graph Model), providing graph-integrated large language model capabilities for repository-level software engineering tasks.
Once connected, the assistant can call these 14 tools directly:
repository_path — Path to the repositoryquery — Search query for relevant codeanalysis_scope — Scope of analysis (full, focused, minimal)max_files — Maximum number of files to analyzefile_paths — List of file paths to analyzeentity_name — Name of the entity to find relations forrelation_types — Types of relations to include (optional)format — Output format (structured, markdown, prompt)task_type — Type of task (issue_resolution, code_analysis, bug_fixing, feature_implementation)repository_name — Name of the repositoryissue_description — Description of the issuerepository_context — Optional repository contextPrerequisites — The Prerequisites tool exposed by this servercgm_get_task_status — The cgm_get_task_status tool exposed by this serverThe server is distributed via PyPI as torch, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
Before the server will start you need to supply 8 environment variables: CGM_LLM_API_KEY, CGM_LLM_PROVIDER, CGM_LLM_MODEL, CGM_USE_GPU, CGM_GPU_BATCH_SIZE, CGM_SIMILARITY_THRESHOLD, CGM_CACHE_EMBEDDINGS, CGM_MAX_CACHE_SIZE. Keep credentials in your client's env block or a secrets manager rather than committing them.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Cgm MCP sits in that group, and the shape of its toolset — repository_path, query, analysis_scope among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| repository_path | Path to the repository |
| query | Search query for relevant code |
| analysis_scope | Scope of analysis (full, focused, minimal) |
| max_files | Maximum number of files to analyze |
| file_paths | List of file paths to analyze |
| entity_name | Name of the entity to find relations for |
| relation_types | Types of relations to include (optional) |
| format | Output format (structured, markdown, prompt) |
| task_type | Type of task (issue_resolution, code_analysis, bug_fixing, feature_implementation) |
| repository_name | Name of the repository |
| issue_description | Description of the issue |
| repository_context | Optional repository context |
| Prerequisites | The Prerequisites tool exposed by this server. |
| cgm_get_task_status | The cgm_get_task_status tool exposed by this server. |
{
"mcpServers": {
"cgm": {
"command": "uvx",
"args": ["torch"],
"env": {
"CGM_LLM_API_KEY": "your-value",
"CGM_LLM_PROVIDER": "your-value",
"CGM_LLM_MODEL": "your-value",
"CGM_USE_GPU": "your-value",
"CGM_GPU_BATCH_SIZE": "your-value",
"CGM_SIMILARITY_THRESHOLD": "your-value",
"CGM_CACHE_EMBEDDINGS": "your-value",
"CGM_MAX_CACHE_SIZE": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| CGM_LLM_API_KEY | Credential the server authenticates with. | Yes |
| CGM_LLM_PROVIDER | Configuration value read at startup. | Optional |
| CGM_LLM_MODEL | Configuration value read at startup. | Optional |
| CGM_USE_GPU | Configuration value read at startup. | Optional |
| CGM_GPU_BATCH_SIZE | Configuration value read at startup. | Optional |
| CGM_SIMILARITY_THRESHOLD | Configuration value read at startup. | Optional |
| CGM_CACHE_EMBEDDINGS | Configuration value read at startup. | Optional |
| CGM_MAX_CACHE_SIZE | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.