| name | mcpli |
| description | CLI tool for interacting with MCP (Model Context Protocol) servers. Use when invoking MCP tools, managing MCP servers, or working with MCP-based APIs. Triggers on "MCP server", "mcpli", "invoke MCP tool", or any MCP server interaction. |
mcpli
CLI that turns MCP servers into native commands with tab completion.
Core Commands
Add a server
mcpli add <name> <url> [--header "key: value"]...
Headers support environment variable expansion with ${VAR_NAME}:
mcpli add myserver https://example.com/mcp/ \
--header 'Authorization: Bearer ${API_TOKEN}'
List servers and tools
mcpli list
mcpli list <server>
Discover tools
mcpli <server> --help
mcpli <server> <tool> --help
Invoke a tool
mcpli <server> <tool> [json-arguments]
Examples:
mcpli myserver get_status
mcpli myserver search '{"query": "hello"}'
mcpli myserver create_item '{"name": "test", "count": 5}'
Manage servers
mcpli update <server>
mcpli remove <server>
Workflow
- Add server with
mcpli add (fetches and caches tools)
- Discover tools with
mcpli <server> --help
- Check tool parameters with
mcpli <server> <tool> --help
- Invoke tools with
mcpli <server> <tool> '{...}'
Notes
- Tool definitions are cached locally after
add; use update to refresh
- Config stored at
~/.config/mcpli/config.json
- Arguments must be valid JSON (use single quotes around JSON to avoid shell escaping issues)