Mirror of https://github.com/modelcontextprotocol/inspector — Visual testing tool for MCP servers
  • TypeScript 90.8%
  • JavaScript 8.8%
  • CSS 0.2%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-02-14 07:44:50 -07:00
.github/workflows run prettier check in CI 2025-01-09 11:01:28 -08:00
bin respond to PR feedback 2025-01-10 07:51:55 -08:00
client Fix formatting 2025-02-14 07:33:37 -07:00
server Revert package change 2025-02-14 07:44:50 -07:00
.gitattributes Switch to npm 2024-10-28 10:48:41 +00:00
.gitignore fix type errors 2024-10-16 16:22:14 -07:00
.npmrc Pull SDK from npm 2024-11-11 16:28:51 +00:00
.prettierignore run prettier 2025-01-09 11:01:35 -08:00
.prettierrc init root 2024-10-07 16:28:11 -07:00
CODE_OF_CONDUCT.md Add code of conduct 2024-11-18 15:32:16 +00:00
CONTRIBUTING.md Clarify testing and submission steps 2024-11-20 16:02:21 +00:00
LICENSE Update LICENSE 2024-11-18 22:24:35 +00:00
mcp-inspector.png clarify readme 2024-11-25 17:00:04 -05:00
package-lock.json Update package lock 2025-02-14 07:23:19 -07:00
package.json Format fixes 2025-02-12 18:10:25 +00:00
README.md Update README.md 2025-02-12 12:26:41 -05:00
SECURITY.md Update SECURITY.md 2024-11-19 16:49:04 +00:00

MCP Inspector

The MCP inspector is a developer tool for testing and debugging MCP servers.

MCP Inspector Screenshot

Running the Inspector

From an MCP server repository

To inspect an MCP server implementation, there's no need to clone this repo. Instead, use npx. For example, if your server is built at build/index.js:

npx @modelcontextprotocol/inspector node build/index.js

You can pass both arguments and environment variables to your MCP server. Arguments are passed directly to your server, while environment variables can be set using the -e flag:

# Pass arguments only
npx @modelcontextprotocol/inspector build/index.js arg1 arg2

# Pass environment variables only
npx @modelcontextprotocol/inspector -e KEY=value -e KEY2=$VALUE2 node build/index.js

# Pass both environment variables and arguments
npx @modelcontextprotocol/inspector -e KEY=value -e KEY2=$VALUE2 node build/index.js arg1 arg2

# Use -- to separate inspector flags from server arguments
npx @modelcontextprotocol/inspector -e KEY=$VALUE -- node build/index.js -e server-flag

The inspector runs both a client UI (default port 5173) and an MCP proxy server (default port 3000). Open the client UI in your browser to use the inspector. You can customize the ports if needed:

CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js

For more details on ways to use the inspector, see the Inspector section of the MCP docs site. For help with debugging, see the Debugging guide.

From this repository

If you're working on the inspector itself:

Development mode:

npm run dev

Production mode:

npm run build
npm start

License

This project is licensed under the MIT License—see the LICENSE file for details.