
MCP 服务器的命令行接口。MCP 的 curl。
概览
MCP服务器的命令行接口。 网络上在争论CLI和MCP的区别,好像它们是竞争对手一样。其实不是。 1. (Claude Code,光标)偏好支付费用而非维护持久MCP连接——更适合令牌管理、渐进式工具发现,以及在同一台机器上跨多个代理共享单一MCP服务器池 2.需要通过TypeScript程序访问MCP工具——远程、持久或隔离的代理,没有shell 3.需要快速的方式从终端发现、调试和测试服务器 curl/PowerShell安装程序会下载预构建的二进制文件——无需运行时。bun安装方法需要Bun。所有平台的二进制文件也可在GitHub发布页面上提供。 MCPX自动检测STDOUT/STDERR是否为交互性,并进行调整: - TTY →彩色格式输出(表格、头部、徽章)。- 非 TTY / 管道→ JSON
概述(AI 翻译)
MCP服务器的命令行接口。MCP的curl。
网络上在争论CLI和MCP的区别,好像它们是竞争对手一样。其实不是。
三种受众:
- **编码代理(Claude Code,光标)偏好付费而非维护持久MCP连接——更适合令牌管理、渐进式工具发现,以及在同一台机器上共享多个代理的单一MCP服务器池
- 非编码代理,需要通过TypeScript程序访问MCP工具——远程、持久或隔离的代理,没有壳层
- MCP开发者,他们需要快速的方法从终端发现、调试和测试服务器
安装
curl/PowerShell安装程序会下载预构建的二进制文件——无需运行时。bun安装方法需要Bun。所有平台的二进制文件也可在GitHub发布页面上提供。
快速启动
命令
| 指挥 | 描述 |
|---|---|
mcpx |
列出所有配置好的服务器和工具 |
mcpx servers |
列出配置好的服务器(名称、类型、详细信息) |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mcpx
A command-line interface for MCP servers. curl for MCP.
The internet is debating CLI vs MCP like they’re competitors. They’re not.
Three audiences:
- Coding agents (Claude Code, Cursor) that prefer shelling out over maintaining persistent MCP connections — better for token management, progressive tool discovery, and sharing a single pool of MCP servers across multiple agents on one machine
- Non-coding agents that need programmatic access to MCP tools from TypeScript — remote, persistent, or isolated agents that don’t have a shell
- MCP developers who need a fast way to discover, debug, and test their servers from the terminal
Install
# Via bun (all platforms)
bun install -g @arcadeai/mcpx
# Via curl (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/arcadeai-labs/mcpx/main/install.sh | bash
# Via PowerShell (Windows)
irm https://raw.githubusercontent.com/arcadeai-labs/mcpx/main/install.ps1 | iex
The curl/PowerShell installers download a pre-built binary — no runtime needed. The bun install method requires Bun. Binaries for all platforms are also available on the GitHub Releases page.
Quick Start
# Add the GitHub MCP server
mcpx add github --url https://mcp.github.com
# List all servers and their tools
mcpx
# List with descriptions
mcpx -d
# Inspect a server
mcpx info github
# Inspect a specific tool
mcpx info github search_repositories
# Execute a tool (JSON args)
mcpx exec github search_repositories '{"query": "mcp server"}'
# Execute a tool with shell-style flags (anything after `--` is parsed against the tool's input schema)
mcpx exec github search_repositories -- --query "mcp server"
# Execute a tool without specifying the server (auto-resolved)
mcpx exec search_repositories '{"query": "mcp server"}'
mcpx exec search_repositories -- --query "mcp server"
# Search tools — combines keyword and semantic matching
mcpx search "post a ticket to linear"
# Search with only keyword/glob matching (fast, no embeddings)
mcpx search -k "*file*"
# Search with only semantic matching
mcpx search -q "manage pull requests"
# Limit the number of results (default: 10)
mcpx search -n 5 "manage pull requests"
Commands
| Command | Description |
|---|---|
mcpx |
List all configured servers and tools |
mcpx servers |
List configured servers (name, type, detail) |
mcpx info |
Server overview (version, capabilities, tools, counts, session id) |
mcpx info |
Show tool schema |
安装
npx -y @modelcontextprotocol/server-filesystem .配置
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"env": { "API_KEY": "${API_KEY}" },
"allowedTools": ["read_file", "list_directory"],
"disabledTools": ["delete_file"]
},
"github": {
"url": "https://mcp.github.com"
},
"internal-api": {
"url": "https://mcp.internal.example.com",
"headers": { "Authorization": "Bearer ${TOKEN}" }
},
"legacy-sse": {
"url": "https://legacy.example.com/sse",
"transport": "sse"
},
"modern-mcp": {
"url": "https://mcp.example.com",
"mcp": "v2"
},
"slack": {
"url": "https://mcp.slack.com/mcp",
"transport": "streamable-http",
"oauth": {
"clientId": "${SLACK_CLIENT_ID}",
"clientSecret": "${SLACK_CLIENT_SECRET}",
"callbackPort": 3118
}
}
}
}