MCP.so
登录

MCP Tools Cli

@moritalous

基本信息

分类

开发工具

许可证

MIT

传输方式

stdio

作者

moritalous

关于 MCP Tools Cli

command-line client for interacting with Model Context Protocol (MCP) servers.

MCP Tools Cli 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "time": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server_time",
        "--local-timezone=America/New_York"
      ]
    }
  }
}

MCP Tools Cli 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is mcp-tools-cli?

mcp-tools-cli is a command-line client for interacting with Model Context Protocol (MCP) servers. It allows users to list available tools on a configured MCP server and call those tools directly from the terminal.

How to use mcp-tools-cli?

Install it via pip install mcp-tools-cli. Create a mcp_config.json file (or use --config-path) with server definitions under mcpServers. Then run commands like mcp-tools-cli list-tools --mcp-name <name> or mcp-tools-cli call-tool --mcp-name <name> --tool-name <tool>.

Key features of mcp-tools-cli

  • Lists tools available on any configured MCP server.
  • Calls MCP tools with optional JSON or string arguments.
  • Supports custom configuration file path via --config-path.
  • Provides clear error messages for common issues.
  • Works with any MCP server specified in the configuration file.

Use cases of mcp-tools-cli

  • Quickly inspect which tools an MCP server offers without custom code.
  • Integrate MCP tool calls into shell scripts or automation pipelines.
  • Test MCP server endpoints interactively during development.
  • Use as a lightweight alternative to a full MCP client when only tool listing and calling are needed.

常见问题

1

What configuration file does mcp-tools-cli use?

It uses a JSON file named `mcp_config.json` by default, which must contain a `mcpServers` object defining the command, arguments, and environment variables for each MCP server.

2

What actions can I perform with mcp-tools-cli?

Two actions are available: `list-tools` to list the tools provided by a given MCP server, and `call-tool` to invoke a specific tool with optional arguments.

3

How do I pass arguments to a tool when calling it?

Use the `--tool-args` option. It accepts a JSON string (e.g., `'{"key":"value"}'`) or a plain string. If the string is not valid JSON, it is automatically passed as the `query` argument to the tool.

4

What happens if the MCP server is not defined in the configuration file?

The client prints a `ValueError` message indicating the MCP server name was not found in the configuration file.

5

Is a sample configuration provided?

Yes, a sample file `mcp_config.sample.json` is included in the package, configured for the Time MCP Server. To use it, install `mcp-server-time` first.

评论

开发工具 分类下的更多 MCP 服务器