Claude Code Explorer MCP

io.github.divu2025由 GitHub 帳號 divu2025 發布v1.1.0更新於 Oct 24, 2026

Explore the Claude Code CLI source — browse tools, commands, search code, and more.

發布方自己的服務:Claude Platform Docs

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理瀏覽、搜尋並閱讀 Claude Code CLI 原始碼樹、其中的工具、斜線指令與整體架構。

可以做什麼
列出 Claude Code 原始碼中定義的代理工具與斜線指令,並以資源形式提供註冊表,附有引導式說明與工具比較提示。讀取某個工具或指令的實作,或依相對路徑讀取原始碼目錄下的任意檔案,包括指定行範圍。對整個原始碼樹做正規表達式搜尋並列出目錄內容,以定位程式碼。取得程式碼庫架構總覽,並說明權限、MCP 用戶端、bridge 等子系統。
適用情境
適合讓助理回答 Claude Code 如何實作的問題、找出某個工具或指令的程式碼位置,或研究其權限與 MCP 子系統,而不必手動在大型程式碼庫中搜尋。
執行需求
需要 Node.js 以 stdio 方式在本機執行該 npm 套件,並需要一份本機 Claude Code 原始碼副本;原始碼路徑透過環境變數 CLAUDE_CODE_SRC_ROOT 指定。HTTP 與 SSE 模式使用 PORT,可選用 MCP_API_KEY。
安裝前請注意
HTTP 模式只有在設定了 MCP_API_KEY 時才有保護,未設定時端點沒有驗證,而 README 建議將其公開部署。伺服器會讀取所設定目錄中的原始碼檔案,請將 CLAUDE_CODE_SRC_ROOT 指向你願意讓助理存取的程式碼樹。README 中的品牌與套件名稱和登錄項目不一致,安裝前請確認是預期的套件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Claude Code Explorer MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

bash
cd mcp-servernpm installnpm run build

Run Locally (STDIO)

bash
npm start# or with custom source path:CLAUDE_CODE_SRC_ROOT=/path/to/src npm start

Run Locally (HTTP)

bash
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

bash
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):

json
{  "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:

json
{  "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:

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:

json
{  "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:

bash
railway initrailway up

Vercel

bash
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

bash
# From repo rootdocker 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:

bash
# Install the MCP Publisher CLIcurl -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
# Publishcd mcp-server../mcp-publisher publish

Registry name: warrioraashuu-codemaster

Development

bash
npm installnpm run dev    # Watch mode TypeScript compilationnpm run build  # Compile TypeScript to dist/npm start      # Run STDIO servernpm 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

來源:mcp-server/README.md,提交 eec3692

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Claude 整合