Skip to main content
The 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

The fastest option — no repository clone required:
claude mcp add claude-code-explorer -- npx -y claude-code-explorer-mcp
Restart your Claude Code session to activate the server.

Available tools

ToolDescription
list_toolsList all 40+ agent tools (BashTool, FileEditTool, etc.) with their source files
list_commandsList all 50+ slash commands (/commit, /review, etc.) with their source files
get_tool_sourceRead the full source of a specific tool implementation
get_command_sourceRead the source of a specific slash command
read_source_fileRead any file from src/ by relative path, with optional line range
search_sourceRegex search across the entire source tree with optional file extension filter
list_directoryBrowse directories under src/
get_architectureGet 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.
PromptArgumentsDescription
explain_tooltoolNameDeep-dive into a tool’s purpose, input schema, permissions, and execution flow
explain_commandcommandNameExplain a slash command’s behavior and implementation
architecture_overviewGuided tour of the full Claude Code architecture
how_does_it_workfeatureExplain any subsystem: "permission system", "MCP client", "bridge", etc.
compare_toolstool1, tool2Side-by-side comparison of two tools

Resources

The server also exposes static MCP resources:
URIDescription
claude-code://architectureREADME / architecture overview (Markdown)
claude-code://toolsTool registry as JSON
claude-code://commandsCommand registry as JSON
claude-code://source/{path}Any source file by path (template)

Transports

TransportHow to startBest for
STDIOnode dist/index.jsClaude Desktop, local Claude Code, VS Code
Streamable HTTPnode dist/http.jsPOST/GET /mcpModern MCP clients, remote hosting
Legacy SSEnode dist/http.jsGET /sseOlder MCP clients
To run the HTTP server locally:
cd mcp-server
npm run start:http
# Streamable HTTP at http://localhost:3000/mcp
# Legacy SSE at http://localhost:3000/sse
# Health check at http://localhost:3000/health

Custom source path

By default, the server resolves src/ relative to its own dist/ directory. Override this with the CLAUDE_CODE_SRC_ROOT environment variable:
# Custom path via environment variable
claude mcp add claude-code-explorer \
  -e CLAUDE_CODE_SRC_ROOT=/path/to/claude-code/src \
  -- node /path/to/claude-code/mcp-server/dist/index.js

Remove the server

claude mcp remove claude-code-explorer

Environment variables

VariableDefaultDescription
CLAUDE_CODE_SRC_ROOT../src relative to dist/Path to the Claude Code src/ directory
PORT3000HTTP 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:
{
  "mcpServers": {
    "claude-code-explorer": {
      "url": "https://your-deployment.example.com/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-key"
      }
    }
  }
}
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.

Build docs developers (and LLMs) love