The mcp-tools-cli repository provides a command-line interface for interacting with Model Context Protocol (MCP) servers, allowing users to list available tools and call specific tools with optional arguments using a configuration file.
This is a command-line client designed for interacting with Model Context Protocol (MCP) servers.
Install mcp-tools-cli using pip:
pip install mcp-tools-cliThe client relies on a mcp_config.json file to store MCP server connection details. This file defines the servers, their execution commands, arguments, and environment variables. An example configuration is:
{
"mcpServers": {
"time": {
"command": "python",
"args": ["-m", "mcp_server_time", "--local-timezone=America/New_York"]
}
}
}mcp-tools-cli <action> --mcp-name <mcp_name> [options]The client supports two primary actions: list-tools to discover available tools on an MCP server, and call-tool to execute a specific tool. The --mcp-name argument specifies the target server from the configuration. For call-tool, the --tool-name is required, and --tool-args allows passing arguments as a JSON string or a simple query. The --config-path option specifies the location of the configuration file.
Examples include listing tools and calling the get_current_time tool on a Time MCP Server. Error handling covers scenarios like missing configuration files, invalid JSON, and command-line argument errors.
moritalous/mcp-tools-cli
March 23, 2025
March 23, 2025
Python