npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-code-explorer-mcp

v1.1.0

Published

MCP server for exploring the Claude Code source code — STDIO, HTTP, and SSE transports

Readme

Claude Code Explorer — MCP Server

A standalone Model Context Protocol (MCP) server that lets any MCP-compatible client explore the Claude Code source code.

What It Does

Exposes 7 tools, 3 resources, and 5 prompts for navigating the ~1,900-file, 512K+ line Claude Code codebase:

Tools

| Tool | Description | |------|-------------| | list_tools | List all 40+ agent tools (BashTool, FileEditTool, etc.) | | list_commands | List all 50+ slash commands (/commit, /review, etc.) | | get_tool_source | Read a specific tool's implementation | | get_command_source | Read a specific command's implementation | | read_source_file | Read any file from src/ by relative path | | search_source | Regex search across the entire source tree | | list_directory | List contents of any directory under src/ | | get_architecture | Get a full architecture overview |

Resources

| URI | Description | |-----|-------------| | claude-code://architecture | README / architecture overview | | claude-code://tools | Tool registry (JSON) | | claude-code://commands | Command registry (JSON) | | claude-code://source/{path} | Any source file (template) |

Prompts

| Prompt | Description | |--------|-------------| | explain_tool | Deep-dive explanation of a specific tool's purpose, schema, permissions, and flow | | explain_command | Explanation of a specific slash command's behavior and implementation | | architecture_overview | Guided tour of the full Claude Code architecture | | how_does_it_work | Explain a feature/subsystem (permissions, MCP, bridge, etc.) | | compare_tools | Side-by-side comparison of two tools |

Setup

cd mcp-server
npm install
npm run build

Configuration

Claude Desktop

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

{
  "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"
      }
    }
  }
}

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

| Variable | Default | Description | |----------|---------|-------------| | CLAUDE_CODE_SRC_ROOT | ../src (relative to dist/) | Path to the Claude Code src/ directory |

Prompts

The server also exposes prompt templates for guided exploration:

| Prompt | Description | |--------|-------------| | explain_tool | Deep-dive explanation of a specific tool (input schema, permissions, execution flow) | | explain_command | Explain how a slash command works | | architecture_overview | Guided tour of the entire Claude Code architecture | | how_does_it_work | Explain a feature or subsystem (e.g. "permission system", "MCP client", "query engine") | | compare_tools | Side-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: io.github.nirholas/claude-code-explorer-mcp

Development

npm install
npm run dev    # Run directly with tsx (no build needed)
npm run build  # Compile TypeScript to dist/
npm start      # Run compiled server