Skip to content

poshjosh/simple-mcp-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-mcp-client

A simple Model Context Protocol (MCP) client for working with MCP servers.

Usage

Setup

  • Install by running this script.
  • Activate by running source .venv/bin/activate || exit 1 in the project root directory.
  • Get help by running mcx --help from the same shell where you activated the project.

mcx use (select an mcp server)

mcx use <SERVER_ALIAS> --cmd=<MCP_SERVER_COMMAND> --arg=<MCP_SERVER_ARGUMENT> --env='<KEY>=<VALUE>'

Provide a value for:

  • <SERVER_ALIAS>: the alias you want to identify this server by.
  • <MCP_SERVER_COMMAND>: the mcp server command.
  • <MCP_SERVER_ARGUMENT>: the mcp server command argument (may be multiple).
  • <KEY>=<VALUE>: mcp server environment (may be multiple)

mcx call (call a tool on the selected mcp server)

mcx call "<TOOL_NAME>" --arg='<KEY=VALUE>'
  • Provide a value for <TOOL_NAME>: the name of the tool you want to call.
  • Provide a value for <KEY=VALUE>: the tool argument (may be multiple).

Examples

mcx use (select an mcp server)

mcx use automate-ideas-to-social --cmd=docker \
  --arg="run" --arg="-u" --arg="0" --arg="-i" --arg="--rm" \
  --arg="-v" --arg="/var/run/docker.sock:/var/run/docker.sock" \
  --arg="-e" --arg="APP_PROFILES=docker" \
  --arg="-e" --arg="USER_HOME=<YOUR HOME DIRECTORY>" \
  --arg="poshjosh/aideas-mcp:0.0.1"
  • Provide a value for <YOUR HOME DIRECTORY>: the path to your home directory.

mcx call (call a tool on the selected mcp server)

mcx call list_agents --fmt='content[0].text'
mcx quit

mcx list (list all tools on the selected mcp server)

mcx list --fmt='tools[*].name'
mcx quit

Development

About

A simple Model Context Protocol (MCP) client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published