概览
What is MCP-CLI?
MCP-CLI is a command-line tool for managing and interacting with MCP (Machine Conversation Protocol) servers. It enables users to view and call server Tools, view Prompts and Resources, and invoke tools through an interactive shell.
How to use MCP-CLI?
Install with go install github.com/yourusername/mcp-cli@latest, then create a configuration file at ~/.mcp-cli.json listing MCP servers. Launch the tool with commands like mcp-cli server list to list servers or mcp-cli server inspect -n <name> to enter an interactive shell for a specific server.
Key features of MCP-CLI
- Manage multiple MCP servers
- Interactive command-line interface
- View and call server Tools
- View server Prompts and Resources
- Support for tool invocation
Use cases of MCP-CLI
- Inspect available tools on a remote MCP server
- Test tool calls interactively before integrating into workflows
- List all configured MCP servers and their arguments
- Discover prompts and resources exposed by a server
FAQ from MCP-CLI
How do I install MCP-CLI?
Install using Go: go install github.com/yourusername/mcp-cli@latest.
How do I configure MCP-CLI?
Create a JSON configuration file at ~/.mcp-cli.json with a mcpServers object mapping server names to their command and args.
What interactive commands are available in the shell?
Inside the interactive shell, use tools to list tools, prompts for prompts, resources for resources, call <tool-name> <json-params> to invoke a tool, help for help, and exit to quit.
Can I list all configured servers?
Yes, run mcp-cli server list to display a table of server names, commands, and args.
How do I inspect a specific server?
Run mcp-cli server inspect -n <server-name> to enter an interactive shell for that server, showing its tools, prompts, and resources.