mcp-cli
A command-line interface for the Model Context Protocol (MCP) to discover, inspect, and execute tools from MCP servers directly in your terminal.
Introduction
The mcp-cli utility acts as a bridge between the command line and Model Context Protocol (MCP) servers, enabling developers to interact with external systems, databases, and APIs without requiring a full IDE environment. By standardizing the way tools are discovered and invoked, it allows for seamless integration of agentic capabilities into shell workflows, CI/CD pipelines, and local development environments. It is designed for engineers who need to perform ad-hoc tasks, debug server responses, or script tool execution using standard command-line pipes.
-
Enables discovery of all available MCP servers and associated tool names.
-
Provides deep inspection of tool JSON schemas to understand required parameters before execution.
-
Supports direct tool execution from the CLI by passing arguments as JSON strings.
-
Offers advanced search capabilities via grep-like functionality to filter tools by name or purpose.
-
Includes flags for raw text output or structured JSON output, facilitating integration with command-line utilities like jq.
-
Use mcp-cli to list servers and tools to understand the current operational context.
-
Utilize JSON input schema inspection to debug and validate arguments before calling tools.
-
Combine with other command-line tools like jq or xargs to build complex automation chains, such as searching for files and then reading their content programmatically.
-
Ensure all tool arguments are provided in valid JSON format; use heredoc or pipe redirection for complex input payloads.
-
Note that exit codes are standardized: 0 for success, 1 for client-side configuration or argument errors, 2 for tool-specific failures, and 3 for network-related connectivity issues.
Repository Stats
- Stars
- 31,754
- Forks
- 3,847
- Open Issues
- 50
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 30, 2026, 12:45 PM