Skip to main content
The Claude Code Explorer MCP server exposes 8 tools and 5 prompt templates. Tools perform direct operations on the source tree; prompts are guided templates that wire tool output into structured AI-assisted explanations.

MCP tools

ToolDescription
list_toolsList all ~40 agent tools with their source file paths
list_commandsList all ~50 slash commands with their source file paths
get_tool_sourceRead the full source of any tool (e.g. BashTool, FileEditTool)
get_command_sourceRead the source of any slash command (e.g. review, mcp)
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_directoryList files and subdirectories under src/
get_architectureGenerate a high-level architecture overview from live source introspection

Tool details

Reads the implementation of a named tool directory under src/tools/.Required argument: toolName — the directory name, e.g. BashTool, FileEditTool, GrepTool.Optional argument: fileName — a specific file within the tool directory. If omitted, the server selects the main .ts or .tsx file automatically.
get_tool_source(toolName: "BashTool")
get_tool_source(toolName: "FileEditTool", fileName: "FileEditTool.ts")
Reads the implementation of a named slash command under src/commands/.Required argument: commandName — the command name without the leading /, e.g. commit, review, mcp.Optional argument: fileName — a specific file when the command is a directory. If omitted for a directory command, the server lists the files in that directory.
get_command_source(commandName: "review")
get_command_source(commandName: "mcp", fileName: "index.ts")
Reads any file under src/ by relative path. Supports an optional line range.Required argument: path — relative path from src/, e.g. QueryEngine.ts, services/mcp/index.ts.Optional arguments: startLine and endLine (1-based). Omit both to read the entire file.
read_source_file(path: "QueryEngine.ts", startLine: 1, endLine: 100)
read_source_file(path: "bridge/bridgeMain.ts")
Runs a regex search across the full source tree and returns matching lines with file paths and line numbers.Required argument: pattern — a regular expression string.Optional arguments:
  • filePattern — file extension filter, e.g. .ts to restrict to TypeScript files.
  • maxResults — maximum number of matches to return (default: 50).
search_source(pattern: "checkPermission", filePattern: ".ts")
search_source(pattern: "bypassPermissions", maxResults: 20)
Lists files and subdirectories under a src/ path. Directories are returned with a trailing /.Required argument: path — relative path from src/. Pass an empty string "" to list the src/ root.
list_directory(path: "")
list_directory(path: "bridge")
list_directory(path: "services/mcp")

MCP prompts

Prompts are guided templates. When invoked, the server loads relevant source files and returns a structured user message ready for an AI assistant to interpret.
PromptDescription
explain_toolDeep-dive into how a specific tool works: input schema, permissions, and execution flow
explain_commandUnderstand a slash command’s purpose, arguments, and implementation
architecture_overviewGuided tour of the full Claude Code architecture
how_does_it_workExplain any subsystem by name (e.g. permissions, MCP client, bridge, query engine)
compare_toolsSide-by-side comparison of two tools

Prompt arguments

PromptRequired arguments
explain_tooltoolName — e.g. BashTool, FileEditTool
explain_commandcommandName — e.g. commit, review, mcp
architecture_overview(none)
how_does_it_workfeature — e.g. permission system, MCP client, bridge, query engine, skills, tasks, voice
compare_toolstool1 and tool2 — both tool directory names

Example queries to try

Use the explain_tool prompt with toolName: "BashTool". The server loads src/tools/BashTool/BashTool.ts, lists all files in that directory, and returns a structured explanation prompt covering purpose, input schema, permissions, execution flow, and output format.
Use search_source with pattern: "checkPermission" or pattern: "bypassPermissions". The server returns up to 50 matching lines with file paths and line numbers across the entire src/ tree.You can also use the how_does_it_work prompt with feature: "permission system" for a guided explanation that pre-loads relevant files from src/utils/permissions/ and src/hooks/toolPermission/.
Use get_command_source with commandName: "review". If the command is a single file, the full source is returned. If it is a directory, the server lists the files and you can request a specific one with the fileName argument.Alternatively, use the explain_command prompt with commandName: "review" for an AI-assisted breakdown.
Use list_directory with path: "bridge". The server returns every file and subdirectory under src/bridge/, with directories marked by a trailing /.To understand what the bridge does, follow up with the how_does_it_work prompt using feature: "bridge".
Use read_source_file with path: "QueryEngine.ts", startLine: 1, and endLine: 100. Lines are returned with left-padded line numbers for easy reference.QueryEngine.ts is the core LLM API caller at ~46K lines — using line ranges is recommended for navigating it.

Build docs developers (and LLMs) love