用途:mcporter 是一个命令行工具,用于直接与 MCP 服务器和工具交互,支持 HTTP 与 stdio 两种连接方式,并涵盖临时服务器、配置编辑以及 CLI/类型代码生成。
主要能力:列出服务器与工具(mcporter list,加 --schema 查看结构);调用工具(mcporter call <server.tool> key=value,支持选择器、函数语法、完整 URL、--stdio 与 --args JSON 载荷);认证与配置(mcporter auth <server | url> [--reset];mcporter config list|get|add|remove|import|login|logout);守护进程(mcporter daemon start|status|stop|restart);代码生成(mcporter generate-cli --server <name> 或 --command <url>;mcporter inspect-cli <path> [--json];mcporter emit-ts <server> --mode client|types)。
使用方式:快速开始可运行 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 获取机器可读结果。其余功能细节、平台支持与收费情况暂未提供。