Skip to main content
The mcp-server/ directory in this repository ships a standalone Model Context Protocol server called claude-code-explorer-mcp. It exposes the ~1,900-file, 512K+ line Claude Code source as a live, queryable workspace — no manual grep or file browsing required. Any MCP-compatible client can connect and immediately start exploring tools, commands, and subsystems through a structured API.

What it enables

Connect once and you can:
  • List all ~40 agent tools with their source file paths
  • List all ~50 slash commands with their source file paths
  • Read full source of any tool or command by name
  • Search across the entire codebase with regex patterns
  • Browse src/ directories interactively
  • Get a high-level architecture overview generated from live source introspection
The server exposes 8 tools, 3 resources, and 5 guided prompt templates. See Available Tools & Prompts for the full reference.

Compatible clients

Claude Code (from npm)

The fastest path. One command, no cloning required — install directly from the published npm package claude-code-explorer-mcp.

Claude Code (from source)

Clone the repo, build locally, and register the server with Claude Code for full control over the source path.

Claude Desktop

Add the server to claude_desktop_config.json on macOS or Windows using absolute paths.

VS Code Copilot

Add a .vscode/mcp.json entry to your workspace to connect VS Code GitHub Copilot to the explorer server.
Cursor is also supported — it uses the same JSON config format as Claude Desktop. See the setup page for all configurations.

Transport support

The server supports three transports depending on how you run it:
TransportEntrypointBest for
STDIOnode dist/index.jsClaude Desktop, Claude Code, VS Code
Streamable HTTPPOST/GET /mcpModern MCP clients, remote hosting
Legacy SSEGET /sse + POST /messagesOlder MCP clients
The local STDIO transport (dist/index.js) is what all client config examples on the setup page use.

Source path configuration

The server locates the Claude Code source via the CLAUDE_CODE_SRC_ROOT environment variable. If unset, it defaults to ../src relative to dist/ — which resolves correctly when you clone the full repo.
If you install from npm and point to a separate source checkout, set CLAUDE_CODE_SRC_ROOT explicitly. See MCP Server Setup for the exact flag syntax.

Published package

The server is published to npm as claude-code-explorer-mcp (version 1.1.0). It is also registered in the MCP Registry under the name io.github.nirholas/claude-code-explorer-mcp.

Build docs developers (and LLMs) love