Inspector is a visual testing tool for Model Context Protocol (MCP) servers, maintained by the modelcontextprotocol organization on GitHub. It is published as an npm package, @modelcontextprotocol/inspector, and provides four ways to inspect MCP servers.
Four inspection methods
- Web: A Vite + React + Mantine single-page application, paired with a Node backend.
- CLI: A scriptable command-line client for automation, CI, and fast agent feedback loops.
- TUI: An interactive terminal interface built with Ink.
- mcpdo (experimental): A connected CLI - after connecting once, it runs multiple commands against named connections through an implicit local daemon; see clients/mcpdo for details.
The first three methods run through a global mcp-inspector binary; mcpdo is the second binary in the same package.
Secret management
Inspector manages secrets, including OAuth tokens, OAuth client secrets, and stdio env: values. By default, if an OS keychain is available, these secrets are stored in the keychain. On machines without a keychain - for example Linux without libsecret or Secret Service, headless and SSH sessions, Termux, and containers with mounted volumes - they are saved to ~/.mcp-inspector/secrets.json, unencrypted unless you provide a key. For how to restore the keychain, encrypt that file, or keep secrets only in memory, see "Where secrets are stored".
Version status
This repository is the v2 product line of Inspector. Active development happens on v2/main (the develop branch, which all v2 PRs target), and is merged into main at milestone releases; main is the default branch, holds the latest released v2, and publishes to the npm latest tag. The legacy v1 product line is on v1/main - it provides only security fixes and publishes directly from that branch to the npm v1-latest tag (npx @modelcontextprotocol/inspector@v1-latest). Branch and board conventions are in AGENTS.md.
To upgrade from v1, read the v1 → v2 migration guide, which covers CLI flags, the new --config and --catalog split, the Node engine version bump, and what is no longer shipped with the package.
Quick start (development)
Requires Node >=22.19.0.
For day-to-day web iteration, run Vite directly—fast HMR, no launcher build needed. Launcher-driven scripts run the built launcher, so they require a build first.
v2 is not an npm workspace—each client under clients/* keeps its own package.json and node_modules, with shared code in core/, used via the @inspector/core build-time alias. Every runtime dependency imported by core/ is declared once in the repository root package.json, and each client declares only what that client itself uses—its UI stack, its bundler-inlined packages, its dev tooling—which leaves clients/cli and clients/launcher themselves with no runtime dependencies. The rules for adding dependencies (root vs client, dependencies vs devDependencies, bundler external lists) are in the local-dev skill.
Each client has its own README with client-specific details: web · cli · mcpdo · tui · launcher.
Tests and quality gates
Each client self-validates in its own directory; root scripts chain them together. There is no aggregated root test script. npm run local:gate chains all of the following checks, plus smokes and Storybook tests. The Tests and quality gates section owns the stage list and explains what each stage covers and why a stage only runs locally; the testing rules themselves are in AGENTS.md.
Contributing
AGENTS.md is the contract for modifying this codebase, and it applies equally to humans and AI agents. It is not agent-only boilerplate—it contains the project's real rules: version/tag conventions, TypeScript and Mantine/React standards, test and coverage requirements, and the mandatory pre-push gate. Read it before making changes, and keep it up to date when you change structure, tooling, or rules.
The flows in the repository—multi-step recipes with commands and live IDs—are in .claude/skills/, one directory per flow, so they are loaded only when a task needs them. They are ordinary committed Markdown: agents that do not understand skills can still read them, and AGENTS.md has an index of what exists. Claude Code users can invoke them by name (/release, /issue-triage, etc.).
CLAUDE.md is the entry point auto-loaded by Claude Code; it includes AGENTS.md, so agents and humans work from the same source of truth. If you use another agent that reads AGENTS.md, you get the same rules.
One key rule worth emphasizing here: all work is issue-driven. Before starting, find or create a tracking issue on the v2 project board; submit a PR to v2/main and use Closes #<issue>. External contributions are accepted as issues rather than pull requests—see CONTRIBUTING.md.
License
See LICENSE. The MCP project is transitioning from the MIT License to Apache-2.0: new code contributions are licensed under Apache-2.0, documentation (excluding the specification) is licensed under CC-BY-4.0, and contributions originally licensed by authors under MIT who did not agree to relicensing remain MIT. The file contains the full Apache-2.0 and MIT texts and links to the CC-BY-4.0 legal code.