mcp-cli is a lightweight, Bun-based command-line interface (CLI) tool that simplifies how developers discover, inspect, and interact with Model Context Protocol (MCP) servers from the terminal. The Model Context Protocol is an emerging open standard for connecting language models and external tools, and mcp-cli helps mitigate common pain points like context window bloat by dynamically discovering MCP servers and reducing token load during interactions. It’s designed to be fast and shell-friendly, compiling to a single standalone binary and producing machine-readable output (e.g., JSON) that plays well with other CLI tooling like jq and standard piping. mcp-cli supports both stdio and HTTP-based MCP servers, connection pooling with a lazy-spawn daemon to keep connections warm, and flexible tool filtering via easy configuration options.
Features
- Lightweight CLI for MCP server interaction
- Compiles to a single standalone binary
- JSON-friendly output for scripting
- Supports both stdio and HTTP MCP servers
- Connection pooling with lazy-spawn daemon
- Configurable tool filtering by server