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 # List all configured servers
mcpli list <server> # List tools for a server
Discover tools
mcpli <server> --help # See all tools on a server
mcpli <server> <tool> --help # See tool description and usage
Invoke a tool
mcpli <server> <tool> [json-arguments]
Examples:
mcpli myserver get_status # No arguments
mcpli myserver search '{"query": "hello"}' # With JSON arguments
mcpli myserver create_item '{"name": "test", "count": 5}'
Manage servers
mcpli update <server> # Refresh cached tool definitions
mcpli remove <server> # Remove a configured 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; useupdateto refresh - Config stored at
~/.config/mcpli/config.json - Arguments must be valid JSON (use single quotes around JSON to avoid shell escaping issues)