Skip to main content

mcp-tools-cli

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

Usage

mcp-tools-cli <action> --mcp-name <mcp_name> [options]

Arguments

  • action (required): The action to perform. Must be one of:
    • list-tools: Lists the available tools on the MCP server.
    • call-tool: Calls a specific tool on the MCP server.
  • --mcp-name (required): The name of the MCP server to connect to, as defined in mcp_config.json.
  • --tool-name (required for call-tool action): The name of the tool to call.
  • --tool-args (optional): Arguments for the tool. Can be 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.
  • --config-path (optional): Path to the mcp_config.json file. Defaults to mcp_config.json in the current directory.

Configuration

The client uses a configuration file named mcp_config.json to store the connection details for MCP servers. The file should be in the following format:

{
  "mcpServers": {
    "<mcp_name>": {
      "command": "<command to run the server>",
      "args": ["<argument1>", "<argument2>", ...],
      "env": {
        "<environment variable name>": "<environment variable value>",
        ...
      }
    },
    ...
  }
}

Replace <mcp_name> with the name of your MCP server (e.g., time). The command, args, and env fields specify how to run the server.

Examples

A sample using the Time MCP Server is provided in mcp_config.sample.json. If you want to use this, please execute pip install mcp-server-time beforehand.

  1. List available tools:
mcp-tools-cli list-tools --mcp-name time --config-path mcp_config.sample.json
  1. Call the get_current_time tool with a query:
mcp-tools-cli call-tool --mcp-name time --tool-name get_current_time --config-path mcp_config.sample.json

Error Handling

The client will print error messages to the console if any errors occur, such as:

  • FileNotFoundError: If the config file is not found.
  • json.JSONDecodeError: If the config file is not a valid JSON file.
  • ValueError: If the MCP server is not found in the config file, or if the command is missing.
  • argparse.ArgumentError: If there are invalid command-line arguments.
  • Other exceptions during tool execution.

Metadata

Release files for mcp-tools-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-tools-cli 0.1.0
File Size Uploaded Provenance
mcp_tools_cli-0.1.0.tar.gz 17.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-tools-cli 0.1.0
File Interpreter ABI Platform
mcp_tools_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 kB

Release files / mcp_tools_cli-0.1.0.tar.gz

Download URL mcp_tools_cli-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3a178e4150c4b98241ea93534d757d49fa12d2a82bd6fa7bf6f0ce3c69e305f
BLAKE2b-256 checksum
How to use checksums
2f884690db62ff8d945c2888dde02f54ec012f5d2d50b7c320362621d1d80e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

Release files / mcp_tools_cli-0.1.0-py3-none-any.whl

Download URL mcp_tools_cli-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eafdbe9cb9e0bac7d150e4e5571f5b10eb4d8423f0a29c59d22186ff98c34de
BLAKE2b-256 checksum
How to use checksums
0ca4eeb7fedae5e20c6fbe6fb6528bf3ad428d48f9e38b74c42ed0345d974451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

Security for mcp-tools-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_tools_cli-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page