mcpli
A command-line interface for interacting with MCP (Model Context Protocol) servers
claude mcp add --transport stdio juanibiapina-mcpli go install github.com/juanibiapina/mcpli/cmd/mcpli@latest \ --env GOBIN="Directory to install binaries; optional if GOPATH/bin is in PATH"
How to use
mcpli is a command-line tool that turns MCP servers and their available tools into a native CLI experience with tab completion and built-in help. It discovers servers you’ve added, caches their tool definitions locally, and exposes each server as a subcommand with its own set of tools. You can list all configured servers, inspect the tools for a specific server, and invoke a tool directly with JSON-encoded arguments when required. The tool-level help describes each command, its options, and usage details, enabling a discoverable, self-documented workflow similar to other CLIs you already know.
To start, install mcpli, add a server by providing its URL, and then explore the available tools. Once cached, you can invoke any tool via a simple command like mcpli <server> <tool> [json-arguments]. Completion will help you discover servers and tools as you type, and each tool supports a --help flag to reveal its full description and usage right in the CLI.
How to install
Prerequisites:
- A machine with Go installed and configured in your PATH to install the mcpli binary.
- (Optional) Homebrew if you prefer the quick install path on macOS/Linux.
Installation steps:
- Install via Go (recommended):
# Installs the mcpli CLI from the repository
go install github.com/juanibiapina/mcpli/cmd/mcpli@latest
- Verify installation:
mcpli --version
- (Optional) If you use macOS/Linux and prefer Homebrew:
brew install juanibiapina/taps/mcpli
- Add a server (example URL) to fetch and cache its tools:
mcpli add myserver https://example.com/mcp/
- List servers and explore tools:
mcpli --help
mcpli myserver --help
Additional notes
- mcpli caches tool definitions locally to avoid server round-trips for discovery.
- Server headers can reference environment variables using the ${VAR} syntax when adding a server.
- Ensure the server URL you add is the MCP endpoint exposing tools you want to use.
- If you run into completion issues, reload your shell or re-source the completion script as described in the Completion setup section of the README.
- The configuration file is stored at ~/.config/mcpli/config.json and contains server URLs, headers, and cached tool definitions.
Related MCP Servers
sandbox
A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
mcp-zero
Model Context Protocol (MCP) server for go-zero framework - Generate APIs, RPC services, and models with AI assistance.
hop
Fast, elegant SSH connection manager with a TUI dashboard and MCP server
interop
Interop CLI: Go command-line tool for efficient project management and command execution across your development workspace.
mcp4go
A comprehensive Go SDK for the Model Context Protocol (MCP) - simplifying AI application development by abstracting away protocol complexities.
mcp-tidy
CLI tool to visualize and manage MCP server configurations in Claude Code. List servers, analyze usage statistics, and clean up unused servers