mcporter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCPorter (mcporter
)
mcporterMCPorter (mcporter
)
mcporterMCPorter is a CLI for working with MCP servers. Use it to discover configured servers, read their tool signatures, and call tools directly from the shell.
The two commands that matter most are (discover and inspect) and (invoke). Always before you so arguments match the real schema.
listcalllistcallFor exact flags, run . MCPorter discovers servers from its config — the global config at , a project config at , or an explicit — plus editor imports (Cursor, Claude Code, Codex, etc.). Use or to see where each server comes from.
mcporter <command> --help~/.mcporter/mcporter.json./config/mcporter.json--config <path>mcporter config listmcporter list --verbose最常用的两个命令是(发现和检查)和(调用)。调用前务必先执行,确保参数匹配实际的架构。
listcalllist如需查看具体参数,请运行。MCPorter会从配置中发现服务器——包括全局配置、项目配置,或者通过显式指定——此外还支持编辑器导入(Cursor、Claude Code、Codex等)。使用或可以查看每个服务器的来源。
mcporter <command> --help~/.mcporter/mcporter.json./config/mcporter.json--config <path>mcporter config listmcporter list --verboseWorkflow
工作流程
bash
undefinedbash
undefined1. See configured servers and their health
1. 查看已配置的服务器及其健康状态
mcporter list
mcporter list
2. Read one server's tools as TypeScript-like signatures
2. 读取某一服务器的工具,以类TypeScript签名形式展示
mcporter list <server>
mcporter list <server>
3. Call a tool using the signature from step 2
3. 使用步骤2中的签名调用工具
mcporter call '<server>.<tool>(arg: "value", count: 5)'
undefinedmcporter call '<server>.<tool>(arg: "value", count: 5)'
undefinedlist
— discover and inspect
listlist
—— 发现与检查
listbash
mcporter list # All servers, with live status
mcporter list <server> # Tools for one server, as signatures
mcporter list <server> --schema # Raw JSON schema for each tool
mcporter list <server> --json # Machine-readable, full tool metadata
mcporter list <server> --all-parameters # Reveal hidden optional paramsSingle-server output reads like a TypeScript header: a doc comment per tool, a signature with required params first and optional ones marked , plus an block written in the function-call syntax below. Optional params beyond the first few are hidden unless you pass or .
function name(...)?Examples:--all-parameters--schemats
function web_search_exa(query: string, numResults?: number);bash
mcporter list # 所有服务器,包含实时状态
mcporter list <server> # 某一服务器的工具,以签名形式展示
mcporter list <server> --schema # 每个工具的原始JSON架构
mcporter list <server> --json # 机器可读的完整工具元数据
mcporter list <server> --all-parameters # 显示隐藏的可选参数单服务器的输出类似TypeScript头文件:每个工具配有文档注释,签名中必填参数在前,可选参数标记为,下方还有一个使用下文函数调用语法编写的块。除非传入或,否则前几个之外的可选参数会被隐藏。
function name(...)?Examples:--all-parameters--schemats
function web_search_exa(query: string, numResults?: number);call
— invoke a tool
callcall
—— 调用工具
callRecommended: function-call syntax. It mirrors the signature from , is self-documenting, handles nested objects/arrays, and avoids shell-flag ambiguity. Wrap the whole argument in single quotes.
mcporter listbash
mcporter call 'exa.web_search_exa(query: "best React state libraries", numResults: 5)'
mcporter call 'linear.create_comment(issueId: "ENG-123", body: "Looks good!")'- Named arguments are preferred; unlabeled values map to schema order.
- Use for structured results; connection/auth/offline/http failures emit a
--output jsonenvelope for scripting.{ server, tool, issue }
bash
mcporter call 'exa.web_search_exa(query: "...")' --output json推荐:函数调用语法。它与输出的签名一致,具备自文档化特性,支持嵌套对象/数组,还能避免Shell参数歧义。请将整个参数用单引号包裹。
mcporter listbash
mcporter call 'exa.web_search_exa(query: "best React state libraries", numResults: 5)'
mcporter call 'linear.create_comment(issueId: "ENG-123", body: "Looks good!")'- 推荐使用命名参数;未标记的值会按照架构顺序映射。
- 使用可获取结构化结果;连接/认证/离线/HTTP失败时会输出
--output json格式的信息,便于脚本处理。{ server, tool, issue }
bash
mcporter call 'exa.web_search_exa(query: "...")' --output jsonOther argument styles (when the recommended one is awkward)
其他参数风格(当推荐风格使用不便时)
bash
undefinedbash
undefinedShell-friendly key/value pairs (good in scripts)
适合Shell的键值对格式(适用于脚本)
mcporter call linear.list_issues team=ENG limit:5
mcporter call linear.list_issues team=ENG limit:5
Prebuilt JSON payload (or --json -
to read from stdin)
--json -预构建的JSON负载(或使用--json -
从标准输入读取)
--json -mcporter call linear.create_issue --json '{"title":"Bug","team":"ENG"}'
mcporter call linear.create_issue --json '{"title":"Bug","team":"ENG"}'
Read a long string argument from a file
从文件读取长字符串参数
mcporter call linear.create_comment issueId=LNR-123 body=@comment.md
undefinedmcporter call linear.create_comment issueId=LNR-123 body=@comment.md
undefinedAd-hoc servers (not in config)
临时服务器(未在配置中)
Point / at an endpoint directly, no config edit needed:
listcallbash
mcporter list https://mcp.linear.app/mcp
mcporter call 'https://www.shadcn.io/api/mcp.getComponent(component: "vortex")'
mcporter list --stdio "bun run ./server.ts" --env TOKEN=xyzBare domains assume ; plain needs . Persist a tried endpoint with to make its short name reusable.
https://http://--allow-http--persist <config>无需修改配置,直接将/指向端点即可:
listcallbash
mcporter list https://mcp.linear.app/mcp
mcporter call 'https://www.shadcn.io/api/mcp.getComponent(component: "vortex")'
mcporter list --stdio "bun run ./server.ts" --env TOKEN=xyz裸域名默认使用;若使用纯则需添加参数。使用可将测试过的端点持久化,使其短名称可重复使用。
https://http://--allow-http--persist <config>Notes
注意事项
- Pass secrets via environment variables, e.g. .
LINEAR_API_KEY=… mcporter call 'linear.search_documentation(query: "automations")' - Other commands exist (,
auth,config,resource,daemon,generate-cli); runemit-tswhen you need them.mcporter --help
- 通过环境变量传递密钥,例如。
LINEAR_API_KEY=… mcporter call 'linear.search_documentation(query: "automations")' - 还有其他命令可用(、
auth、config、resource、daemon、generate-cli);需要时运行emit-ts查看详情。mcporter --help