claude-code-explorer-mcp package is an MCP server that exposes 8 tools, 3 resources, and 5 prompts for navigating the ~1,900-file, 512K+ line Claude Code codebase. It supports STDIO, Streamable HTTP, and SSE transports.
Connect it to Claude Code, Claude Desktop, VS Code Copilot, or Cursor and ask questions like:
- “How does the BashTool work?”
- “Search for where permissions are checked”
- “Show me the /review command source”
- “Explain the permission system”
Installation
- Claude Code (npm)
- Claude Code (from source)
- VS Code
- Claude Desktop
- Cursor
The fastest option — no repository clone required:Restart your Claude Code session to activate the server.
Available tools
| Tool | Description |
|---|---|
list_tools | List all 40+ agent tools (BashTool, FileEditTool, etc.) with their source files |
list_commands | List all 50+ slash commands (/commit, /review, etc.) with their source files |
get_tool_source | Read the full source of a specific tool implementation |
get_command_source | Read the source of a specific slash command |
read_source_file | Read any file from src/ by relative path, with optional line range |
search_source | Regex search across the entire source tree with optional file extension filter |
list_directory | Browse directories under src/ |
get_architecture | Get a high-level architecture overview with tool and command counts |
Available prompts
Prompts are guided templates that instruct your AI assistant to produce structured explanations.| Prompt | Arguments | Description |
|---|---|---|
explain_tool | toolName | Deep-dive into a tool’s purpose, input schema, permissions, and execution flow |
explain_command | commandName | Explain a slash command’s behavior and implementation |
architecture_overview | — | Guided tour of the full Claude Code architecture |
how_does_it_work | feature | Explain any subsystem: "permission system", "MCP client", "bridge", etc. |
compare_tools | tool1, tool2 | Side-by-side comparison of two tools |
Resources
The server also exposes static MCP resources:| URI | Description |
|---|---|
claude-code://architecture | README / architecture overview (Markdown) |
claude-code://tools | Tool registry as JSON |
claude-code://commands | Command registry as JSON |
claude-code://source/{path} | Any source file by path (template) |
Transports
| Transport | How to start | Best for |
|---|---|---|
| STDIO | node dist/index.js | Claude Desktop, local Claude Code, VS Code |
| Streamable HTTP | node dist/http.js → POST/GET /mcp | Modern MCP clients, remote hosting |
| Legacy SSE | node dist/http.js → GET /sse | Older MCP clients |
Custom source path
By default, the server resolvessrc/ relative to its own dist/ directory. Override this with the CLAUDE_CODE_SRC_ROOT environment variable:
Remove the server
Environment variables
| Variable | Default | Description |
|---|---|---|
CLAUDE_CODE_SRC_ROOT | ../src relative to dist/ | Path to the Claude Code src/ directory |
PORT | 3000 | HTTP server port (HTTP mode only) |
MCP_API_KEY | (none) | Bearer token for HTTP auth (optional) |
Remote HTTP configuration
For clients connecting to a remotely hosted instance:The MCP server is published as
claude-code-explorer-mcp on npm and registered at io.github.nirholas/claude-code-explorer-mcp in the MCP Registry.