MCP CLI Client logo

MCP CLI Client

by Fbeunder

A Command Line Interface for interacting with MCP (Machine Communication Protocol) servers via local STDIO and remote SSE connections. It allows sending JSON-RPC requests in both command-line and interactive modes, and can be integrated as a Python module.

View on GitHub

Last updated: N/A

What is MCP CLI Client?

The MCP CLI Client is a command-line tool that allows users to communicate with MCP servers over local (STDIO) or remote (SSE) connections.

How to use MCP CLI Client?

To use the client, you can either install it as a command-line tool and interact with it through the terminal, or import it as a Python module into your own projects. The command line tool can be used with the command python main.py and has options to work with both local and remote servers and enter interactive mode to quickly send commands.

Key features of MCP CLI Client

  • Connects to local MCP servers via STDIO

  • Connects to remote MCP servers via SSE

  • Sends JSON-RPC requests

  • Supports command-line and interactive modes

  • Can be used as a Python module

Use cases of MCP CLI Client

  • Interacting with MCP servers from the command line

  • Automating MCP server interactions

  • Integrating MCP communication into Python projects

  • Testing and debugging MCP server interactions

FAQ from MCP CLI Client

How do I connect to a local MCP server?

Use the --local flag with the python main.py command, optionally providing the --method and --params arguments.

How do I connect to a remote MCP server?

Use the --remote flag with the python main.py command, optionally providing the --method and --params arguments.

How do I use the interactive mode?

Run python main.py --local or python main.py --remote without specifying a method. Then, enter commands in the format methodName {"param1": "value1", "param2": "value2"}.

How do I install the client as a Python module?

Run pip install -e . from the repository directory or pip install git+https://github.com/Fbeunder/MCP_CLI_CLIENT.git.

What configuration options are available?

The configuration options are MCP_SERVER_URL, MCP_LOCAL_COMMAND, API_KEY, and LOG_LEVEL, which are loaded from the .env file.