用途:mcporter 是一个命令行工具,用于直接与 MCP 服务器和工具交互,支持 HTTP 或 stdio 两种连接方式,涵盖列出、配置、鉴权与调用等操作,也可处理临时服务器、配置编辑以及 CLI/类型代码生成。
主要能力:列出服务器与工具(mcporter list,加 --schema 查看结构);调用工具(mcporter call <server.tool> key=value);支持选择器、函数语法、完整 URL、stdio 与 JSON 载荷等多种调用形式;OAuth 鉴权(mcporter auth <server | url> [--reset]);配置管理(mcporter config list|get|add|remove|import|login|logout);守护进程(mcporter daemon start|status|stop|restart);代码生成(mcporter generate-cli、inspect-cli、emit-ts)。
使用方式:快速开始可运行 mcporter list、mcporter list <server> --schema、mcporter call <server.tool> key=value。调用示例包括选择器 mcporter call linear.list_issues team=ENG limit:5、函数语法 mcporter call "linear.create_issue(title: "Bug")"、完整 URL mcporter call https://api.example.com/mcp.fetch url:https://example.com、stdio mcporter call --stdio "bun run ./server.ts" scrape url=https://example.com、JSON 载荷 mcporter call <server.tool> --args '{"limit":5}'。
限制与说明:配置默认路径为 ./config/mcporter.json,可用 --config 覆盖;建议使用 --output json 获取机器可读结果。其余细节暂未提供。