Mcporter
使用 mcporter CLI 直接列出、配置、认证和调用 MCP 服务器/工具(通过 HTTP 或 stdio),包括临时服务器、配置编辑以及 CLI/类型生成。
技能元数据
| 来源 | 可选 — 使用 hermes skills install official/mcp/mcporter 安装 |
| 路径 | optional-skills/mcp/mcporter |
| 版本 | 1.0.0 |
| 作者 | community |
| 许可证 | MIT |
| 标签 | MCP, Tools, API, Integrations, Interop |
参考:完整 SKILL.md
信息
以下是 Hermes 在触发此技能时加载的完整技能定义。这是技能激活时代理所看到的指令。
mcporter
使用 mcporter 从终端直接发现、调用和管理 MCP(模型上下文协议) 服务器和工具。
前置条件
需要 Node.js:
# No install needed (runs via npx)
npx mcporter list
# Or install globally
npm install -g mcporter
快速开始
# List MCP servers already configured on this machine
mcporter list
# List tools for a specific server with schema details
mcporter list <server> --schema
# Call a tool
mcporter call <server.tool> key=value
发现 MCP 服务器
mcporter 会自动发现机器上由其他 MCP 客户端(Claude Desktop、Cursor 等)配置的服务器。要查找新的可用服务器,可以浏览 mcpfinder.dev 或 mcp.so 等注册表,然后进行临时连接:
# Connect to any MCP server by URL (no config needed)
mcporter list --http-url https://some-mcp-server.com --name my_server
# Or run a stdio server on the fly
mcporter list --stdio "npx -y @modelcontextprotocol/server-filesystem" --name fs
调用工具
# Key=value syntax
mcporter call linear.list_issues team=ENG limit:5
# Function syntax
mcporter call "linear.create_issue(title: \"Bug fix needed\")"
# Ad-hoc HTTP server (no config needed)
mcporter call https://api.example.com/mcp.fetch url=https://example.com
# Ad-hoc stdio server
mcporter call --stdio "bun run ./server.ts" scrape url=https://example.com
# JSON payload
mcporter call <server.tool> --args '{"limit": 5}'
# Machine-readable output (recommended for Hermes)
mcporter call <server.tool> key=value --output json
认证与配置
# OAuth login for a server
mcporter auth <server | url> [--reset]
# Manage config
mcporter config list
mcporter config get <key>
mcporter config add <server>
mcporter config remove <server>
mcporter config import <path>
配置文件位置:./config/mcporter.json(可使用 --config 覆盖)。
守护进程
用于持久化服务器连接:
mcporter daemon start
mcporter daemon status
mcporter daemon stop
mcporter daemon restart
代码生成
# Generate a CLI wrapper for an MCP server
mcporter generate-cli --server <name>
mcporter generate-cli --command <url>
# Inspect a generated CLI
mcporter inspect-cli <path> [--json]
# Generate TypeScript types/client
mcporter emit-ts <server> --mode client
mcporter emit-ts <server> --mode types
注意事项
- 使用
--output json获取更易于解析的结构化输出 - 临时服务器(HTTP URL 或
--stdio命令)无需任何配置即可工作 — 适用于一次性调用 - OAuth 认证可能需要交互式浏览器流程 — 如有需要,请使用
terminal(command="mcporter auth <server>", pty=true)