READMEmain
We couldn't render this README. Read it on GitHub
MCP Inspector CLI
A command-line interface for the Model Context Protocol (MCP) Inspector.
Installation
npm install -g mcp-inspector-cli
Usage
Connect to an MCP Server
Connect to a local MCP server via STDIO:
mcp-inspector-cli connect --transport stdio --command node --args "your-server.js"
Connect to a remote MCP server via SSE:
mcp-inspector-cli connect --transport sse --url "http://example.com/sse" --bearer-token "your-token"
Interactive Mode
Start in interactive mode for a more user-friendly experience:
mcp-inspector-cli interactive
Or simply:
mcp-inspector-cli i
Resources
List available resources:
mcp-inspector-cli resources list
Read a specific resource:
mcp-inspector-cli resources read "resource-uri"
List resource templates:
mcp-inspector-cli resources templates
Prompts
List available prompts:
mcp-inspector-cli prompts list
Get a specific prompt:
mcp-inspector-cli prompts get "prompt-name" --arg "param1=value1" --arg "param2=value2"
Tools
List available tools:
mcp-inspector-cli tools list
Call a specific tool:
mcp-inspector-cli tools call "tool-name" --param "param1=value1" --json-param "param2={'key':'value'}"
Ping
Ping the MCP server:
mcp-inspector-cli ping
Interactive Mode Commands
When in interactive mode, the following commands are available:
help: Show available commandsexit,quit: Exit interactive modecapabilities: Show server capabilitiesping: Ping the serverresources: List available resourcesread <uri>: Read a specific resourcetemplates: List resource templatestemplate <name>: Use a resource templatesubscribe <uri>: Subscribe to resource updatesunsubscribe <uri>: Unsubscribe from resource updatesprompts: List available promptsprompt <name>: Get a specific prompttools: List available toolstool <name>: Call a specific toolroots: List current rootsroots add <uri>: Add a root directoryroots remove <index>: Remove a root directoryroots update: Apply root changeslog level: Show current log levellog level <level>: Set log level (debug, info, warn, error)
Authentication
For SSE connections, you can provide a bearer token for authentication:
mcp-inspector-cli connect --transport sse --url "http://example.com/sse" --bearer-token "your-token"
Environment Variables
For STDIO connections, you can provide environment variables as JSON:
mcp-inspector-cli connect --transport stdio --command node --args "your-server.js" --env '{"VAR1":"value1","VAR2":"value2"}'
License
MIT
