Dr Strange — Claude Code MCP server: what it does, how to install
Dr Strange — an MCP server for Claude Code that builds a code graph of the repository so coding agents can query structure instead of reading raw files.
Apache-2.0 ★ 19 updated 2026-11-16
claude mcp add dr-strange -e DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsgWhat Dr Strange does
The engine parses code into a symbol graph and keeps it synced with commits through a background watcher. Agents use tools like context, impact, trace, wire and grep to inspect callers and callees in a single round trip.
It operates as an embedded graph database where embeddings are a first-class type alongside graph traversal. Setting up the server requires the DRSG_TOKEN environment variable and an active runtime via npx or the CLI tool.
What it helps with
- query callers and callees without opening source files
- assess what breaks when a function changes
- sync the code graph automatically on every commit
- run semantic search alongside graph traversal
Example prompts for the agent
- Ask the graph who calls this function
- Check what breaks if I change this module
- Trace the connection between these components
How to install Dr Strange
Platform CLI
claude mcp add dr-strange -e DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsgReplace <…> with your own values
Platform CLI
codex mcp add dr-strange --env DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsgReplace <…> with your own values
Config file
{
"mcpServers": {
"dr-strange": {
"command": "npx",
"args": [
"-y",
"@yingge/drsg"
],
"env": {
"DRSG_TOKEN": "<DRSG_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"dr-strange": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@yingge/drsg"
],
"env": {
"DRSG_TOKEN": "<DRSG_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e DRSG_TOKEN=<DRSG_TOKEN> dr-strange npx -y @yingge/drsgReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Dr Strange
How to install Dr Strange in Claude Code?
Run claude mcp add dr-strange -e DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsg.
What does Dr Strange do?
Dr Strange indexes a repository into a code graph and exposes tools for coding agents to resolve structural queries and impact analysis instantly.
What is required to run Dr Strange?
You need the DRSG_TOKEN environment variable and npx available in your environment.