mcp-tools-cli logo

mcp-tools-cli

by moritalous

This is a command-line client for interacting with Model Context Protocol (MCP) servers. It allows users to list available tools and call specific tools on an MCP server.

View on GitHub

Last updated: N/A

What is mcp-tools-cli?

mcp-tools-cli is a command-line interface designed to interact with Model Context Protocol (MCP) servers. It provides a way to list available tools and execute specific tools on these servers.

How to use mcp-tools-cli?

  1. Install the tool using pip install mcp-tools-cli. 2. Configure the mcp_config.json file with connection details for your MCP servers. 3. Use the mcp-tools-cli command with appropriate arguments to list tools or call specific tools. Refer to the usage section in the README for detailed argument descriptions and examples.

Key features of mcp-tools-cli

  • Lists available tools on an MCP server

  • Calls specific tools on an MCP server

  • Uses a configuration file for server connection details

  • Supports JSON arguments for tools

  • Provides error handling for common issues

Use cases of mcp-tools-cli

  • Interacting with time servers to retrieve current time

  • Automating tasks on MCP servers

  • Integrating MCP servers into command-line workflows

  • Testing and debugging MCP server functionality

FAQ from mcp-tools-cli

What is the purpose of mcp_config.json?

The mcp_config.json file stores the connection details for your MCP servers, including the command to run the server, arguments, and environment variables.

How do I specify arguments for a tool?

You can use the --tool-args option, providing either a JSON string or a single string value. If a single string value is not a valid JSON, it will be passed as the query argument to the tool.

What happens if the config file is not found?

The client will print a FileNotFoundError to the console.

Can I use a different name for the config file?

Yes, you can specify the path to the config file using the --config-path option.

What kind of errors are handled by the client?

The client handles FileNotFoundError, json.JSONDecodeError, ValueError, argparse.ArgumentError, and other exceptions that may occur during tool execution.