
mcp client cli
一个用于通过模型上下文协议连接到 MCP 服务器的命令行客户端。
Repository Info
About This Server
一个用于通过模型上下文协议连接到 MCP 服务器的命令行客户端。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP Client for GitHub Actions
A command-line client for connecting to MCP servers using the Model Context Protocol.
Installation
npm install -g @lmquang/mcp-client-cli
Usage
npx @lmquang/mcp-client-cli --server-config server.json --server <server-name> --tool <tool-name> --args key1=value1 --args key2=value2
Or, for complex arguments:
npx @lmquang/mcp-client-cli --server-config server.json --server <server-name> --tool <tool-name> --json-args args.json
Options
--server-config: Path to server configuration JSON file (required)--server: Name of the server to connect to (required)--tool: Name of the tool to run (required)--args: Arguments for the tool in key=value format (optional, can be specified multiple times)--json-args: Path to a JSON file containing all arguments (optional, overrides --args)
Server Configuration
Create a server.json file with the following structure. It is recommended to use the full path to npx in the command field to avoid PATH issues:
{
"mcpServers": {
"discord-webhook": {
"command": "/Users/youruser/.nvm/versions/node/vXX.XX.X/bin/npx",
"args": [
"-y",
"@lmquang/mcp-discord-webhook@latest"
],
"env": {
"OPENAI_API_KEY": "your-api-key"
}
}
}
}
Each server entry should specify:
command: The command to run the server (use the full path to npx for reliability)args: Array of arguments to pass to the commandenv: Environment variables to set when running the command
Note: Do not commit
server.jsonto your repository. It may contain secrets and should be listed in.gitignore.
Examples
Run a tool with simple arguments:
npx @lmquang/mcp-client-cli --server-config server.json --server discord-webhook --tool discord-send-embed --args username="Tech Trends Analyzer" --args webhookUrl="https://your-webhook-url" --args content="Your summary text" --args autoFormat=true --args embeds="[]"
Run a tool with complex arguments using a JSON file:
Create args.json:
{
"username": "Tech Trends Analyzer",
"webhookUrl": "https://your-webhook-url",
"content": "Your summary text",
"autoFormat": true,
"embeds": []
}
Then run:
npx @lmquang/mcp-client-cli --server-config server.json --server discord-webhook --tool discord-send-embed --json-args args.json
If you need to share a server configuration, provide a server.json.example file with placeholder values and no secrets.
Quick Start
Clone the repository
git clone https://github.com/lmquang/mcp-client-cliInstall dependencies
cd mcp-client-cli
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.