| name | mcp-cli |
| description | Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers. |
MCP-CLI
Access MCP servers through the command line. MCP enables interaction with
external systems like GitHub, filesystems, databases, and APIs.
Commands
| Command | Output |
|---|
mcp-cli | List all servers and tool names |
mcp-cli info <server> | Show tools with parameters |
mcp-cli info <server>/<tool> | Get tool JSON schema |
mcp-cli call <server>/<tool> '<json>' | Call tool with arguments |
mcp-cli grep "<glob>" | Search tools by name |
Add -d to include descriptions (e.g., mcp-cli info filesystem -d)
Workflow
- Discover:
mcp-cli → see available servers and tools
- Explore:
mcp-cli info <server> → see tools with parameters
- Inspect:
mcp-cli info <server>/<tool> → get full JSON input schema
- Execute:
mcp-cli call <server>/<tool> '<json>' → run with arguments
Examples
mcp-cli
mcp-cli info filesystem
mcp-cli info filesystem -d
mcp-cli info filesystem/read_file
mcp-cli call filesystem/read_file '{"path": "./README.md"}'
mcp-cli grep "*file*"
mcp-cli call server/tool <<EOF
{"content": "Text with 'quotes' inside"}
EOF
cat args.json | mcp-cli call server/tool
Options
| Flag | Purpose |
|---|
-d | Include descriptions |
Exit Codes
0: Success
1: Client error (bad args, missing config)
2: Server error (tool failed)
3: Network error