Supermodel MCP Server
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Supermodel MCP Server find all callers of parseConfig and show what it calls"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Supermodel MCP Server
MCP server that gives AI agents instant codebase understanding via the Supermodel API. Pre-computed code graphs enable sub-second responses for symbol lookups, call-graph traversal, and cross-subsystem analysis.
⭐ Star the Supermodel Ecosystem
If this is useful, please star our tools — it helps us grow:
Related MCP server: CodeGraph
Install
Quick Setup (Recommended)
curl -sSL https://raw.githubusercontent.com/supermodeltools/mcp/main/setup.sh | bashDownload, review, then execute:
curl -sSL https://raw.githubusercontent.com/supermodeltools/mcp/main/setup.sh -o setup.sh
cat setup.sh
chmod +x setup.sh
./setup.shOr clone the entire repo:
git clone https://github.com/supermodeltools/mcp.git
cd mcp
./setup.shManual Install
npm install -g @supermodeltools/mcp-serverOr run directly:
npx @supermodeltools/mcp-serverConfiguration
Save 40%+ on agent token costs — start free → supermodeltools.com/trial
Variable | Description |
| Your Supermodel API key (required) |
| Override API base URL (optional) |
| Directory for pre-computed graph cache files (optional) |
| API request timeout in ms (default: 900000 / 15 min) |
| Set to disable on-demand API calls; cache-only mode (optional) |
| Experiment mode. Set to |
Global Setup (Recommended)
Set your API key globally in your shell profile so it's available to all MCP clients:
# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux)
export SUPERMODEL_API_KEY="your-api-key"With the API key set globally, you can omit the env block from your MCP configs:
{
"mcpServers": {
"supermodel": {
"command": "npx",
"args": ["-y", "@supermodeltools/mcp-server"]
}
}
}Usage
Claude Code CLI
claude mcp add supermodel --env SUPERMODEL_API_KEY=your-api-key -- npx -y @supermodeltools/mcp-serverOr if SUPERMODEL_API_KEY is already set in your shell environment:
claude mcp add supermodel -- npx -y @supermodeltools/mcp-serverVerify installation:
claude mcp listCursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"supermodel": {
"command": "npx",
"args": ["-y", "@supermodeltools/mcp-server"],
"env": {
"SUPERMODEL_API_KEY": "your-api-key"
}
}
}
}Default Working Directory
For benchmarking tools or batch processing, pass a default working directory as a CLI argument:
npx @supermodeltools/mcp-server /path/to/repositoryTools will use this directory automatically if no explicit directory parameter is given.
Tools
symbol_context (Default Mode)
Deep dive on a specific function, class, or method. Given a symbol name, instantly returns its definition location, source code, all callers, all callees, domain membership, and related symbols in the same file.
Output includes:
Definition location (file, line range) and source code
Callers (who calls this symbol)
Callees (what this symbol calls)
Architectural domain membership
Related symbols in the same file
File import statistics
Parameters:
Argument | Type | Required | Description |
| string | No* | Name of the function, class, or method. Supports |
| string[] | No* | Array of symbol names for batch lookup. More efficient than multiple calls. |
| string | No | Path to repository directory. Omit if server was started with a default workdir. |
| boolean | No | Return compact output (no source code). Recommended for 3+ symbols. |
* Either symbol or symbols must be provided.
Example prompts:
"Look up the symbol
filter_querysetin this codebase""What calls
QuerySet.filterand what does it call?"
GraphRAG Mode (Experimental)
Activate with SUPERMODEL_EXPERIMENT=graphrag. Replaces symbol_context with a graph-oriented tool for call-graph traversal and cross-subsystem analysis.
explore_function
BFS traversal of a function, class, or method call graph. Shows source code, callers, callees, and cross-subsystem boundaries with ← DIFFERENT SUBSYSTEM markers.
Parameters:
Argument | Type | Required | Description |
| string | Yes | Function, class, or method name to explore. Supports partial matching and |
| string | No |
|
| number | No | Hops to follow: 1–3 (default: 2). |
| string | No | Repository path. |
Output: Readable narrative showing upstream/downstream neighbors with domain context at each hop.
Recommended Workflow
Default mode:
Identify symbols from the issue and call
symbol_contextto explore them (batch viasymbolsarray or parallel calls)Use Read/Grep to examine source code at identified locations
Start editing by turn 3. Max 3 MCP calls total.
GraphRAG mode:
Identify key symbols from the issue, call
explore_functionto understand their call-graph context. Issue multiple calls in parallel (read-only, safe).Use the cross-subsystem markers and source code from the response to start editing. Max 2 MCP calls total.
Pre-computed Graphs
For fastest performance, pre-compute graphs ahead of time using the precache CLI subcommand. This calls the Supermodel API once and saves the result to disk, enabling sub-second tool responses with no API calls at runtime.
Pre-compute a graph
npx @supermodeltools/mcp-server precache /path/to/repo --output-dir ./supermodel-cacheOptions:
--output-dir <dir>— Directory to save the cache file (default:./supermodel-cacheorSUPERMODEL_CACHE_DIR)--name <name>— Repository name for the cache key (default: auto-detected from git remote + commit hash)
Use cached graphs at runtime
SUPERMODEL_CACHE_DIR=./supermodel-cache npx @supermodeltools/mcp-serverThe server loads all cached graphs from SUPERMODEL_CACHE_DIR at startup. If no cache exists for a given repository, the server falls back to an on-demand API call (which takes 5-15 minutes for large repos).
Startup precaching
Use the --precache flag to automatically generate and cache the graph for the default workdir on server startup:
npx @supermodeltools/mcp-server /path/to/repo --precacheThis is useful in automated environments (e.g., Docker containers for benchmarking) where you want the graph ready before any tool calls.
Benchmarking
Benchmark this MCP server using mcpbr with the provided mcpbr-config.yaml configuration.
Local Development
Building from Source
git clone https://github.com/supermodeltools/mcp.git
cd mcp
npm install
npm run buildRunning Locally
node dist/index.js # Start MCP server
node dist/index.js /path/to/repo # With default workdir
node dist/index.js precache /path/to/repo # Pre-compute graphRunning Tests
npm test # Run all tests
npm run test:coverage # Run with coverage
npm run typecheck # Type checkingUsing MCP Inspector
For interactive testing, use the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsTroubleshooting
Timeout Errors
The first analysis of a repository requires an API call that can take 5-15 minutes. If your MCP client times out:
Pre-compute the graph — Use
precacheto generate the graph ahead of time (see Pre-computed Graphs)Increase your MCP client timeout — For Claude Code CLI, set
MCP_TOOL_TIMEOUT=900000in your shell profileAnalyze a subdirectory — Target specific parts of your codebase to reduce analysis time
Common Issues
401 Unauthorized: Check
SUPERMODEL_API_KEYis set correctlyPermission denied: Check read permissions on the directory
ENOTFOUND or connection errors: Check your internet connection and firewall settings
Debug Logging
Set the DEBUG environment variable for verbose logging:
{
"mcpServers": {
"supermodel": {
"command": "npx",
"args": ["-y", "@supermodeltools/mcp-server"],
"env": {
"SUPERMODEL_API_KEY": "your-api-key",
"DEBUG": "supermodel:*"
}
}
}
}Blog
Links
Available Tools
1 toolsymbol_contextARead-only
Strictly better than grep for understanding a function, class, or method. Given a symbol name, instantly returns its source code, definition location, all callers, all callees, architectural domain, and related symbols in the same file -- structural context that grep cannot reconstruct. Sub-second, zero cost, read-only. Supports partial matching ("filter" finds "QuerySet.filter", "filter_queryset", etc.) and "ClassName.method" syntax. You can issue multiple calls in parallel (read-only, no side effects) or batch symbols into one call via the "symbols" array.
Inputs: brief, symbol, symbols, directory.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of misselection or overlap with another tool. Its purpose (symbol-level structural context) is stated explicitly and contrasted with alternatives like grep.
The single name `symbol_context` is clean snake_case and describes its target resource and output well. With only one tool there is no pattern to verify, so consistency is trivially satisfied rather than demonstrated.
A one-tool surface is thin even for a focused utility; the server relies entirely on batching and parallel calls to compensate. It is well-scoped for what it does, but the surface is at the borderline of feeling under-provisioned.
For symbol-level understanding the coverage is strong (source, definition site, callers, callees, domain, related symbols), but the code-intelligence domain typically also needs file/module-level overviews or repo-wide navigation, which are absent. An agent hitting a non-symbol question has no fallback here.
Maintenance
Related MCP Connectors
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceSupercharges AI coding agents with a pre-indexed semantic code graph, enabling instant symbol relationships, impact analysis, and context retrieval across 20+ languages.211,518 npm79,337MIT
- AlicenseNot gradedqualityDmaintenanceSupercharges AI coding agents with semantic code intelligence, providing pre-built knowledge graphs for surgical context, faster answers, and fewer tool calls.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.4MIT
- FlicenseNot gradedqualityBmaintenanceProvides efficient code navigation and graph-based analysis for AI agents, enabling symbol resolution, callers, implementations, and type schemas with minimal token usage.-