# Dr Strange

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 19 repo stars
- Author: wangyingsm
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wangyingsm/dr-strange
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — warning: a command downloads a script from raw.githubusercontent.com and runs it right away; a PowerShell command downloads a script from raw.githubusercontent.com and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/dr-strange

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `DRSG_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add dr-strange -e DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsg
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add dr-strange --env DRSG_TOKEN=<DRSG_TOKEN> -- npx -y @yingge/drsg
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "dr-strange": {
            "command": "npx",
            "args": [
                "-y",
                "@yingge/drsg"
            ],
            "env": {
                "DRSG_TOKEN": "<DRSG_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "dr-strange": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@yingge/drsg"
            ],
            "env": {
                "DRSG_TOKEN": "<DRSG_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e DRSG_TOKEN=<DRSG_TOKEN> dr-strange npx -y @yingge/drsg
```
Replace <…> with your own values

## When to use it
- 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
- Ask the graph who calls this function
- Check what breaks if I change this module
- Trace the connection between these components

## Similar
- [doctor-strange](https://affpapa.org/en/nevibecode/skills/doctor-strange.md) — skill · 212 installs
- [graph-the-network](https://affpapa.org/en/nevibecode/skills/graph-the-network.md) — skill · 1800 installs
- [State Memory MCP](https://affpapa.org/en/nevibecode/mcp/state-memory-mcp.md) — MCP server · ★ 44 repo stars
- [cruxible-core](https://affpapa.org/en/nevibecode/mcp/cruxible-core.md) — MCP server · ★ 18 repo stars
- [Echo Memory](https://affpapa.org/en/nevibecode/mcp/echo-memory.md) — MCP server · ★ 2 repo stars
- [engrava](https://affpapa.org/en/nevibecode/mcp/engrava.md) — MCP server · ★ 1 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
