mcpField
C
Claude Code Explorer MCP

Claude Code Explorer MCP

Local
github.com/codeaashuDeveloper Tools3.4kUpdated 2w ago

About Claude Code Explorer MCP

Claude Code Explorer MCP is a standalone MCP server that lets MCP clients browse the source code of the Claude Code CLI. It suits developers who want to study Claude Code's tools, commands and architecture, and it supports STDIO, Streamable HTTP and SSE transports.

Key features

  1. 01List agent tools and slash commands
  2. 02Read source of tools and commands
  3. 03Regex search across the source tree
  4. 04Architecture overview and directory listing
  5. 05Prompt templates explaining tools and subsystems
  6. 06Optional bearer token authentication

Use cases

  1. 01Studying how a specific Claude Code tool is implemented
  2. 02Locating code for subsystems such as permission checks
  3. 03Getting a quick view of Claude Code architecture from an MCP client

MCP support

This project is an MCP server that exposes 8 tools, 3 resources and 5 prompts to MCP clients for exploring the Claude Code source code.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"divu2025-codemaster": {
"command": "npx",
"args": [
"-y",
"@divyesh2000/codemaster"
]
}
}
}
Run commandnpx -y @divyesh2000/codemaster

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@divyesh2000/codemaster1.1.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

warrioraashuu Codemaster — MCP Server

A standalone Model Context Protocol (MCP) server that lets any MCP-compatible client explore the Claude Code source code. Rebranded and published by warrioraashuu. Supports STDIO, Streamable HTTP, and SSE transports.

What It Does

Exposes 8 tools, 3 resources, and 5 prompts for navigating the ~1,900-file, 512K+ line Claude Code codebase. This is the official npm package: warrioraashuu-codemaster.

Transports
TransportEndpointBest For
STDIOnode dist/index.jsClaude Desktop, local Claude Code, VS Code
Streamable HTTPPOST/GET /mcpModern MCP clients, remote hosting
Legacy SSEGET /sse + POST /messagesOlder MCP clients
Tools
ToolDescription
list_toolsList all 40+ agent tools (BashTool, FileEditTool, etc.)
list_commandsList all 50+ slash commands (/commit, /review, etc.)
get_tool_sourceRead a specific tool's implementation
get_command_sourceRead a specific command's implementation
read_source_fileRead any file from src/ by relative path
search_sourceRegex search across the entire source tree
list_directoryList contents of any directory under src/
get_architectureGet a full architecture overview
Resources
URIDescription
claude-code://architectureREADME / architecture overview
claude-code://toolsTool registry (JSON)
claude-code://commandsCommand registry (JSON)
claude-code://source/{path}Any source file (template)
Prompts
PromptDescription
explain_toolDeep-dive explanation of a specific tool's purpose, schema, permissions, and flow
explain_commandExplanation of a specific slash command's behavior and implementation
architecture_overviewGuided tour of the full Claude Code architecture
how_does_it_workExplain a feature/subsystem (permissions, MCP, bridge, etc.)
compare_toolsSide-by-side comparison of two tools

Setup

cd mcp-server
npm install
npm run build
Run Locally (STDIO)
npm start
# or with custom source path:
CLAUDE_CODE_SRC_ROOT=/path/to/src npm start
Run Locally (HTTP)
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
With Authentication
MCP_API_KEY=your-secret-token npm run start:http
# Clients must include: Authorization: Bearer your-secret-token

Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "warrioraashuu-codemaster": {
      "command": "node",
      "args": ["/absolute/path/to/claude-code/mcp-server/dist/index.js"],
      "env": {
        "CLAUDE_CODE_SRC_ROOT": "/absolute/path/to/claude-code/src"
      }
    }
  }
}
VS Code (GitHub Copilot)

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "claude-code-explorer": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/mcp-server/dist/index.js"],
      "env": {
        "CLAUDE_CODE_SRC_ROOT": "${workspaceFolder}/src"
      }
    }
  }
}
Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "claude-code-explorer": {
      "command": "node",
      "args": ["/absolute/path/to/claude-code/mcp-server/dist/index.js"],
      "env": {
        "CLAUDE_CODE_SRC_ROOT": "/absolute/path/to/claude-code/src"
      }
    }
  }
}

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 Client Configuration

For Claude Desktop connecting to a remote server:

{
  "mcpServers": {
    "claude-code-explorer": {
      "url": "https://your-deployment.railway.app/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-key"
      }
    }
  }
}

Deployment

Railway
  1. Connect your GitHub repo to Railway
  2. Railway automatically detects the mcp-server/Dockerfile
  3. Set environment variables in the Railway dashboard:
    • MCP_API_KEY — a secret bearer token
    • PORT is set automatically by Railway
  4. Deploy — available at your-app.railway.app

Or via CLI:

railway init
railway up
Vercel
npx vercel

Set environment variables in the Vercel dashboard:

  • CLAUDE_CODE_SRC_ROOT — path where src/ files are bundled
  • MCP_API_KEY — bearer token

Note: Vercel functions are stateless with execution time limits (10s hobby / 60s pro). Best for simple tool calls. For persistent SSE streams, use Railway or Docker.

Docker
# From repo root
docker build -f mcp-server/Dockerfile -t claude-code-mcp .
docker run -p 3000:3000 -e MCP_API_KEY=your-secret claude-code-mcp

Works on any Docker host: Fly.io, Render, AWS ECS, Google Cloud Run, etc.

Prompts

The server also exposes prompt templates for guided exploration:

PromptDescription
explain_toolDeep-dive explanation of a specific tool (input schema, permissions, execution flow)
explain_commandExplain how a slash command works
architecture_overviewGuided tour of the entire Claude Code architecture
how_does_it_workExplain a feature or subsystem (e.g. "permission system", "MCP client", "query engine")
compare_toolsSide-by-side comparison of two tools

Example Usage

Once connected, you can ask your AI assistant things like:

  • "List all Claude Code tools"
  • "Show me the BashTool implementation"
  • "Search for how permissions are checked"
  • "What files are in the bridge directory?"
  • "Read the QueryEngine.ts file, lines 1-100"
  • "How does the MCP client connection work?"
  • Use the explain_tool prompt with "FileEditTool" to get a full breakdown
  • Use how_does_it_work with "bridge" to understand IDE integration

Publishing to MCP Registry

This server is published to the MCP Registry via GitHub Actions. On a tagged release (v*), the workflow:

  1. Publishes the npm package to npmjs.org
  2. Authenticates with the MCP Registry using GitHub OIDC
  3. Publishes the server.json metadata to the registry

To publish manually:

# Install the MCP Publisher CLI
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher

# Authenticate (GitHub OAuth)
./mcp-publisher login github

# Publish
cd mcp-server
../mcp-publisher publish

Registry name: warrioraashuu-codemaster

Development

npm install
npm run dev    # Watch mode TypeScript compilation
npm run build  # Compile TypeScript to dist/
npm start      # Run STDIO server
npm run start:http  # Run HTTP server

Architecture

mcp-server/
├── src/
│   ├── server.ts    — Shared MCP server (tools, resources, prompts) — transport-agnostic
│   ├── index.ts     — STDIO entrypoint (local)
│   └── http.ts      — HTTP + SSE entrypoint (remote)
├── api/
│   ├── index.ts     — Vercel serverless function
│   └── vercelApp.ts — Express app for Vercel
├── Dockerfile       — Docker build (Railway, Fly.io, etc.)
├── railway.json     — Railway deployment config
├── package.json
└── tsconfig.json

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.