mcp-inspector-cli
v1.2.4
Published
CLI tool to explore MCP servers
Downloads
704
Maintainers
Readme
MCP Inspector CLI
A command-line tool to inspect and interact with MCP (Model Context Protocol) servers.
mcp-inspector-cli connects to any MCP server and allows you to explore:
- Tools
- Resources
- Resource templates
- Prompts
- Query interactions
This tool is useful for debugging, testing, and exploring MCP servers without needing an AI agent.
Installation
You can run it directly using npx:
npx mcp-inspector-cli --server <mcp_server_url>Example:
npx mcp-inspector-cli --server http://localhost:3000/mcpOr install globally:
npm install -g mcp-inspector-cliThen run:
mcp-inspector-cli --server http://localhost:3000/mcpUsage
Start the CLI and connect to an MCP server.
mcp-inspector-cli --server http://localhost:3000/mcpOnce connected, the interactive menu appears:
What would you like to do?
❯ Query
Tools
Resources
Prompts
ExitFeatures
Query
Send queries to the MCP server and allow the server to trigger tool calls.
Tools
List available tools and invoke them with custom arguments.
Resources
Browse and read resources exposed by the MCP server.
Supports both:
- static resources
- resource templates
Prompts
List and execute prompts defined by the MCP server.
Example Workflow
- Connect to server
mcp-inspector-cli --server http://localhost:3000/mcpSelect Tools
Choose a tool
Provide input arguments
Execute the tool and inspect the response
Development
Clone the repository:
git clone https://github.com/Sandeep-Petwal/mcp-inspector-cli
cd mcp-inspector-cliInstall dependencies:
npm installRun locally:
npm run devBuild the CLI:
npm run buildLink locally for testing:
npm linkThen run:
mcp-inspector-cli --server http://localhost:3000/mcpProject Structure
src/
├── cli.ts
├── mcpClient.ts
└── handlers/
├── toolHandler.ts
├── resourceHandler.ts
├── promptHandler.ts
├── queryHandler.ts
└── shutdownHandler.tsRequirements
- Node.js 18+
- An MCP server endpoint
License
MIT
