# mcpc — Universal MCP CLI Client > A Swiss Army knife CLI for the Model Context Protocol: connect to MCP servers, manage sessions, list tools, and script tool calls via JSON output. ## Install Copy the content below into your project: ## Quick Use 1. Install / run: ```bash npm install -g @apify/mcpc ``` 2. Start / smoke test: ```bash mcpc --help ``` 3. Verify: - Connect to one MCP server, run `tools-list`, then call a simple tool and confirm JSON mode works for scripting. ## Intro A Swiss Army knife CLI for the Model Context Protocol: connect to MCP servers, manage sessions, list tools, and script tool calls via JSON output. - **Best for:** Developers and agents who want a single CLI surface for MCP (interactive + scripting) instead of bespoke integrations - **Works with:** Node.js CLI; HTTP/stdio MCP servers; shell scripting with jq/xargs (per README) - **Setup time:** 8 minutes ## How to Use It Well - Setup time ~8 minutes (npm install + connect one server) - GitHub stars + forks (verified): see Source & Thanks - Supports persistent named sessions (e.g., `@test`) for repeated tool calls Use `mcpc` as the thin waist: everything agent-side is a Bash tool, everything server-side is MCP. That makes it easier to standardize sessions, auth, logging, and scripting patterns across teams. ### FAQ **Q: Why a CLI for MCP?** A: Agents already have a universal interface—shell access. A CLI lets agents use MCP without custom function wiring. **Q: Is it interactive or scriptable?** A: Both. It has an interactive shell mode and a JSON output mode for pipelines. **Q: How do I keep credentials safe?** A: Use OAuth profiles as described in the README and run MCP proxying/sandboxing if you share a machine with multiple agents. ## Source & Thanks > Source: https://github.com/apify/mcpc > License: Apache-2.0 > GitHub stars: 596 · forks: 56 --- ## 快速使用 1. 安装 / 运行: ```bash npm install -g @apify/mcpc ``` 2. 启动 / 冒烟测试: ```bash mcpc --help ``` 3. 验证: - Connect to one MCP server, run `tools-list`, then call a simple tool and confirm JSON mode works for scripting. ## 简介 通用 MCP 命令行客户端:连接 HTTP/stdio MCP server、维护会话、列出工具并调用工具,支持 JSON 输出便于脚本化,也适合让 agent 通过 shell 使用 MCP。 - **适合谁:** 希望用一个 CLI 统一操作 MCP(交互 + 脚本),避免为每个 server 写专用集成的开发者与 agent - **可搭配:** Node.js CLI;HTTP/stdio MCP server;配合 jq/xargs 做脚本化(以 README 为准) - **准备时间:** 8 分钟 ## 实战建议 - 接入约 8 分钟(npm 安装 + 连接一个 server) - GitHub stars + forks(已核验):见「来源与感谢」 - 支持持久化命名会话(例如 `@test`),便于重复调用工具 可以把 `mcpc` 当“细腰”:agent 侧只需要 Bash 工具,server 侧统一用 MCP。这样更容易在团队内标准化会话、鉴权、日志与脚本化模式。 ### FAQ **为什么要用 CLI 操作 MCP?** A: 因为对 agent 来说最通用的接口就是 shell。CLI 能让 agent 用 MCP,而无需为每个 server 单独接函数。 **它是交互式还是脚本化?** A: 两者都支持:有交互 shell,也支持 JSON 输出方便管道脚本。 **凭据怎么更安全?** A: 按 README 说明使用 OAuth profile,并在多 agent 场景开启代理/隔离以保护凭据。 ## 来源与感谢 > Source: https://github.com/apify/mcpc > License: Apache-2.0 > GitHub stars: 596 · forks: 56 --- Source: https://tokrepo.com/en/workflows/mcpc-universal-mcp-cli-client Author: MCP Hub