[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-steipete--mcporter":3,"tool-steipete--mcporter":64},[4,16,27,35,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":15},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,14],"Agent","插件","ready",{"id":17,"name":18,"github_repo":19,"description_zh":20,"stars":21,"difficulty_score":22,"last_commit_at":23,"category_tags":24,"status":15},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,2,"2026-04-10T01:20:03",[14,13,25,26],"图像","开发框架",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":22,"last_commit_at":33,"category_tags":34,"status":15},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[14,26],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":22,"last_commit_at":41,"category_tags":42,"status":15},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[25,43,44,14,13,45,46,26,47],"数据工具","视频","其他","语言模型","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":10,"last_commit_at":54,"category_tags":55,"status":15},7525,"codex","openai\u002Fcodex","Codex 是 OpenAI 推出的一款轻量级编程智能体，专为在终端环境中高效运行而设计。它允许开发者直接在命令行界面与 AI 交互，完成代码生成、调试、重构及项目维护等任务，无需频繁切换至浏览器或集成开发环境，从而显著提升了编码流程的连贯性与专注度。\n\n这款工具主要解决了传统 AI 辅助编程中上下文割裂的问题。通过将智能体本地化运行，Codex 能够更紧密地结合当前工作目录的文件结构，提供更具针对性的代码建议，同时支持以自然语言指令驱动复杂的开发操作，让“对话即编码”成为现实。\n\nCodex 非常适合习惯使用命令行的软件工程师、全栈开发者以及技术研究人员。对于追求极致效率、偏好键盘操作胜过图形界面的极客用户而言，它更是理想的结对编程伙伴。\n\n其独特亮点在于灵活的部署方式：既可作为全局命令行工具通过 npm 或 Homebrew 一键安装，也能无缝对接现有的 ChatGPT 订阅计划（如 Plus 或 Pro），直接复用账户权益。此外，它还提供了从纯文本终端到桌面应用的多形态体验，并支持基于 API 密钥的深度定制，充分满足不同场景下的开发需求。",75220,"2026-04-14T14:40:34",[46,13,14],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":22,"last_commit_at":62,"category_tags":63,"status":15},51,"gstack","garrytan\u002Fgstack","gstack 是 Y Combinator CEO Garry Tan 亲自开源的一套 AI 工程化配置，旨在将 Claude Code 升级为你的虚拟工程团队。面对单人开发难以兼顾产品战略、架构设计、代码审查及质量测试的挑战，gstack 提供了一套标准化解决方案，帮助开发者实现堪比二十人团队的高效产出。\n\n这套配置特别适合希望提升交付效率的创始人、技术负责人，以及初次尝试 Claude Code 的开发者。gstack 的核心亮点在于内置了 15 个具有明确职责的 AI 角色工具，涵盖 CEO、设计师、工程经理、QA 等职能。用户只需通过简单的斜杠命令（如 `\u002Freview` 进行代码审查、`\u002Fqa` 执行测试、`\u002Fplan-ceo-review` 规划功能），即可自动化处理从需求分析到部署上线的全链路任务。\n\n所有操作基于 Markdown 和斜杠命令，无需复杂配置，完全免费且遵循 MIT 协议。gstack 不仅是一套工具集，更是一种现代化的软件工厂实践，让单人开发者也能拥有严谨的工程流程。",74444,"2026-04-17T11:09:47",[13,14],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":81,"owner_email":82,"owner_twitter":76,"owner_website":83,"owner_url":84,"languages":85,"stars":98,"forks":99,"last_commit_at":100,"license":101,"difficulty_score":10,"env_os":102,"env_gpu":103,"env_ram":103,"env_deps":104,"category_tags":108,"github_topics":109,"view_count":22,"oss_zip_url":113,"oss_zip_packed_at":113,"status":15,"created_at":114,"updated_at":115,"faqs":116,"releases":147},8569,"steipete\u002Fmcporter","mcporter","Call MCPs via TypeScript, masquerading as simple TypeScript API. Or package them as cli.","MCPorter 是一款专为模型上下文协议（MCP）打造的 TypeScript 运行时与命令行工具集。它旨在简化开发者调用 MCP 服务器的流程，让用户无需编写繁琐的样板代码或手动解析复杂的 Schema，即可像调用普通 TypeScript API 一样轻松使用 MCP 功能，甚至能一键将服务打包为独立的命令行工具。\n\n这款工具主要解决了 MCP 集成中配置复杂、类型缺失以及复用困难的问题。它支持零配置自动发现系统中已安装的 MCP 服务（兼容 Cursor、Claude Code 等主流编辑器配置），并提供强类型的客户端代码生成，让自动化脚本和测试编写更加安全高效。此外，MCPorter 内置了 OAuth 认证缓存、多传输协议支持（HTTP\u002Fstdio\u002FSSE）以及友好的组合式 API，大幅降低了连接和管理各类 AI 工具的门槛。\n\nMCPorter 非常适合需要构建 AI 自动化工作流的软件开发人员、希望快速原型验证的研究者，以及需要将 AI 能力封装为 CLI 工具分发的技术团队。其独特的亮点在于能够智能处理环境变量、自动适配浏览器登录流程，并提供灵活的调用语法，让开发者能","MCPorter 是一款专为模型上下文协议（MCP）打造的 TypeScript 运行时与命令行工具集。它旨在简化开发者调用 MCP 服务器的流程，让用户无需编写繁琐的样板代码或手动解析复杂的 Schema，即可像调用普通 TypeScript API 一样轻松使用 MCP 功能，甚至能一键将服务打包为独立的命令行工具。\n\n这款工具主要解决了 MCP 集成中配置复杂、类型缺失以及复用困难的问题。它支持零配置自动发现系统中已安装的 MCP 服务（兼容 Cursor、Claude Code 等主流编辑器配置），并提供强类型的客户端代码生成，让自动化脚本和测试编写更加安全高效。此外，MCPorter 内置了 OAuth 认证缓存、多传输协议支持（HTTP\u002Fstdio\u002FSSE）以及友好的组合式 API，大幅降低了连接和管理各类 AI 工具的门槛。\n\nMCPorter 非常适合需要构建 AI 自动化工作流的软件开发人员、希望快速原型验证的研究者，以及需要将 AI 能力封装为 CLI 工具分发的技术团队。其独特的亮点在于能够智能处理环境变量、自动适配浏览器登录流程，并提供灵活的调用语法，让开发者能专注于业务逻辑而非底层连接细节，是提升 AI 工程化效率的得力助手。","# MCPorter 🧳 - Call MCPs from TypeScript or as CLI\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsteipete_mcporter_readme_764ec47514a8.png\" alt=\"MCPorter header banner\" width=\"1100\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmcporter\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmcporter?style=for-the-badge&logo=npm&logoColor=white\" alt=\"npm version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fsteipete\u002Fmcporter\u002Fci.yml?branch=main&style=for-the-badge&label=tests\" alt=\"CI Status\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatforms-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=for-the-badge\" alt=\"Platforms\">\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green?style=for-the-badge\" alt=\"MIT License\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n_TypeScript runtime, CLI, and code-generation toolkit for the Model Context Protocol._\n\nMCPorter helps you lean into the \"code execution\" workflows highlighted in Anthropic's **Code Execution with MCP** guidance: discover the MCP servers already configured on your system, call them directly, compose richer automations in TypeScript, and mint single-purpose CLIs when you need to share a tool. All of that works out of the box -- no boilerplate, no schema spelunking.\n\n## Key Capabilities\n\n- **Zero-config discovery.** `createRuntime()` merges your home config (`~\u002F.mcporter\u002Fmcporter.json[c]`) first, then `config\u002Fmcporter.json`, plus Cursor\u002FClaude\u002FCodex\u002FWindsurf\u002FOpenCode\u002FVS Code imports, expands `${ENV}` placeholders, and pools connections so you can reuse transports across multiple calls.\n- **One-command CLI generation.** `mcporter generate-cli` turns any MCP server definition into a ready-to-run CLI, with optional bundling\u002Fcompilation and metadata for easy regeneration.\n- **Typed tool clients.** `mcporter emit-ts` emits `.d.ts` interfaces or ready-to-run client wrappers so agents\u002Ftests can call MCP servers with strong TypeScript types without hand-writing plumbing.\n- **Friendly composable API.** `createServerProxy()` exposes tools as ergonomic camelCase methods, automatically applies JSON-schema defaults, validates required arguments, and hands back a `CallResult` with `.text()`, `.markdown()`, `.json()`, `.images()`, and `.content()` helpers.\n- **OAuth and stdio ergonomics.** Built-in OAuth caching, log tailing, and stdio wrappers let you work with HTTP, SSE, and stdio transports from the same interface.\n- **Ad-hoc connections.** Point the CLI at *any* MCP endpoint (HTTP or stdio) without touching config, then persist it later if you want. Hosted MCPs that expect a browser login (Supabase, Vercel, etc.) are auto-detected—just run `mcporter auth \u003Curl>` and the CLI promotes the definition to OAuth on the fly. See [docs\u002Fadhoc.md](docs\u002Fadhoc.md).\n\n## Quick Start\n\nMCPorter auto-discovers the MCP servers you already configured in Cursor, Claude Code\u002FDesktop, Codex, or local overrides. You can try it immediately with `npx`--no installation required. Need a full command reference (flags, modes, return types)? Check out [docs\u002Fcli-reference.md](docs\u002Fcli-reference.md).\n### Call syntax options\n\n```bash\n# Colon-delimited flags (shell-friendly)\nnpx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'\n\n# Function-call style (matches signatures from `mcporter list`)\nnpx mcporter call 'linear.create_comment(issueId: \"ENG-123\", body: \"Looks good!\")'\n\n# Literal positional values that start with `--`\nnpx mcporter call server.tool -- --raw-value\n```\n\n\n### List your MCP servers\n\n```bash\nnpx mcporter list\nnpx mcporter list context7 --schema\nnpx mcporter list https:\u002F\u002Fmcp.linear.app\u002Fmcp --all-parameters\nnpx mcporter list shadcn.io\u002Fapi\u002Fmcp.getComponents           # URL + tool suffix auto-resolves\nnpx mcporter list --stdio \"bun run .\u002Flocal-server.ts\" --env TOKEN=xyz\n```\n\n- Add `--json` to emit a machine-readable summary with per-server statuses (auth\u002Foffline\u002Fhttp\u002Ferror counts) and, for single-server runs, the full tool schema payload.\n- Add `--verbose` to show every config source that registered the server name (primary first), both in text and JSON list output.\n\nYou can now point `mcporter list` at ad-hoc servers: provide a URL directly or use the new `--http-url\u002F--stdio` flags (plus `--env`, `--cwd`, `--name`, or `--persist`) to describe any MCP endpoint. Until you persist that definition, you still need to repeat the same URL\u002Fstdio flags for `mcporter call`—the printed slug only becomes reusable once you merge it into a config via `--persist` or `mcporter config add` (use `--scope home|project` to pick the write target). Follow up with `mcporter auth https:\u002F\u002F…` (or the same flag set) to finish OAuth without editing config. Full details live in [docs\u002Fadhoc.md](docs\u002Fadhoc.md).\n\nSingle-server listings now read like a TypeScript header file so you can copy\u002Fpaste the signature straight into `mcporter call`:\n\n```ts\nlinear - Hosted Linear MCP; exposes issue search, create, and workflow tooling.\n  23 tools · 1654ms · HTTP https:\u002F\u002Fmcp.linear.app\u002Fmcp\n\n  \u002F**\n   * Create a comment on a specific Linear issue\n   * @param issueId The issue ID\n   * @param body The content of the comment as Markdown\n   * @param parentId? A parent comment ID to reply to\n   *\u002F\n  function create_comment(issueId: string, body: string, parentId?: string);\n  \u002F\u002F optional (3): notifySubscribers, labelIds, mentionIds\n\n  \u002F**\n   * List documents in the user's Linear workspace\n   * @param query? An optional search query\n   * @param projectId? Filter by project ID\n   *\u002F\n  function list_documents(query?: string, projectId?: string);\n  \u002F\u002F optional (11): limit, before, after, orderBy, initiativeId, ...\n```\n\nHere’s what that looks like for Vercel when you run `npx mcporter list vercel`:\n\n```ts\nvercel - Vercel MCP (requires OAuth).\n\n  \u002F**\n   * Search the Vercel documentation.\n   * Use this tool to answer any questions about Vercel’s platform, features, and best practices,\n   * including:\n   * - Core Concepts: Projects, Deployments, Git Integration, Preview Deployments, Environments\n   * - Frontend & Frameworks: Next.js, SvelteKit, Nuxt, Astro, Remix, frameworks configuration and\n   *   optimization\n   * - APIs: REST API, Vercel SDK, Build Output API\n   * - Compute: Fluid Compute, Functions, Routing Middleware, Cron Jobs, OG Image Generation, Sandbox,\n   *   Data Cache\n   * - AI: Vercel AI SDK, AI Gateway, MCP, v0\n   * - Performance & Delivery: Edge Network, Caching, CDN, Image Optimization, Headers, Redirects,\n   *   Rewrites\n   * - Pricing: Plans, Spend Management, Billing\n   * - Security: Audit Logs, Firewall, Bot Management, BotID, OIDC, RBAC, Secure Compute, 2FA\n   * - Storage: Blog, Edge Config\n   *\n   * @param topic Topic to focus the documentation search on (e.g., 'routing', 'data-fetching').\n   * @param tokens? Maximum number of tokens to include in the result. Default is 2500.\n   *\u002F\n  function search_vercel_documentation(topic: string, tokens?: number);\n\n  \u002F**\n   * Deploy the current project to Vercel\n   *\u002F\n  function deploy_to_vercel();\n```\n\nRequired parameters always show; optional parameters stay hidden unless (a) there are only one or two of them alongside fewer than four required fields or (b) you pass `--all-parameters`. Whenever MCPorter hides parameters it prints `Optional parameters hidden; run with --all-parameters to view all fields.` so you know how to reveal the full signature. Return types are inferred from the tool schema’s `title`, falling back to omitting the suffix entirely instead of guessing.\n\n### Context7: fetch docs (no auth required)\n\n```bash\nnpx mcporter call context7.resolve-library-id libraryName=react\nnpx mcporter call context7.get-library-docs context7CompatibleLibraryID=\u002Fwebsites\u002Freact_dev topic=hooks\n```\n\n### Linear: search documentation (requires `LINEAR_API_KEY`)\n\n```bash\nLINEAR_API_KEY=sk_linear_example npx mcporter call linear.search_documentation query=\"automations\"\n```\n\n### Chrome DevTools: snapshot the current tab\n\n```bash\nnpx mcporter call chrome-devtools.take_snapshot\nnpx mcporter call 'linear.create_comment(issueId: \"LNR-123\", body: \"Hello world\")'\nnpx mcporter call https:\u002F\u002Fmcp.linear.app\u002Fmcp.list_issues assignee=me\nnpx mcporter call shadcn.io\u002Fapi\u002Fmcp.getComponent component=vortex   # protocol optional; defaults to https\nnpx mcporter call linear.listIssues --tool listIssues   # auto-corrects to list_issues\nnpx mcporter linear.list_issues                         # shorthand: infers `call`\nVERCEL_ACCESS_TOKEN=sk_vercel_example npx mcporter call \"npx -y vercel-domains-mcp\" domain=answeroverflow.com  # quoted stdio cmd + single-tool inference\n```\n\n> Tool calls understand a JavaScript-like call syntax, auto-correct near-miss tool names, and emit richer inline usage hints. See [docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md) for the grammar and [docs\u002Fcall-heuristic.md](docs\u002Fcall-heuristic.md) for the auto-correction rules.\n\nHelpful flags:\n\n- `--config \u003Cpath>` -- custom config file (defaults to `.\u002Fconfig\u002Fmcporter.json`).\n- `--root \u003Cpath>` -- working directory for stdio commands.\n- `--log-level \u003Cdebug|info|warn|error>` -- adjust verbosity (respects `MCPORTER_LOG_LEVEL`).\n- `--oauth-timeout \u003Cms>` -- shorten\u002Fextend the OAuth browser wait; same as `MCPORTER_OAUTH_TIMEOUT_MS` \u002F `MCPORTER_OAUTH_TIMEOUT`.\n- `--tail-log` -- stream the last 20 lines of any log files referenced by the tool response.\n- `--output \u003Cformat>` or `--raw` -- control formatted output (defaults to pretty-printed auto detection).\n- `--save-images \u003Cdir>` (on `mcporter call`) -- save MCP image content blocks to files in the given directory (opt-in; stdout output shape stays unchanged).\n- `--raw-strings` (on `mcporter call`) -- keep numeric-looking argument values (for `key=value`, `key:value`, and trailing positional values) as strings.\n- `--no-coerce` (on `mcporter call`) -- keep all `key=value` and positional values as raw strings (disables bool\u002Fnull\u002Fnumber\u002FJSON coercion).\n- `--` (on `mcporter call`) -- stop flag parsing so the remaining tokens stay literal positional values, even when they start with `--`.\n- `--json` (on `mcporter list`) -- emit JSON summaries\u002Fcounts instead of text. Multi-server runs report per-server statuses, counts, and connection issues; single-server runs include the full tool metadata.\n- `--output json\u002Fraw` (on `mcporter call`) -- when a connection fails, MCPorter prints the usual colorized hint and also emits a structured `{ server, tool, issue }` envelope so scripts can handle auth\u002Foffline\u002Fhttp errors programmatically.\n- `--json` (on `mcporter auth`) -- emit the same structured connection envelope whenever OAuth\u002Ftransport setup fails, instead of throwing an error.\n- `--json` (on `mcporter emit-ts`) -- print a JSON summary describing the emitted files (mode + output paths) instead of text logs—handy when generating artifacts inside scripts.\n- `--all-parameters` -- show every schema field when listing a server (default output shows at least five parameters plus a summary of the rest).\n- `--http-url \u003Chttps:\u002F\u002F…>` \u002F `--stdio \"command …\"` -- describe an ad-hoc MCP server inline. STDIO transports now inherit your current shell environment automatically; add `--env KEY=value` only when you need to inject\u002Foverride variables alongside `--cwd`, `--name`, or `--persist \u003Cconfig.json>`. These flags now work with `mcporter auth` too, so `mcporter auth https:\u002F\u002Fmcp.example.com\u002Fmcp` just works.\n- For OAuth-protected servers such as `vercel`, run `npx mcporter auth vercel` once to complete login.\n\n> Tip: You can skip the verb entirely—`mcporter firecrawl` automatically runs `mcporter list firecrawl`, and dotted tokens like `mcporter linear.list_issues` dispatch to the call command (typo fixes included).\n\nTimeouts default to 30 s; override with `MCPORTER_LIST_TIMEOUT` or `MCPORTER_CALL_TIMEOUT` when you expect slow startups. OAuth browser handshakes get a separate 60 s grace period; pass `--oauth-timeout \u003Cms>` (or export `MCPORTER_OAUTH_TIMEOUT_MS`) when you need the CLI to bail out faster while you diagnose stubborn auth flows.\n\n### Try an MCP without editing config\n\n```bash\n# Point at an HTTPS MCP server directly\nnpx mcporter list --http-url https:\u002F\u002Fmcp.linear.app\u002Fmcp --name linear\n\n# Run a local stdio MCP server via Bun\nnpx mcporter call --stdio \"bun run .\u002Flocal-server.ts\" --name local-tools\n```\n\n- Add `--persist config\u002Fmcporter.local.json` to save the inferred definition for future runs.\n- Use `--allow-http` if you truly need to hit a cleartext endpoint.\n- See [docs\u002Fadhoc.md](docs\u002Fadhoc.md) for a deep dive (env overrides, cwd, OAuth).\n\n### Keep MCP servers warm with the daemon\n\n- `chrome-devtools`, `mobile-mcp`, and other stateful stdio servers auto-start a per-login daemon the first time you call them so Chrome tabs and device sessions stay alive between agents.\n- Use `mcporter daemon status` to check whether the daemon is running (and which servers are connected).\n- Stop it anytime with `mcporter daemon stop`, pre-warm with `mcporter daemon start`, or bounce it via `mcporter daemon restart` after tweaking configs\u002Fenv.\n- All other servers stay ephemeral; add `\"lifecycle\": \"keep-alive\"` to a server entry (or set `MCPORTER_KEEPALIVE=name`) when you want the daemon to manage it. You can also set `\"lifecycle\": \"ephemeral\"` (or `MCPORTER_DISABLE_KEEPALIVE=name`) to opt out.\n- The daemon only manages named servers that come from your config\u002Fimports. Ad-hoc STDIO\u002FHTTP targets invoked via `--stdio …`, `--http-url …`, or inline function-call syntax remain per-process today; persist them into `config\u002Fmcporter.json` (or use `--persist`) if you need them to participate in the shared daemon.\n- Troubleshooting? Run `mcporter daemon start --log` (or `--log-file \u002Ftmp\u002Fdaemon.log`) to tee stdout\u002Fstderr into a file, and add `--log-servers chrome-devtools` when you only want call traces for a specific MCP. Per-server configs can also set `\"logging\": { \"daemon\": { \"enabled\": true } }` to force detailed logging for that entry.\n\n\n## Friendlier Tool Calls\n\n- **Function-call syntax.** Instead of juggling `--flag value`, you can call tools as `mcporter call 'linear.create_issue(title: \"Bug\", team: \"ENG\")'`. The parser supports nested objects\u002Farrays, lets you omit labels when you want to rely on schema order (e.g. `mcporter 'context7.resolve-library-id(\"react\")'`), and surfaces schema validation errors clearly. Deep dive in [docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md).\n- **Flag shorthand still works.** Prefer CLI-style arguments? Stick with `mcporter linear.create_issue title=value team=value`, `title=value`, `title:value`, or even `title: value`—the CLI now normalizes all three forms.\n- **Unknown long flags fail fast.** `mcporter call server.tool --source import` now errors instead of silently turning `--source` into a positional tool argument. Use `source=import`, `--args '{\"source\":\"import\"}'`, or insert `--` before literal positional values that begin with `--`.\n- **Cheatsheet.** See [docs\u002Ftool-calling.md](docs\u002Ftool-calling.md) for a quick comparison of every supported call style (auto-inferred verbs, flags, function-calls, and ad-hoc URLs).\n- **Auto-correct.** If you typo a tool name, MCPorter inspects the server’s tool catalog, retries when the edit distance is tiny, and otherwise prints a `Did you mean …?` hint. The heuristic (and how to tune it) is captured in [docs\u002Fcall-heuristic.md](docs\u002Fcall-heuristic.md).\n- **Richer single-server output.** `mcporter list \u003Cserver>` now prints TypeScript-style signatures, inline comments, return-shape hints, and command examples that mirror the new call syntax. Optional parameters stay hidden by default—add `--all-parameters` or `--schema` whenever you need the full JSON schema.\n\n\n## Installation\n\n### Run instantly with `npx`\n\n```bash\nnpx mcporter list\n```\n\n### Add to your project\n\n```bash\npnpm add mcporter\n```\n\n### Homebrew (steipete\u002Ftap)\n\n```bash\nbrew tap steipete\u002Ftap\nbrew install steipete\u002Ftap\u002Fmcporter\n```\n\n> The tap publishes alongside MCPorter 0.3.2. If you run into issues with an older tap install, run `brew update` before reinstalling.\n\n## One-shot calls from code\n\n```ts\nimport { callOnce } from \"mcporter\";\n\nconst result = await callOnce({\n\tserver: \"firecrawl\",\n\ttoolName: \"crawl\",\n\targs: { url: \"https:\u002F\u002Fanthropic.com\" },\n});\n\nconsole.log(result); \u002F\u002F raw MCP envelope\n```\n\n`callOnce` automatically discovers the selected server (including Cursor\u002FClaude\u002FCodex\u002FWindsurf\u002FOpenCode\u002FVS Code imports), handles OAuth prompts, and closes transports when it finishes. It is ideal for manual runs or wiring MCPorter directly into an agent tool hook.\n\n## Compose Automations with the Runtime\n\n```ts\nimport { createRuntime } from \"mcporter\";\n\nconst runtime = await createRuntime();\n\nconst tools = await runtime.listTools(\"context7\");\nconst result = await runtime.callTool(\"context7\", \"resolve-library-id\", {\n\targs: { libraryName: \"react\" },\n});\n\nconsole.log(result); \u002F\u002F prints JSON\u002Ftext automatically because the CLI pretty-prints by default\nawait runtime.close(); \u002F\u002F shuts down transports and OAuth sessions\n```\n\nReach for `createRuntime()` when you need connection pooling, repeated calls, or advanced options such as explicit timeouts and log streaming. The runtime reuses transports, refreshes OAuth tokens, and only tears everything down when you call `runtime.close()`.\n\n## Compose Tools in Code\n\nThe runtime API is built for agents and scripts, not just humans at a terminal.\n\n```ts\nimport { createRuntime, createServerProxy } from \"mcporter\";\n\nconst runtime = await createRuntime();\nconst chrome = createServerProxy(runtime, \"chrome-devtools\");\nconst linear = createServerProxy(runtime, \"linear\");\n\nconst snapshot = await chrome.takeSnapshot();\nconsole.log(snapshot.text());\n\nconst docs = await linear.searchDocumentation({\n\tquery: \"automations\",\n\tpage: 0,\n});\nconsole.log(docs.json());\n```\n\nFriendly ergonomics baked into the proxy and result helpers:\n\n- Property names map from camelCase to kebab-case tool names (`takeSnapshot` -> `take_snapshot`).\n- Positional arguments map onto schema-required fields automatically, and option objects respect JSON-schema defaults.\n- Results are wrapped in a `CallResult`, so you can choose `.text()`, `.markdown()`, `.json()`, `.images()`, `.content()`, or access `.raw` when you need the full envelope.\n\nDrop down to `runtime.callTool()` whenever you need explicit control over arguments, metadata, or streaming options.\n\n\nCall `mcporter list \u003Cserver>` any time you need the TypeScript-style signature, optional parameter hints, and sample invocations that match the CLI's function-call syntax.\n\n## Generate a Standalone CLI\n\nTurn any server definition into a shareable CLI artifact:\n\n```bash\nnpx mcporter generate-cli \\\n  --command https:\u002F\u002Fmcp.context7.com\u002Fmcp\n\n# Outputs:\n#   context7.ts        (TypeScript template with embedded schemas)\n#   context7.js        (bundled CLI via Rolldown or Bun, depending on runtime)\n```\n\n> Convert the chrome-devtools MCP to a CLI via this one weird trick:\n>\n> `npx mcporter generate-cli --command \"npx -y chrome-devtools-mcp@latest\"`\n\nTip: you can drop `--command` when the inline command is the first positional argument (e.g., `npx mcporter generate-cli \"npx -y chrome-devtools-mcp@latest\"`).\n\n- `--name` overrides the inferred CLI name.\n- Add `--description \"...\"` if you want a custom summary in the generated help output (otherwise mcporter asks the MCP server for its own description\u002Ftitle during generation).\n- Generated CLIs inherit the same color-aware help layout as `mcporter` itself: invoking the binary with no arguments shows the embedded tool list + quick start, and each `--help` page uses bold titles + dimmed descriptions when stdout is a TTY.\n- Add `--bundle [path]` to emit a bundle alongside the template (Rolldown when targeting Node, Bun automatically when the runtime resolves to Bun; override with `--bundler rolldown|bun`).\n- `--output \u003Cpath>` writes the template somewhere specific.\n- `--runtime bun|node` picks the runtime for generated code (Bun required for `--compile`).\n- Add `--compile` to emit a Bun-compiled binary; MCPorter cleans up intermediate bundles when you omit `--bundle`.\n- Use `--include-tools a,b,c` or `--exclude-tools a,b,c` to generate a CLI for a subset of tools (mutually exclusive).\n- Use `--from \u003Cartifact>` (optionally `--dry-run`) to regenerate an existing CLI using its embedded metadata.\n- Prefer a positional shorthand if the server already lives in your config\u002Fimports:\n  `npx mcporter generate-cli linear --bundle dist\u002Flinear.js`.\n- `--server`\u002F`--command` accept HTTP URLs, optional `.tool` suffixes, and even scheme-less hosts (`shadcn.io\u002Fapi\u002Fmcp.getComponents`).\n\nEvery artifact embeds regeneration metadata (generator version, resolved server definition, invocation flags). Use:\n\n```\nnpx mcporter inspect-cli dist\u002Fcontext7.js     # human-readable summary\nnpx mcporter generate-cli --from dist\u002Fcontext7.js  # replay with latest mcporter\n```\n\n## Generate Typed Clients\n\nUse `mcporter emit-ts` when you want strongly typed tooling without shipping a full CLI. It reuses the same signatures\u002Fdoc blocks as `mcporter list`, so the generated headers stay in sync with what the CLI shows.\n\n```bash\n# Types-only interface (Promise signatures)\nnpx mcporter emit-ts linear --out types\u002Flinear-tools.d.ts\n\n# Client wrapper (creates a reusable proxy factory alongside the .d.ts)\nnpx mcporter emit-ts linear --mode client --out clients\u002Flinear.ts\n```\n\n- `--mode types` (default) produces a `.d.ts` interface you can import anywhere.\n- `--mode client` emits the `.d.ts` **and** a `.ts` helper that wraps `createRuntime` \u002F `createServerProxy` for you.\n- Add `--include-optional` whenever you want every optional field spelled out (mirrors `mcporter list --all-parameters`).\n- Add `--json` to emit a structured summary (mode plus output paths) instead of plain-text logs when scripting `emit-ts`.\n- The `\u003Cserver>` argument also understands HTTP URLs and selectors with `.tool` suffixes or missing protocols—mirroring the main CLI.\n\nSee [docs\u002Femit-ts.md](docs\u002Femit-ts.md) for the full flag reference plus inline snapshots of the emitted files.\n\n## Configuration Reference\n\nManage this file with `mcporter config list|get|add|remove|import` when you’d rather avoid hand-editing JSON; see [docs\u002Fconfig.md](docs\u002Fconfig.md) for the full walkthrough.\nConfig files are parsed as JSONC, so inline `\u002F\u002F` and `\u002F* ... *\u002F` comments plus trailing commas are supported in both `mcporter.json` and `mcporter.jsonc`.\n\n### Manage configs with `mcporter config`\n\nRun `mcporter config …` via your package manager (pnpm, npm, npx, etc.) when you want an interactive view of project MCPs:\n\n- `config list` shows **only local entries** by default and, on TTYs, prints a summary of every other config file (Cursor, Claude, Windsurf, VS Code, etc.) with counts and sample names. Add `--source import` to inspect those imported entries directly or `--json` for scripting.\n- `config get\u002Fremove\u002Flogout` reuse the fuzzy matching logic from `mcporter list`\u002F`call`, so typos like `sshadcn` auto-correct to `shadcn` (with a dimmed notice) and ambiguous names surface “Did you mean …?” hints.\n- `config import \u003Ckind> --copy` pulls editor-managed entries into `config\u002Fmcporter.json`, letting you customize or remove them locally without touching upstream files.\n- Every subcommand honors `--config \u003Cpath>` \u002F `--root \u003Cdir>`, making it easy to juggle multiple project configs or workspace-specific overrides.\n\n`config\u002Fmcporter.json` mirrors Cursor\u002FClaude's shape:\n\n```jsonc\n{\n\t\"mcpServers\": {\n\t\t\"context7\": {\n\t\t\t\"description\": \"Context7 docs MCP\",\n\t\t\t\"baseUrl\": \"https:\u002F\u002Fmcp.context7.com\u002Fmcp\",\n\t\t\t\"headers\": {\n\t\t\t\t\"Authorization\": \"$env:CONTEXT7_API_KEY\"\n\t\t\t}\n\t\t},\n\t\t\"chrome-devtools\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"chrome-devtools-mcp@latest\"],\n\t\t\t\"env\": { \"npm_config_loglevel\": \"error\" }\n\t\t}\n\t},\n\t\"imports\": [\"cursor\", \"claude-code\", \"claude-desktop\", \"codex\", \"windsurf\", \"opencode\", \"vscode\"]\n}\n```\n\nWhat MCPorter handles for you:\n\n- `${VAR}`, `${VAR:-fallback}`, and `$env:VAR` interpolation for headers and env entries.\n- Automatic OAuth token caching under `~\u002F.mcporter\u002F\u003Cserver>\u002F` unless you override `tokenCacheDir`.\n- Stdio commands inherit the directory of the file that defined them (imports or local config).\n- Import precedence matches the array order; omit `imports` to use the default `[\"cursor\", \"claude-code\", \"claude-desktop\", \"codex\", \"windsurf\", \"opencode\", \"vscode\"]`.\n\nProvide `configPath` or `rootDir` to CLI\u002Fruntime calls when you juggle multiple config files side by side.\n\n#### Config resolution order & system-level configs\n\nmcporter reads exactly one primary config per run. The lookup order is:\n\n1. The path you pass via `--config` (or programmatic `configPath`).\n2. The `MCPORTER_CONFIG` environment variable (set it in your shell to apply everywhere).\n3. `\u003Croot>\u002Fconfig\u002Fmcporter.json` inside the current project.\n4. `~\u002F.mcporter\u002Fmcporter.json` or `~\u002F.mcporter\u002Fmcporter.jsonc` if the project file is missing.\n\nAll `mcporter config …` mutations write back to whichever file was selected by that order. To manage a system-wide config explicitly, point the CLI at it:\n\n```bash\nmcporter config --config ~\u002F.mcporter\u002Fmcporter.json add global-server https:\u002F\u002Fapi.example.com\u002Fmcp\n```\n\nSet `MCPORTER_CONFIG=~\u002F.mcporter\u002Fmcporter.json` in your shell profile when you want that file to be the default everywhere (handy for `npx mcporter …` runs).\n\n## Testing and CI\n\n| Command | Purpose |\n| --- | --- |\n| `pnpm check` | Biome formatting plus Oxlint\u002Ftsgolint gate. |\n| `pnpm build` | TypeScript compilation (emits `dist\u002F`). |\n| `pnpm test` | Vitest unit and integration suites (streamable HTTP fixtures included). |\n\nCI runs the same trio via GitHub Actions.\n\n## Related\n- CodexBar 🟦🟩 Keep Codex token windows visible in your macOS menu bar. \u003Chttps:\u002F\u002Fcodexbar.app>.\n- Trimmy ✂️ “Paste once, run once.” Flatten multi-line shell snippets so they paste and run. \u003Chttps:\u002F\u002Ftrimmy.app>.\n- Oracle 🧿 Prompt bundler\u002FCLI for multi-model runs (GPT-5.1, Claude, Gemini). \u003Chttps:\u002F\u002Fgithub.com\u002Fsteipete\u002Foracle>.\n- MCP spec ✨ \u003Chttps:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fspecification>\n\n## Debug Hanging Servers Quickly\n\nUse `tmux` to keep long-running CLI sessions visible while you investigate lingering MCP transports:\n\n```bash\ntmux new-session -- pnpm mcporter:list\n```\n\nLet it run in the background, then inspect the pane (`tmux capture-pane -pt \u003Csession>`), tail stdio logs, or kill the session once the command exits. Pair this with `MCPORTER_DEBUG_HANG=1` when you need verbose handle diagnostics. More detail: [docs\u002Ftmux.md](docs\u002Ftmux.md) and [docs\u002Fhang-debug.md](docs\u002Fhang-debug.md).\n\n## License\n\nMIT -- see [LICENSE](LICENSE).\n\nFurther reading: [docs\u002Ftool-calling.md](docs\u002Ftool-calling.md), [docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md), [docs\u002Fadhoc.md](docs\u002Fadhoc.md), [docs\u002Femit-ts.md](docs\u002Femit-ts.md), [docs\u002Ftmux.md](docs\u002Ftmux.md).\n","# MCPorter 🧳 - 从 TypeScript 调用 MCP 或作为 CLI 使用\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsteipete_mcporter_readme_764ec47514a8.png\" alt=\"MCPorter 头部横幅\" width=\"1100\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmcporter\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmcporter?style=for-the-badge&logo=npm&logoColor=white\" alt=\"npm 版本\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fsteipete\u002Fmcporter\u002Fci.yml?branch=main&style=for-the-badge&label=tests\" alt=\"CI 状态\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatforms-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=for-the-badge\" alt=\"支持平台\">\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green?style=for-the-badge\" alt=\"MIT 许可证\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n_用于模型上下文协议的 TypeScript 运行时、CLI 和代码生成工具包。_\n\nMCPorter 帮助您充分利用 Anthropic 的 **使用 MCP 进行代码执行** 指南中强调的“代码执行”工作流：自动发现系统上已配置的 MCP 服务器，直接调用它们，在 TypeScript 中构建更复杂的自动化流程，并在需要共享工具时生成专用的 CLI。这一切开箱即用——无需样板代码，也无需深入研究模式定义。\n\n## 核心功能\n\n- **零配置发现。** `createRuntime()` 首先合并您的主目录配置 (`~\u002F.mcporter\u002Fmcporter.json[c]`)，然后是 `config\u002Fmcporter.json`，再加上 Cursor\u002FClaude\u002FCodex\u002FWindsurf\u002FOpenCode\u002FVS Code 的导入内容，展开 `${ENV}` 占位符，并复用连接池，以便在多次调用之间重用传输通道。\n- **一键生成 CLI。** `mcporter generate-cli` 可以将任何 MCP 服务器定义转换为开箱即用的 CLI，还可选择打包\u002F编译，并添加元数据以便于重新生成。\n- **类型化的工具客户端。** `mcporter emit-ts` 会生成 `.d.ts` 接口或可以直接使用的客户端封装，使代理或测试能够以强类型的方式调用 MCP 服务器，而无需手动编写底层逻辑。\n- **友好且可组合的 API。** `createServerProxy()` 将工具暴露为符合人体工学的驼峰命名法方法，自动应用 JSON Schema 默认值，验证必填参数，并返回包含 `.text()`、`.markdown()、.json()`、`.images()` 和 `.content()` 辅助方法的 `CallResult` 对象。\n- **OAuth 和 stdio 的便捷性。** 内置的 OAuth 缓存、日志尾随和 stdio 包装器，让您可以通过同一接口处理 HTTP、SSE 和 stdio 传输。\n- **临时连接。** 您可以将 CLI 指向 *任意* MCP 端点（HTTP 或 stdio），无需修改配置；如果需要，稍后再将其持久化保存。对于需要浏览器登录的托管 MCP（如 Supabase、Vercel 等），CLI 会自动检测——只需运行 `mcporter auth \u003Curl>`，CLI 就会即时将该定义升级为 OAuth。更多信息请参阅 [docs\u002Fadhoc.md](docs\u002Fadhoc.md)。\n## 快速入门\n\nMCPorter 会自动发现您已在 Cursor、Claude Code\u002FDesktop、Codex 或本地覆盖配置中的 MCP 服务器。您可以立即使用 `npx` 尝试，无需安装。需要完整的命令参考（标志、模式、返回类型）？请查看 [docs\u002Fcli-reference.md](docs\u002Fcli-reference.md)。\n### 调用语法选项\n\n```bash\n# 冒号分隔的标志（适合 Shell）\nnpx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'\n\n# 函数调用风格（与 `mcporter list` 中的签名一致）\nnpx mcporter call 'linear.create_comment(issueId: \"ENG-123\", body: \"Looks good!\")'\n\n# 以 `--` 开头的字面位置参数\nnpx mcporter call server.tool -- --raw-value\n```\n\n### 列出你的 MCP 服务器\n\n```bash\nnpx mcporter list\nnpx mcporter list context7 --schema\nnpx mcporter list https:\u002F\u002Fmcp.linear.app\u002Fmcp --all-parameters\nnpx mcporter list shadcn.io\u002Fapi\u002Fmcp.getComponents           # URL + 工具后缀自动解析\nnpx mcporter list --stdio \"bun run .\u002Flocal-server.ts\" --env TOKEN=xyz\n```\n\n- 添加 `--json` 可以输出机器可读的摘要，包含每台服务器的状态（认证成功\u002F离线\u002FHTTP 错误次数）以及单服务器运行时的完整工具 Schema 负载。\n- 添加 `--verbose` 可以显示注册该服务器名称的所有配置来源（优先显示主要来源），无论是在文本输出还是 JSON 列表中。\n\n现在你可以将 `mcporter list` 指向临时服务器：直接提供一个 URL，或者使用新的 `--http-url\u002F--stdio` 标志（加上 `--env`、`--cwd`、`--name` 或 `--persist`）来描述任意 MCP 端点。在你保存该定义之前，每次使用 `mcporter call` 时仍需重复相同的 URL 或 stdio 标志——只有通过 `--persist` 或 `mcporter config add` 将其合并到配置中，打印出来的 slug 才能被重复使用（使用 `--scope home|project` 来选择写入目标）。随后可以运行 `mcporter auth https:\u002F\u002F…`（或使用相同的标志集）来完成 OAuth 流程，而无需编辑配置文件。完整详情请参阅 [docs\u002Fadhoc.md](docs\u002Fadhoc.md)。\n\n单服务器的列表现在看起来就像一个 TypeScript 头文件，你可以直接将签名复制粘贴到 `mcporter call` 中：\n\n```ts\nlinear - 托管于 Linear 的 MCP；提供问题搜索、创建及工作流工具。\n  23 个工具 · 1654ms · HTTP https:\u002F\u002Fmcp.linear.app\u002Fmcp\n\n  \u002F**\n   * 在特定的 Linear 问题上创建评论\n   * @param issueId 问题 ID\n   * @param body 评论内容（Markdown 格式）\n   * @param parentId? 回复的父级评论 ID\n   *\u002F\n  function create_comment(issueId: string, body: string, parentId?: string);\n  \u002F\u002F 可选参数 (3): notifySubscribers, labelIds, mentionIds\n\n  \u002F**\n   * 列出用户 Linear 工作空间中的文档\n   * @param query? 可选的搜索查询\n   * @param projectId? 按项目 ID 过滤\n   *\u002F\n  function list_documents(query?: string, projectId?: string);\n  \u002F\u002F 可选参数 (11): limit, before, after, orderBy, initiativeId, ...\n```\n\n以下是当你运行 `npx mcporter list vercel` 时，Vercel 的显示效果：\n\n```ts\nvercel - Vercel 的 MCP（需要 OAuth 认证）。\n\n  \u002F**\n   * 搜索 Vercel 官方文档。\n   * 使用此工具可以解答关于 Vercel 平台、功能和最佳实践的各种问题，\n   * 包括：\n   * - 核心概念：项目、部署、Git 集成、预览部署、环境\n   * - 前端与框架：Next.js、SvelteKit、Nuxt、Astro、Remix 等框架的配置与优化\n   * - API：REST API、Vercel SDK、构建输出 API\n   * - 计算：Fluid Compute、函数、路由中间件、定时任务、OG 图像生成、沙盒、数据缓存\n   * - AI：Vercel AI SDK、AI Gateway、MCP、v0\n   * - 性能与交付：边缘网络、缓存、CDN、图像优化、头部信息、重定向与重写\n   * - 定价：套餐、支出管理、计费\n   * - 安全：审计日志、防火墙、机器人管理、BotID、OIDC、RBAC、安全计算、双因素认证\n   * - 存储：博客、边缘配置\n   *\n   * @param topic 文档搜索的重点主题（例如“路由”、“数据获取”）。\n   * @param tokens? 结果中包含的最大 token 数量。默认为 2500。\n   *\u002F\n  function search_vercel_documentation(topic: string, tokens?: number);\n\n  \u002F**\n   * 将当前项目部署到 Vercel\n   *\u002F\n  function deploy_to_vercel();\n```\n\n必填参数始终显示；可选参数则默认隐藏，除非满足以下条件之一：(a) 可选参数仅有一两个，且必填字段少于四个；或者 (b) 你使用了 `--all-parameters` 标志。每当 MCPorter 隐藏参数时，它都会打印一条提示：“可选参数已隐藏；使用 --all-parameters 查看所有字段。”这样你就知道如何展开完整的参数列表。返回值类型会根据工具 Schema 中的 `title` 自动推断，如果无法确定，则直接省略返回值类型，而不是进行猜测。\n\n### Context7：获取文档（无需认证）\n\n```bash\nnpx mcporter call context7.resolve-library-id libraryName=react\nnpx mcporter call context7.get-library-docs context7CompatibleLibraryID=\u002Fwebsites\u002Freact_dev topic=hooks\n```\n\n### Linear：搜索文档（需要设置 LINEAR_API_KEY）\n\n```bash\nLINEAR_API_KEY=sk_linear_example npx mcporter call linear.search_documentation query=\"automations\"\n```\n\n### Chrome 开发者工具：截取当前标签页快照\n\n```bash\nnpx mcporter call chrome-devtools.take_snapshot\nnpx mcporter call 'linear.create_comment(issueId: \"LNR-123\", body: \"Hello world\")'\nnpx mcporter call https:\u002F\u002Fmcp.linear.app\u002Fmcp.list_issues assignee=me\nnpx mcporter call shadcn.io\u002Fapi\u002Fmcp.getComponent component=vortex   # 协议可选；默认为 https\nnpx mcporter call linear.listIssues --tool listIssues   # 自动更正为 list_issues\nnpx mcporter linear.list_issues                         # 简写：推断出 `call`\nVERCEL_ACCESS_TOKEN=sk_vercel_example npx mcporter call \"npx -y vercel-domains-mcp\" domain=answeroverflow.com  # 引号内的标准输入命令 + 单一工具推断\n```\n\n> 工具调用理解类似 JavaScript 的调用语法，会自动纠正拼写接近的工具名称，并提供更丰富的内联使用提示。有关语法，请参阅 [docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md)，关于自动纠正规则，请参阅 [docs\u002Fcall-heuristic.md](docs\u002Fcall-heuristic.md)。\n\n有用的标志：\n\n- `--config \u003Cpath>` -- 自定义配置文件（默认为 `.\u002Fconfig\u002Fmcporter.json`）。\n- `--root \u003Cpath>` -- 标准输入命令的工作目录。\n- `--log-level \u003Cdebug|info|warn|error>` -- 调整日志详细程度（优先级高于 `MCPORTER_LOG_LEVEL`）。\n- `--oauth-timeout \u003Cms>` -- 缩短或延长 OAuth 浏览器等待时间；等同于 `MCPORTER_OAUTH_TIMEOUT_MS` 或 `MCPORTER_OAUTH_TIMEOUT`。\n- `--tail-log` -- 流式输出工具响应中引用的任何日志文件的最后 20 行。\n- `--output \u003Cformat>` 或 `--raw` -- 控制格式化输出（默认为自动检测并美化输出）。\n- `--save-images \u003Cdir>`（在 `mcporter call` 中）-- 将 MCP 图像内容块保存到指定目录下的文件中（需手动启用；标准输出格式保持不变）。\n- `--raw-strings`（在 `mcporter call` 中）-- 将看起来像数字的参数值（对于 `key=value`、`key:value` 和尾随位置参数）保留为字符串。\n- `--no-coerce`（在 `mcporter call` 中）-- 将所有 `key=value` 和位置参数保留为原始字符串（禁用布尔值\u002F空值\u002F数字\u002FJSON 的强制转换）。\n- `--`（在 `mcporter call` 中）-- 停止标志解析，使剩余的标记作为字面量位置参数，即使它们以 `--` 开头。\n- `--json`（在 `mcporter list` 中）-- 输出 JSON 摘要\u002F计数，而不是文本。多服务器运行会报告每个服务器的状态、计数和连接问题；单服务器运行则包含完整的工具元数据。\n- `--output json\u002Fraw`（在 `mcporter call` 中）-- 当连接失败时，MCPorter 会打印常规的彩色提示信息，同时还会发出一个结构化的 `{ server, tool, issue }` 封装，以便脚本可以程序化地处理身份验证、离线或 HTTP 错误。\n- `--json`（在 `mcporter auth` 中）-- 当 OAuth\u002F传输设置失败时，始终输出相同的结构化连接封装，而不是抛出错误。\n- `--json`（在 `mcporter emit-ts` 中）-- 打印一个描述已生成文件的 JSON 摘要（模式 + 输出路径），而不是文本日志——这在脚本内部生成工件时非常有用。\n- `--all-parameters` -- 列出服务器时显示所有模式字段（默认输出至少显示五个参数以及其余参数的摘要）。\n- `--http-url \u003Chttps:\u002F\u002F…>` \u002F `--stdio \"command …\"` -- 内联描述一个临时的 MCP 服务器。标准输入传输现在会自动继承当前的 Shell 环境；只有当需要与 `--cwd`、`--name` 或 `--persist \u003Cconfig.json>` 一起注入\u002F覆盖变量时，才添加 `--env KEY=value`。这些标志现在也适用于 `mcporter auth`，因此 `mcporter auth https:\u002F\u002Fmcp.example.com\u002Fmcp` 即可正常工作。\n- 对于受 OAuth 保护的服务器，例如 `vercel`，只需运行一次 `npx mcporter auth vercel` 即可完成登录。\n\n> 小贴士：您可以完全省略动词——`mcporter firecrawl` 会自动运行 `mcporter list firecrawl`，而带有点号的标记，如 `mcporter linear.list_issues`，也会被分派到调用命令（包括拼写修正）。\n\n超时默认为 30 秒；如果您预计启动较慢，可以使用 `MCPORTER_LIST_TIMEOUT` 或 `MCPORTER_CALL_TIMEOUT` 进行覆盖。OAuth 浏览器握手有单独的 60 秒宽限期；当您需要 CLI 在诊断顽固的身份验证流程时更快地退出时，可以传递 `--oauth-timeout \u003Cms>`（或导出 `MCPORTER_OAUTH_TIMEOUT_MS`）。\n\n### 无需编辑配置即可尝试 MCP\n\n```bash\n# 直接指向 HTTPS MCP 服务器\nnpx mcporter list --http-url https:\u002F\u002Fmcp.linear.app\u002Fmcp --name linear\n\n# 通过 Bun 运行本地标准输入 MCP 服务器\nnpx mcporter call --stdio \"bun run .\u002Flocal-server.ts\" --name local-tools\n```\n\n- 添加 `--persist config\u002Fmcporter.local.json` 可以保存推断出的定义，供以后使用。\n- 如果确实需要访问明文端点，请使用 `--allow-http`。\n- 更多深入信息请参阅 [docs\u002Fadhoc.md](docs\u002Fadhoc.md)（环境覆盖、工作目录、OAuth）。\n\n### 使用守护进程保持 MCP 服务器常驻\n\n- `chrome-devtools`、`mobile-mcp` 等有状态的标准输入服务器会在您首次调用它们时自动启动一个基于登录的守护进程，从而使 Chrome 标签页和设备会话在不同代理之间保持活跃。\n- 使用 `mcporter daemon status` 可以检查守护进程是否正在运行（以及哪些服务器已连接）。\n- 随时可以使用 `mcporter daemon stop` 停止它，使用 `mcporter daemon start` 提前预热，或在调整配置\u002F环境后通过 `mcporter daemon restart` 重启它。\n- 其他服务器仍然是短暂的；如果希望守护进程管理某个服务器，可以在服务器条目中添加 `\"lifecycle\": \"keep-alive\"`（或设置 `MCPORTER_KEEPALIVE=name`）。您也可以设置 `\"lifecycle\": \"ephemeral\"`（或 `MCPORTER_DISABLE_KEEPALIVE=name`）来选择退出。\n- 守护进程仅管理来自您的配置\u002F导入的命名服务器。通过 `--stdio …`、`--http-url …` 或内联函数调用语法调用的临时 STDIO\u002FHTTP 目标目前仍属于进程级别；如果您希望它们参与共享的守护进程，可以将它们持久化到 `config\u002Fmcporter.json`（或使用 `--persist`）。\n- 故障排除？运行 `mcporter daemon start --log`（或 `--log-file \u002Ftmp\u002Fdaemon.log`）将 stdout\u002Fstderr 重定向到文件，并添加 `--log-servers chrome-devtools` 以仅获取特定 MCP 的调用轨迹。每个服务器的配置也可以设置 `\"logging\": { \"daemon\": { \"enabled\": true } }`，以强制对该条目进行详细日志记录。\n\n## 更友好的工具调用\n\n- **函数调用语法。** 不再需要纠结于 `--flag value`，你可以直接以 `mcporter call 'linear.create_issue(title: \"Bug\", team: \"ENG\")'` 的方式调用工具。解析器支持嵌套对象\u002F数组，在依赖 Schema 顺序时可省略标签（例如 `mcporter 'context7.resolve-library-id(\"react\")'`），并清晰地展示 Schema 验证错误。详细内容请参阅 [docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md)。\n- **短横线形式的标志仍有效。** 倾向于使用 CLI 风格的参数吗？可以继续使用 `mcporter linear.create_issue title=value team=value`、`title=value`、`title:value`，甚至 `title: value`——CLI 现在会将这三种形式统一处理。\n- **未知的长标志会快速报错。** `mcporter call server.tool --source import` 现在会报错，而不会将 `--source` 默默转换为位置参数。请改用 `source=import`、`--args '{\"source\":\"import\"}'`，或在以 `--` 开头的字面量位置参数前插入 `--`。\n- **速查表。** 请参阅 [docs\u002Ftool-calling.md](docs\u002Ftool-calling.md)，其中对比了所有支持的调用方式（自动推断的动词、标志、函数调用以及自定义 URL）。\n- **自动更正。** 如果你拼错了工具名称，MCPorter 会检查服务器的工具目录，在编辑距离很小的情况下重试，否则会提示“您是不是想说……？”该启发式方法及其调整方式记录在 [docs\u002Fcall-heuristic.md](docs\u002Fcall-heuristic.md) 中。\n- **单服务器输出更丰富。** `mcporter list \u003Cserver>` 现在会打印 TypeScript 风格的签名、内联注释、返回值结构提示以及与新调用语法一致的命令示例。可选参数默认隐藏——如需完整 JSON Schema，可添加 `--all-parameters` 或 `--schema`。\n\n\n## 安装\n\n### 使用 `npx` 即刻运行\n\n```bash\nnpx mcporter list\n```\n\n### 添加到你的项目\n\n```bash\npnpm add mcporter\n```\n\n### Homebrew (steipete\u002Ftap)\n\n```bash\nbrew tap steipete\u002Ftap\nbrew install steipete\u002Ftap\u002Fmcporter\n```\n\n> 此 tap 与 MCPorter 0.3.2 同步发布。若遇到旧版 tap 安装问题，请先运行 `brew update` 再重新安装。\n\n## 从代码中进行一次性调用\n\n```ts\nimport { callOnce } from \"mcporter\";\n\nconst result = await callOnce({\n\tserver: \"firecrawl\",\n\ttoolName: \"crawl\",\n\targs: { url: \"https:\u002F\u002Fanthropic.com\" },\n});\n\nconsole.log(result); \u002F\u002F 原始 MCP 封装\n```\n\n`callOnce` 会自动发现所选服务器（包括 Cursor\u002FClaude\u002FCodex\u002FWindsurf\u002FOpenCode\u002FVS Code 导入），处理 OAuth 提示，并在完成时关闭传输连接。它非常适合手动执行或将 MCPorter 直接集成到代理工具钩子中。\n\n## 使用运行时编排自动化流程\n\n```ts\nimport { createRuntime } from \"mcporter\";\n\nconst runtime = await createRuntime();\n\nconst tools = await runtime.listTools(\"context7\");\nconst result = await runtime.callTool(\"context7\", \"resolve-library-id\", {\n\targs: { libraryName: \"react\" },\n});\n\nconsole.log(result); \u002F\u002F 自动打印 JSON\u002F文本，因为 CLI 默认会美化输出\nawait runtime.close(); \u002F\u002F 关闭传输连接和 OAuth 会话\n```\n\n当你需要连接池、重复调用，或高级选项如显式超时和日志流式传输时，就使用 `createRuntime()`。运行时会复用传输连接，刷新 OAuth 令牌，只有在调用 `runtime.close()` 时才会彻底关闭所有资源。\n\n## 在代码中组合工具\n\n运行时 API 专为代理和脚本设计，而不仅仅是供终端用户使用。\n\n```ts\nimport { createRuntime, createServerProxy } from \"mcporter\";\n\nconst runtime = await createRuntime();\nconst chrome = createServerProxy(runtime, \"chrome-devtools\");\nconst linear = createServerProxy(runtime, \"linear\");\n\nconst snapshot = await chrome.takeSnapshot();\nconsole.log(snapshot.text());\n\nconst docs = await linear.searchDocumentation({\n\tquery: \"automations\",\n\tpage: 0,\n});\nconsole.log(docs.json());\n```\n\n代理和结果辅助函数内置友好的人机交互设计：\n\n- 属性名从驼峰式映射到短横线分隔的工具名称（`takeSnapshot` -> `take_snapshot`）。\n- 位置参数会自动映射到 Schema 必填字段，而选项对象则遵循 JSON Schema 默认值。\n- 结果会被封装在 `CallResult` 中，因此你可以选择 `.text()`、`.markdown()`、`.json()`、`.images()`、`.content()`，或者在需要完整包裹时访问 `.raw`。\n- 当你需要对参数、元数据或流式传输选项进行显式控制时，可以直接调用 `runtime.callTool()`。\n\n\n随时运行 `mcporter list \u003Cserver>`，即可获取 TypeScript 风格的签名、可选参数提示以及与 CLI 函数调用语法匹配的示例调用。\n\n## 生成独立 CLI\n\n将任何服务器定义转换为可共享的 CLI 工具：\n\n```bash\nnpx mcporter generate-cli \\\n  --command https:\u002F\u002Fmcp.context7.com\u002Fmcp\n\n# 输出：\n#   context7.ts        （嵌入 Schema 的 TypeScript 模板）\n#   context7.js        （根据运行时环境通过 Rolldown 或 Bun 打包的 CLI）\n```\n\n> 可以通过这个小技巧将 chrome-devtools MCP 转换为 CLI：\n>\n> `npx mcporter generate-cli --command \"npx -y chrome-devtools-mcp@latest\"`\n\n提示：当内联命令是第一个位置参数时，可以省略 `--command`（例如 `npx mcporter generate-cli \"npx -y chrome-devtools-mcp@latest\"`）。\n- `--name` 可覆盖推断出的 CLI 名称。\n- 如果希望在生成的帮助输出中显示自定义摘要，可添加 `--description \"...\"`（否则，mcporter 会在生成过程中向 MCP 服务器请求其描述或标题）。\n- 生成的 CLI 继承了与 `mcporter` 相同的彩色帮助布局：不带参数调用二进制文件会显示嵌入的工具列表及快速入门指南，而每个 `--help` 页面在标准输出为 TTY 时都会使用粗体标题和浅色描述。\n- 添加 `--bundle [path]` 可同时输出打包文件（目标 Node.js 时使用 Rolldown，运行时确定为 Bun 时则自动使用 Bun；可通过 `--bundler rolldown|bun` 强制指定）。\n- `--output \u003Cpath>` 可将模板输出到特定路径。\n- `--runtime bun|node` 可选择生成代码的运行时环境（`--compile` 需要 Bun 运行时）。\n- 添加 `--compile` 可生成经过 Bun 编译的二进制文件；若不指定 `--bundle`，MCPorter 会清理中间打包文件。\n- 使用 `--include-tools a,b,c` 或 `--exclude-tools a,b,c` 可为部分工具生成 CLI（二者互斥）。\n- 使用 `--from \u003Cartifact>`（可选 `--dry-run`）可根据现有 CLI 的嵌入元数据重新生成。\n- 如果服务器已存在于你的配置或导入中，建议使用位置简写形式：`npx mcporter generate-cli linear --bundle dist\u002Flinear.js`。\n- `--server`\u002F`--command` 接受 HTTP URL、可选的 `.tool` 后缀，甚至无协议的主机名（`shadcn.io\u002Fapi\u002Fmcp.getComponents`）。\n\n每个工件都嵌入了再生元数据（生成器版本、解析后的服务器定义、调用参数）。使用以下命令：\n\n```\nnpx mcporter inspect-cli dist\u002Fcontext7.js     # 人类可读的摘要\nnpx mcporter generate-cli --from dist\u002Fcontext7.js  # 使用最新 mcporter 重新生成\n```\n\n## 生成类型化客户端\n\n当您需要强类型的工具支持，但又不想打包完整的 CLI 时，可以使用 `mcporter emit-ts`。它复用了与 `mcporter list` 相同的签名和文档块，因此生成的类型定义文件会始终与 CLI 的输出保持同步。\n\n```bash\n# 仅类型接口（Promise 签名）\nnpx mcporter emit-ts linear --out types\u002Flinear-tools.d.ts\n\n# 客户端封装（在 .d.ts 文件旁边创建一个可重用的代理工厂）\nnpx mcporter emit-ts linear --mode client --out clients\u002Flinear.ts\n```\n\n- `--mode types`（默认）会生成一个 `.d.ts` 接口文件，您可以将其导入到任何地方。\n- `--mode client` 会同时生成 `.d.ts` 文件和一个 `.ts` 辅助文件，该文件为您封装了 `createRuntime` 和 `createServerProxy`。\n- 如果希望所有可选字段都明确列出，请添加 `--include-optional` 标志（这与 `mcporter list --all-parameters` 的行为一致）。\n- 在脚本中使用 `emit-ts` 时，添加 `--json` 标志可以输出结构化的摘要信息（包括模式和输出路径），而不是纯文本日志。\n- `\u003Cserver>` 参数也支持 HTTP URL 和带有 `.tool` 后缀或缺少协议的 URL，其行为与主 CLI 一致。\n\n完整标志参考以及生成文件的内联快照，请参阅 [docs\u002Femit-ts.md](docs\u002Femit-ts.md)。\n\n## 配置参考\n\n如果您不想手动编辑 JSON 文件，可以使用 `mcporter config list|get|add|remove|import` 来管理此文件；完整操作指南请参阅 [docs\u002Fconfig.md](docs\u002Fconfig.md)。配置文件以 JSONC 格式解析，因此在 `mcporter.json` 和 `mcporter.jsonc` 中都支持行内 `\u002F\u002F` 和 `\u002F* ... *\u002F` 注释，以及尾随逗号。\n\n### 使用 `mcporter config` 管理配置\n\n通过您的包管理器（pnpm、npm、npx 等）运行 `mcporter config …` 命令，即可获得项目 MCP 的交互式视图：\n\n- `config list` 默认仅显示本地条目，并在 TTY 终端上打印其他所有配置文件（Cursor、Claude、Windsurf、VS Code 等）的摘要信息，包括计数和示例名称。添加 `--source import` 可直接查看导入的条目，或使用 `--json` 进行脚本化。\n- `config get\u002Fremove\u002Flogout` 复用了 `mcporter list`\u002F`call` 中的模糊匹配逻辑，因此像 `sshadcn` 这样的拼写错误会自动更正为 `shadcn`（并显示一条浅色提示），而模糊名称则会提示“您是否想输入……？”。\n- `config import \u003Ckind> --copy` 会将编辑器管理的条目导入到 `config\u002Fmcporter.json` 中，使您可以在本地对其进行自定义或移除，而无需修改上游文件。\n- 每个子命令都支持 `--config \u003Cpath>` 和 `--root \u003Cdir>` 选项，方便您切换多个项目配置或工作区特定的覆盖设置。\n\n`config\u002Fmcporter.json` 的结构与 Cursor\u002FClaude 的配置相同：\n\n```jsonc\n{\n\t\"mcpServers\": {\n\t\t\"context7\": {\n\t\t\t\"description\": \"Context7 文档 MCP\",\n\t\t\t\"baseUrl\": \"https:\u002F\u002Fmcp.context7.com\u002Fmcp\",\n\t\t\t\"headers\": {\n\t\t\t\t\"Authorization\": \"$env:CONTEXT7_API_KEY\"\n\t\t\t}\n\t\t},\n\t\t\"chrome-devtools\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"chrome-devtools-mcp@latest\"],\n\t\t\t\"env\": { \"npm_config_loglevel\": \"error\" }\n\t\t}\n\t},\n\t\"imports\": [\"cursor\", \"claude-code\", \"claude-desktop\", \"codex\", \"windsurf\", \"opencode\", \"vscode\"]\n}\n```\n\nMCPorter 为您处理以下内容：\n\n- 对标头和环境变量条目进行 `${VAR}`、`${VAR:-fallback}` 和 `$env:VAR` 替换。\n- 自动缓存 OAuth 令牌至 `~\u002F.mcporter\u002F\u003Cserver>\u002F` 目录下，除非您覆盖了 `tokenCacheDir` 设置。\n- 标准输入输出命令会继承定义它们的文件所在的目录（无论是导入的还是本地配置）。\n- 导入优先级按数组顺序排列；省略 `imports` 则使用默认值 `[\"cursor\", \"claude-code\", \"claude-desktop\", \"codex\", \"windsurf\", \"opencode\", \"vscode\"]`。\n\n当您需要并排管理多个配置文件时，可以通过 CLI 或运行时调用提供 `configPath` 或 `rootDir` 参数。\n\n#### 配置解析顺序及系统级配置\n\nMCPorter 每次运行只会读取一份主配置文件。查找顺序如下：\n\n1. 您通过 `--config` 传递的路径（或程序化的 `configPath`）。\n2. `MCPORTER_CONFIG` 环境变量（在您的 shell 中设置后，将在全局生效）。\n3. 当前项目的 `\u003Croot>\u002Fconfig\u002Fmcporter.json` 文件。\n4. 如果项目文件缺失，则使用 `~\u002F.mcporter\u002Fmcporter.json` 或 `~\u002F.mcporter\u002Fmcporter.jsonc`。\n\n所有 `mcporter config …` 命令的更改都会写回到按照上述顺序选定的配置文件中。要显式管理系统级配置，只需将 CLI 指向该文件即可：\n\n```bash\nmcporter config --config ~\u002F.mcporter\u002Fmcporter.json add global-server https:\u002F\u002Fapi.example.com\u002Fmcp\n```\n\n在您的 shell 配置文件中设置 `MCPORTER_CONFIG=~\u002F.mcporter\u002Fmcporter.json`，即可使该文件成为全局默认配置（这对于 `npx mcporter …` 命令非常方便）。\n\n## 测试与 CI\n\n| 命令 | 用途 |\n| --- | --- |\n| `pnpm check` | Biome 格式化检查，同时进行 Oxlint\u002Ftsgolint 代码质量检查。 |\n| `pnpm build` | TypeScript 编译（输出到 `dist\u002F` 目录）。 |\n| `pnpm test` | Vitest 单元测试和集成测试套件（包含可流式传输的 HTTP 测试数据）。 |\n\nCI 通过 GitHub Actions 运行相同的三个步骤。\n\n## 相关资源\n- CodexBar 🟦🟩 让 Codex 的令牌窗口始终显示在 macOS 菜单栏中。\u003Chttps:\u002F\u002Fcodexbar.app>。\n- Trimmy ✂️ “粘贴一次，运行一次。” 将多行 Shell 片段简化为可直接粘贴并运行的形式。\u003Chttps:\u002F\u002Ftrimmy.app>。\n- Oracle 🧿 多模型运行的提示词打包工具及 CLI（GPT-5.1、Claude、Gemini 等）。\u003Chttps:\u002F\u002Fgithub.com\u002Fsteipete\u002Foracle>。\n- MCP 规范 ✨ \u003Chttps:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fspecification>。\n\n## 快速调试挂起的服务器\n\n使用 `tmux` 保持长时间运行的 CLI 会话可见，以便您调查滞留的 MCP 传输问题：\n\n```bash\ntmux new-session -- pnpm mcporter:list\n```\n\n让其在后台运行，然后检查当前窗格的内容（`tmux capture-pane -pt \u003Csession>`）、跟踪标准输出日志，或在命令退出后终止会话。结合 `MCPORTER_DEBUG_HANG=1` 标志，可以获得详细的句柄诊断信息。更多详细信息请参阅 [docs\u002Ftmux.md](docs\u002Ftmux.md) 和 [docs\u002Fhang-debug.md](docs\u002Fhang-debug.md)。\n\n## 许可证\n\nMIT 许可证 — 请参阅 [LICENSE](LICENSE)。\n\n延伸阅读：[docs\u002Ftool-calling.md](docs\u002Ftool-calling.md)、[docs\u002Fcall-syntax.md](docs\u002Fcall-syntax.md)、[docs\u002Fadhoc.md](docs\u002Fadhoc.md)、[docs\u002Femit-ts.md](docs\u002Femit-ts.md)、[docs\u002Ftmux.md](docs\u002Ftmux.md)。","# MCPorter 快速上手指南\n\nMCPorter 是一个用于 Model Context Protocol (MCP) 的 TypeScript 运行时、CLI 工具和代码生成套件。它能帮助你零配置发现系统中已配置的 MCP 服务器，直接调用工具，或使用 TypeScript 编写自动化脚本。\n\n## 环境准备\n\n*   **操作系统**: macOS, Linux, 或 Windows\n*   **运行环境**: 需要安装 [Node.js](https:\u002F\u002Fnodejs.org\u002F) (建议 v18 或更高版本)\n*   **前置依赖**: 无需额外安装，支持通过 `npx` 直接运行。若需长期开发，可全局安装。\n\n## 安装步骤\n\n你可以选择直接使用 `npx` 运行（推荐尝试），或者全局安装以便频繁使用。\n\n**方式一：直接使用 (无需安装)**\n```bash\nnpx mcporter list\n```\n\n**方式二：全局安装**\n```bash\nnpm install -g mcporter\n```\n\n> **提示**: 国内开发者若遇到 npm 下载缓慢，可临时切换至淘宝镜像源：\n> ```bash\n> npm config set registry https:\u002F\u002Fregistry.npmmirror.com\n> ```\n\n## 基本使用\n\nMCPorter 会自动发现你在 Cursor、Claude Code、VS Code 等工具中已配置的 MCP 服务器。\n\n### 1. 查看可用的 MCP 服务器\n列出所有已发现的服务及其提供的工具列表：\n```bash\nnpx mcporter list\n```\n\n查看特定服务器的详细工具签名（类似 TypeScript 定义）：\n```bash\nnpx mcporter list linear\n```\n\n### 2. 调用 MCP 工具\nMCPorter 支持多种调用语法，以下是最常用的几种方式：\n\n**使用冒号分隔参数 (Shell 友好):**\n```bash\nnpx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'\n```\n\n**使用函数调用风格 (匹配 `list` 输出的签名):**\n```bash\nnpx mcporter call 'linear.create_comment(issueId: \"ENG-123\", body: \"Looks good!\")'\n```\n\n**调用无需认证的公共服务 (例如获取 React 文档):**\n```bash\nnpx mcporter call context7.resolve-library-id libraryName=react\n```\n\n**调用需要环境变量认证的服务:**\n```bash\nLINEAR_API_KEY=sk_linear_example npx mcporter call linear.search_documentation query=\"automations\"\n```\n\n### 3. 处理 OAuth 认证\n对于需要浏览器登录的服务（如 Vercel），先运行 auth 命令完成授权：\n```bash\nnpx mcporter auth vercel\n```\n授权完成后，即可像普通工具一样直接调用。\n\n### 4. 生成 TypeScript 类型定义\n为当前配置的服务生成 `.d.ts` 文件，以便在代码中获得完整的类型提示：\n```bash\nmcporter emit-ts\n```","某全栈开发者需要在 TypeScript 项目中集成 Linear（项目管理）和 Supabase（数据库）的 MCP 服务，以构建自动化的工单同步脚本。\n\n### 没有 mcporter 时\n- **手动编写样板代码**：开发者必须手写大量 JSON-RPC 通信逻辑来连接 MCP 服务器，处理底层的 stdio 或 HTTP 传输细节，耗时且易错。\n- **类型安全缺失**：调用远程工具时缺乏 TypeScript 类型提示，参数错误只能等到运行时才暴露，调试成本极高。\n- **配置管理混乱**：需手动解析不同 IDE（如 Cursor、VS Code）的配置文件来发现已注册的 MCP 服务，难以统一环境变量和认证信息。\n- **CLI 分发困难**：若想将同步逻辑分享给团队成员，需额外编写独立的命令行包装器并处理依赖打包，流程繁琐。\n\n### 使用 mcporter 后\n- **零配置直接调用**：mcporter 自动发现系统中已配置的 Linear 和 Supabase 服务，通过 `createServerProxy()` 即可像调用本地函数一样直接使用，无需任何连接代码。\n- **自动生成类型定义**：运行 `mcporter emit-ts` 即刻生成强类型的 `.d.ts` 接口文件，IDE 提供完整的参数智能提示和校验，彻底消除运行时参数错误。\n- **统一认证与连接池**：内置 OAuth 缓存和自动登录机制，轻松处理 Supabase 等需要浏览器验证的服务，并自动复用连接池提升执行效率。\n- **一键生成 CLI 工具**：通过 `mcporter generate-cli` 命令，瞬间将同步脚本打包为独立的可执行文件，团队成员无需安装环境即可直接运行。\n\nmcporter 将复杂的 MCP 协议交互转化为直观的 TypeScript API 体验，让开发者专注于业务逻辑而非底层通信设施。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsteipete_mcporter_30cb56ba.png","steipete","Peter Steinberger","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsteipete_d1c5c0c3.jpg","Came back from retirement to mess with AI. Clawdfather @OpenClaw\r\n\r\nPreviously: Founder of @PSPDFKit.","Full-Time Open-Sourcerer","Vienna & London","peter@steipete.me","http:\u002F\u002Fsteipete.me","https:\u002F\u002Fgithub.com\u002Fsteipete",[86,90,94],{"name":87,"color":88,"percentage":89},"TypeScript","#3178c6",98.2,{"name":91,"color":92,"percentage":93},"JavaScript","#f1e05a",1.4,{"name":95,"color":96,"percentage":97},"Shell","#89e051",0.4,4019,253,"2026-04-17T09:21:38","NOASSERTION","macOS, Linux, Windows","未说明",{"notes":105,"python":103,"dependencies":106},"该工具是基于 TypeScript 的运行时和 CLI 工具，用于调用 MCP (Model Context Protocol) 服务器。无需安装即可通过 npx 运行。支持通过 OAuth 进行身份验证，可自动发现已配置的 MCP 服务器（如 Cursor, Claude, VS Code 等）。主要依赖 Node.js 环境，未提及具体的 Python 或 GPU 需求。",[107,87],"Node.js (支持 npx)",[14],[110,111,112],"cli","mcp","ts-api",null,"2026-03-27T02:49:30.150509","2026-04-18T00:47:16.663126",[117,122,127,132,137,142],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},38384,"在尝试对 Notion MCP 服务器进行身份验证时，出现 SSE 401 错误怎么办？","这是一个已知的 OAuth 传输问题。解决方法是在配置文件中显式添加 \"auth\" 字段。配置文件示例如下：\n{\n  \"mcpServers\": {\n    \"notion\": {\n      \"baseUrl\": \"https:\u002F\u002Fmcp.notion.com\u002Fmcp\",\n      \"auth\": \"oauth\"\n    }\n  }\n}\n此外，如果添加使用 HTTP 流（而非 SSE）的 MCP 服务器，建议在命令中直接使用 --auth 标志：\nmcporter config add foo http:\u002F\u002Fmcp.foo.com\u002Fmcp --auth oauth","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F38",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},38385,"如何正确配置和连接 Atlassian MCP 服务器？","Atlassian 现在推荐使用新的端点地址。旧版的 \u002Fv1\u002Fsse 可能在新流程中不稳定。请将配置中的 URL 更改为：\nhttps:\u002F\u002Fmcp.atlassian.com\u002Fv1\u002Fmcp\n使用 mcp-remote@latest 连接此新端点通常可以成功登录并解决认证无反应的问题。","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F26",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},38386,"运行 `npx mcporter list` 提示\"未配置 MCP 服务器\"，但实际上已在 Codex 中配置了，如何解决？","这是版本 0.3.3 中的一个解析器 Bug，导致无法自动读取 Codex 的全局配置文件（~\u002F.codex\u002Fconfig.toml）。该问题已在版本 0.4.0 中修复。请将 mcporter 升级到 0.4.0 或更高版本即可解决。","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F3",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},38387,"为什么 `call` 命令的 `--output json` 标志输出的不是有效的 JSON 格式（导致 jq 无法使用）？","这是因为旧版本使用了单引号输出，不符合标准 JSON 规范。该问题已通过 PR #128 修复并合并到主分支。更新到最新版本后，工具将保持原始可解析的 JSON 输出，不再回退到类似 inspect 的输出格式，从而可以直接配合 jq 等工具使用。","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F80",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},38388,"在对 Granola MCP 进行 OAuth 认证时遇到 `invalid_redirect_uri` 或 `invalid_scope` 错误怎么办？","Granola MCP 存在两个兼容性问题：\n1. 它不支持硬编码的 `mcp:tools` 范围（scope），会报 `invalid_scope`。\n2. 它的资源服务器会拒绝第三方客户端的令牌。\n这主要是 Granola 侧 WorkOS OAuth 设置的限制。虽然代码层面已尝试移除硬编码 scope 并处理重定向逻辑，但如果问题依旧，可能需要等待 Granola 官方修复其 OAuth 配置以支持第三方客户端。","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F67",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},38389,"在尝试认证 Linear MCP 服务器时程序崩溃或认证流程失败怎么办？","这是一个已知的复现问题，特别是在 macOS 环境下使用 Linear 远程 MCP 服务器时。表现为首次认证看似成功，但后续调用失败或程序崩溃。建议检查是否使用了最新版本的 mcporter，因为维护者已确认能复现此问题并正在修复中。如果急需使用，可尝试在无凭据模式下调用看是否暂时绕过，但这并非长久之计，请密切关注官方发布的修复版本。","https:\u002F\u002Fgithub.com\u002Fsteipete\u002Fmcporter\u002Fissues\u002F36",[148,153,158,163,168,173,178,183,188,193,198,203,208,213,218,223,228,233,238,243],{"id":149,"version":150,"summary_zh":151,"released_at":152},306551,"v0.8.1","## [0.8.1] - 2026-03-29\n\n### CLI\n- 使用 Bun 编译的 Homebrew 二进制文件现在会在启动前嵌入包版本，因此 `mcporter --version` 会报告实际的发布版本（例如 `0.8.1`），而不再回退到 `0.0.0-dev`。\n\n### 测试\n- 为 Bun 编译包装器添加了回归测试覆盖，以确保未来发布的构建始终保留嵌入的运行时版本。\n\n### 工具链 \u002F 依赖项\n- 现在 npm 发布使用显式的包白名单，这样本地发布的 tarball 和校验和文件就不会被打包进发布的包中。\n\nSHA256 (mcporter-macos-arm64-v0.8.1.tar.gz): `7f726f70801bdded163699b53fade8b602c18f0dbc07851ce5ddad8e0e8bcb3b`\nSHA256 (mcporter-0.8.1.tgz): `07abbbc8e3ffbaf1fd2a8030a90b56a5c895f52cfa301b42ff79cbaa0644242e`\n\n","2026-03-29T02:18:46",{"id":154,"version":155,"summary_zh":156,"released_at":157},306552,"v0.8.0","## [0.8.0] - 2026-03-29\n\n### CLI\n- 在 OAuth 流程与认证后传输失败之间保持区分，使无效的 OAuth\u002F提供商错误能够直接显现，而真正的旧版 404\u002F405 传输不匹配仍会正确回退到 SSE。（PR #97，感谢 @mavam）\n- 一旦 OAuth 激活，忽略静态的 `Authorization` 头，以防止导入的编辑器配置覆盖新的 OAuth 令牌。（PR #123，感谢 @ahonn）\n- 即使命令回退到原始输出，`mcporter call --output json` 仍会输出有效的 JSON，确保其可被解析。（PR #128，感谢 @armanddp）\n- 在调用输出帮助函数中渲染 `resource` 内容块，而不是将其丢弃，包括 Markdown 资源和 JSON 文本负载。（PR #124，感谢 @mvanhorn）\n- 当 `data` 只是一个字段时，保留完整的 JSON\u002F错误负载，而不只是将响应简化为 `data` 本身。（PR #106，感谢 @AielloChan）\n- 生成的 CLI 现在会将对象类型的标志解析为 JSON，并使用 JSON 格式的帮助文本呈现对象占位符和示例，从而避免像 Jira 的 `fields` 这样的工具接收到原始字符串。（PR #114，感谢 @v2nic）\n- 针对每个服务器去重并发的保活守护进程重启，这样即使出现重复的严重错误，也只会强制关闭一次缓存的守护进程传输，然后再进行重试。（PR #125，感谢 @zm2231）\n- `mcporter config add` 现在接受复数形式的 `--args`，作为重复标准输入参数的别名，以符合常见的 CLI 使用习惯。（PR #93，感谢 @Jah-yee）\n- 当 `mcporter config add` 写入配置文件时，保留默认的 `imports` 导入项，而不是强制设置为 `\"imports\": []`。\n- OAuth：在无头 Linux 系统中，当 `xdg-open` 不可用时避免崩溃；清除过期的动态端口客户端注册信息；如果读取过期客户端持久化数据失败，则关闭回调服务器。（PR #72，感谢 @mgonto）\n- 添加了可选的 `oauthScope`\u002F`oauth_scope` 配置覆盖，作为针对需要显式作用域的提供商的应急方案。\n- OAuth 等待和重定向现在共享同一个延迟任务，以消除授权竞争窗口并保持稳定的关闭路径错误，包括先等待再重定向以及多次重定向的情况。（PR #70，感谢 @monotykamary）\n- `createCallResult().json()` 现在会从 MCP 内容数组中收集所有可解析的 JSON 条目（单个条目仍保持向后兼容），同时原始检查深度也不会因无限遍历而变得难以阅读。（PR #91，感谢 @Blankdlh）\n- 为 `mcporter call` 参数解析添加了 `--raw-strings`（禁用数值转换）和 `--no-coerce`（完全禁用所有类型转换）选项，以便 ID 或代码可以保持为字面字符串。（PR #59，感谢 @nobrainer-tech）\n- 添加了 `CallResult.images()` 方法，并新增了可选的 `mcporter call --save-images \u003Cdir>` 选项，以便图像内容块可以在不改变现有 stdout 输出契约的情况下被持久化保存。（PR #61，感谢 @daniella-11ways）\n- OAuth 传输重试现在会将 HTTP 405 错误归类为 HTTP 错误（而非认证错误），并且 OAuth 提升机制同样适用于已配置的 HTTP 服务器，从而避免认证后的回退流程在仅返回 405 错误的端点上丢失凭据。（PR #48，感谢 @caseyg）\n- 配置加载现在会将项目配置文件和显式配置文件解析为 JSONC 格式，因此 `mcporter.json","2026-03-29T01:51:10",{"id":159,"version":160,"summary_zh":161,"released_at":162},306553,"v0.7.3","## 亮点\n- `mcporter generate-cli` 现在支持 `--include-tools` \u002F `--exclude-tools` 选项，用于为工具子集生成 CLI。（感谢 @zackleman，PR #24）\n- 生成的 CLI 现在能够通过驼峰命名的属性可靠地读取 Commander.js 的选项值，从而确保蛇形命名的模式也能正确映射。（感谢 @rawwerks，PR #28）\n- 生成的 CLI 数组参数会根据 JSON Schema 对元素类型进行强制转换（包括整数数组）。（感谢 @rawwerks，PR #27）\n\nSHA256 (mcporter-macos-arm64-v0.7.3.tar.gz): `852da8adefeb78df53705aa3af12fe725067c8014a5a57d1d6a3b273d29a7dfe`\nSHA256 (mcporter-0.7.3.tgz): `8192091425ff249c7afdd69b1bf0cac6f165b76eb63b56e1facaaf3304c92527`\n","2025-12-29T22:40:52",{"id":164,"version":165,"summary_zh":166,"released_at":167},306554,"v0.7.1","## 亮点\n- Daemon 现在会跟踪每个已加载层的配置文件修改时间，并在任何内容发生变化时自动重启保持连接的服务器，因此无需手动重启即可自动检测并启用新的 MCP 服务器。\n- 更新了 Playwright 和 iTerm 的捆绑配置条目，以匹配当前的服务器定义。\n- 清理了变更日志和发布元数据，以确保未来版本的一致性。\n\nSHA256 (mcporter-macos-arm64-v0.7.1.tar.gz): `70843fd029868fe21c4c83874e77c29d0b027cb15369fd6351663e60ec69bd23`\nSHA256 (mcporter-0.7.1.tgz): `6702d1d774aa8c44b14abc142d2851ed4013e04949bd4a4a66fe5ec30132afbc`\n","2025-12-08T23:51:12",{"id":169,"version":170,"summary_zh":171,"released_at":172},306555,"v0.7.0","## 亮点\n- 将 OAuth 凭证集中存储在 `~\u002F.mcporter\u002Fcredentials.json` 中，并支持自动迁移；同时提供可靠的 `mcporter auth --reset` 命令，用于清除损坏的缓存。\n- 具有专用身份验证助手的 StdIO 服务器（例如 Gmail）现在可以声明 `oauthCommand.args`，使 `mcporter auth \u003Cserver>` 能够直接运行该助手并等待浏览器完成授权，而无需手动使用 `npx`。\n- 原始输出现可完整保留字符串（不再截断至 10,000 字符），并新增回归测试以确保该行为的正确性。\n\nSHA256 (mcporter-macos-arm64-v0.7.0.tar.gz): `aa70885d4612f9dd765c339a1f6d8485de61f7a97902da57bb8538a6f8c8afc0`\nSHA256 (mcporter-0.7.0.tgz): `a7f8328eb9f2d918f8896b55089828e9f5a77c494bdcabac86d6b3116dbe20ea`","2025-12-06T03:41:13",{"id":174,"version":175,"summary_zh":176,"released_at":177},306556,"v0.6.6","## 亮点\n- 防止了在任何位置都没有配置文件时运行 mcporter 导致的 ENOENT 崩溃；隐式默认值现在可以在列表\u002F配置\u002F守护进程流程中平稳回退。\n- 守护进程启动时仅向保持连接的服务器传递显式配置路径，从而避免子进程出现 ENOENT 错误。\n- 增加了对空环境启动守护进程的回归测试覆盖，并在文档中明确了关于变更日志和测试说明的约束条件。\n\nSHA256 (mcporter-macos-arm64-v0.6.6.tar.gz): ecafbf932d5412645afdc7371513252df0647ce97580b0a4b512eada6c56ae7a\nSHA256 (mcporter-0.6.6.tgz): 28aad963c8e8df85898b607b79eaa4f923e5e10f5264cad936d740fcf0291a1e\n","2025-11-28T06:41:39",{"id":179,"version":180,"summary_zh":181,"released_at":182},306557,"v0.6.5","## 亮点\n- `mcporter call|auth|list help\u002F--help` 现在会立即打印命令特定的用法，而不再尝试启动服务器。\n- 为 `mcporter list` 添加了一个隐藏的 `list-tools` 别名，以确保旧版文档和习惯用法能够正常工作，同时避免出现“未知 MCP 服务器”错误。\n- 临时 HTTP 流程现在接受 `--insecure` 作为 `--allow-http` 的同义词，并且 `--sse` 现已将 `--http-url` 设置为别名，以保留旧的示例。\n\nSHA256 (mcporter-macos-arm64-v0.6.5.tar.gz): df4a8dd3b1f35160ed2421b07d49a9884edb63fed308f0a2c26d6baf223f9274\nSHA256 (mcporter-0.6.5.tgz): d6bab8bd45e1b102ce1c30ef48452966c716bcc9d20cc0252c8b9c681aa8b4aa\n","2025-11-26T00:07:24",{"id":184,"version":185,"summary_zh":186,"released_at":187},306558,"v0.6.4","## 亮点\n- 非交互式的 `mcporter list` 现在会复用缓存的 OAuth 令牌，因此当你已经拥有令牌时，OAuth 服务器不会再显示“需要认证”的提示（在执行全服务器发现时也不会弹出浏览器窗口）。\n- 添加了 Vitest 封装，使得 `pnpm test --filter \u003Cpattern>` 能够正常运行而不会出现 CLI 错误。\n- 维护工作：GitHub Bearer 令牌的环境变量默认值调整 + 格式化代码清理。\n\nSHA256 (mcporter-macos-arm64-v0.6.4.tar.gz): 5758c9ceffe27f69e61267d32535125915f29f1e594a97937345a7b2dd96296b\nSHA256 (mcporter-0.6.4.tgz): ddbfe13d02213242a53cf7561e8b9a42a26ab4f20ae9f75e99c21b3e0c44eecd","2025-11-25T16:28:56",{"id":189,"version":190,"summary_zh":191,"released_at":192},306559,"v0.6.3","## 亮点\n- 更新至 @modelcontextprotocol\u002Fsdk 1.22.0；内联 stdio 测试服务器现使用 Zod 模式，以保持与 SDK 的 JSON Schema 转换路径兼容。\n- listTools 现在遵循 SDK 的分页机制，通过循环 nextCursor 来确保即使目录非常庞大也能返回完整的工具列表。\n- Claude 导入：保留旧版根级回退解析逻辑，正确处理设置容器，并为 settings\u002Fmcp.json 添加回归测试覆盖。\n\nSHA256 (mcporter-macos-arm64-v0.6.3.tar.gz)：34e8c972077349b37858d5a498f510b26075489fc2e35e81f846d99d4c326608\nSHA256 (mcporter-0.6.3.tgz)：67243e01a81a9181bc65cd657e40f2315aeae5c6","2025-11-22T10:06:00",{"id":194,"version":195,"summary_zh":196,"released_at":197},306560,"v0.6.2","## 亮点\n- Windows\u002FWSL 高可用性：提供 chmod\u002Fcopy 的尽力而为辅助工具、文档及针对 NTFS\u002FDrvFs 路径的指导。\n- 嵌套 MCP 内容提取：现可从原始封装响应中读取文本、Markdown 和 JSON（修复了 DeepWiki 等服务器的问题）。\n- Stdio MCP 覆盖：通过 execPath 引入新的文件系统和内存测试用例，并新增端到端测试。\n- 全局标志处理与守护进程健壮性进一步加强；平台感知的配置导入逻辑已更新。\n\nSHA256 (mcporter-macos-arm64-v0.6.2.tar.gz)：f10d87f12794933b1f0d9b793e955342905a19fdc79a89df2e18d9654f7ba9f2\nSHA256 (mcporter-0.6.2.tgz)：ead9aee823f20101636f899e48a2391d2a64c33b19985017adbac9ffca8d0bc3","2025-11-18T09:17:41",{"id":199,"version":200,"summary_zh":201,"released_at":202},306561,"v0.6.1","## Highlights\n- `mcporter list --verbose` now shows every config path that registers a server (primary first, then duplicates) in both text and JSON output.\n- Verbose listings tag the import kind and flag the primary entry vs shadowed duplicates; JSON payloads add a `sources` array.\n","2025-11-18T03:29:42",{"id":204,"version":205,"summary_zh":206,"released_at":207},306562,"v0.6.0","## Highlights\n- Default config resolution now layers the system config (`~\u002F.mcporter\u002Fmcporter.json[c]`) before the project config (`config\u002Fmcporter.json`), so globally installed MCP servers stay available while still allowing project-level overrides.\n- `--config` and `MCPORTER_CONFIG` continue to select a single config file without merging, preserving explicit workflows where layering is undesirable.\n- `mcporter config add --scope home|project` lets you choose the write target explicitly (project remains the default; `--persist \u003Cpath>` still wins when provided).\n\nSHA256 (mcporter-macos-arm64-v0.6.0.tar.gz): `1f6264fd46f68675330b4fee66beacfd7c84991f3a240566c8e716781627fe82`\n","2025-11-17T05:14:04",{"id":209,"version":210,"summary_zh":211,"released_at":212},306563,"v0.5.10","## Highlights\n- Generated CLIs now display canonical kebab-case tool names while accepting underscore aliases, preventing copy\u002Fpaste command errors from tool listings.\n- Added DeepWiki MCP to the shared config for easier client generation\u002Ftesting out of the box.\n- Stabilized long-running generator\u002Fdaemon test suites with realistic timeouts.\n\nSHA256 (mcporter-macos-arm64-v0.5.10.tar.gz): `210166b913c5471486340a982353044f5ca337667c20607c841b51aee3f866fe`\n","2025-11-16T16:12:28",{"id":214,"version":215,"summary_zh":216,"released_at":217},306564,"v0.5.9","## Highlights\n- `mcporter config \u003Csubcommand> --help` and `mcporter config help \u003Csubcommand>` now show full usage, flag, and example blocks for every config action, so inline `--help` never crashes when you just want docs.\n- `mcporter config doctor` prints both the project and system config paths before reporting diagnostics, making it obvious which files were inspected during triage.\n- `mcporter list` suppresses raw STDIO stderr spam when enumerating every configured server, keeping the summary output readable while still surfacing per-server health.\n\nSHA256 (mcporter-macos-arm64-v0.5.9.tar.gz): `705f26904ab2caf6d8c2efb3108e52a3faffb890c3d50a00784c1067a8709ddb`\n","2025-11-15T19:17:42",{"id":219,"version":220,"summary_zh":221,"released_at":222},306565,"v0.5.8","## Highlights\n- STDIO transports now interpolate `${VAR}`\u002F`$env:VAR` command tokens (including `\\${VAR}` literals from `String.raw`) before launching child processes, so chrome-devtools receives the live `CHROME_DEVTOOLS_URL` instead of a placeholder.\n- Keep-alive orchestration skips STDIO entries referencing `CHROME_DEVTOOLS_URL`, forcing chrome-devtools to relaunch per Oracle browser session instead of sticking to a stale debugging port.\n- Ad-hoc STDIO invocations (e.g., `mcporter list \"npx -y chrome-devtools-mcp\"`) now infer friendly server names and auto-detect STDIO usage, so repeated list\u002Fcall runs reuse cached configs without extra flags.\n\nSHA256 (mcporter-macos-arm64-v0.5.8.tar.gz): `1c3aa296119063a4e305ee85b872b161f4f8db36c2ffae3729ab7c33cde61044`\n","2025-11-15T06:25:39",{"id":224,"version":225,"summary_zh":226,"released_at":227},306566,"v0.5.7","## Highlights\n- Added `mcporter daemon restart`, a stop+start convenience that reuses logging flags so agents can bounce the keep-alive daemon quickly.\n- Added `list_tools` as a hidden shortcut for `mcporter list \u003Cserver>` so agents can fetch tool catalogs instantly via `\u003Cserver>.list_tools` selectors.\n- Warn when colon-style arguments omit a value (e.g., `command:`) and suggest quoting\u002F`--args` JSON so STDIO servers no longer receive `undefined` payloads.\n\nSHA256 (mcporter-macos-arm64-v0.5.7.tar.gz): `eaadd84b712caee3d69887f7c0eab28b4a99678191893417149465d32eb8aab9`\n","2025-11-14T00:32:27",{"id":229,"version":230,"summary_zh":231,"released_at":232},306567,"v0.5.6","## Highlights\n- Reset cached keep-alive connections whenever STDIO transports hit fatal errors so chrome-devtools recovers automatically after Chrome closes.\n- Daemon-routed calls now log a restart notice and retry once after closing stale transports, giving self-healing behavior when persistent STDIO servers crash mid-call.\n\nSHA256 (mcporter-macos-arm64-v0.5.6.tar.gz): `640721615c872766ef43c6456d16ed691b25786f7c61e280dd65928fb6d85768`\n","2025-11-11T15:03:42",{"id":234,"version":235,"summary_zh":236,"released_at":237},306568,"v0.5.3","## Highlights\n- Claude imports now prefer workspace `.claude.json` files and ignore metadata-only fields, so `mcporter list` matches Claude’s own project scoping and avoids noisy entries.\n- OpenCode imports stick to the documented `mcp` container (no root-level fallback), preventing stray metadata from appearing as phantom servers.\n\n## Fixes\n- `mcporter config import` and other import consumers now pass import metadata through the shared parser to keep future format-specific tweaks consistent.\n\nSHA256 (macOS arm64 tarball): `a9a32a5409bfb6ffebeb1d1abcc2d9c2c34754f8410dc12e307f30477611a327`.\n","2025-11-10T20:53:56",{"id":239,"version":240,"summary_zh":241,"released_at":242},306569,"v0.5.2","## Highlights\n- Quoted stdio commands (e.g., `mcporter call \"npx -y vercel-domains-mcp\"`) are now auto-detected, so you can skip `--stdio` \u002F `--stdio-arg` entirely.\n- When a server exposes exactly one tool, `mcporter call \u003Cserver>` automatically selects it (and prints a dim notice) so one-tool servers run with only their arguments.\n- STDIO transports now inherit the invoking shell environment by default, keeping ad-hoc commands in sync with your terminal without manual `--env` plumbing.\n\n## Fixes\n- `mcporter config list` and `mcporter config doctor` no longer crash when `config\u002Fmcporter.json` is missing or corrupt; we log one warning and keep going.\n\nSHA256 (macOS arm64 tarball): `bbdb450d7959dd6798a52515e1e28f7bc29d0580349a9a1d14fdcb3fa4716477`.\n","2025-11-10T20:00:30",{"id":244,"version":245,"summary_zh":246,"released_at":247},306570,"v0.5.0","## Highlights\n- Added a per-login daemon for keep-alive MCP servers (Chrome DevTools, Mobile MCP, Playwright, etc.) with `mcporter daemon \u003Cstart|status|stop>`, idle shutdowns, and lifecycle-aware detection.\n- Fixed `createKeepAliveRuntime` so the daemon wrapper uses the correct `listTools` signature; `pnpm build` flows succeed again.\n- Cursor\u002FVS Code\u002FWindsurf imports auto-discover both workspace and user configs and dedupe paths; Windows imports enumerate all `.cursor`\u002FClaude settings while STDIO teardown now kills full process trees.\n","2025-11-18T03:29:55"]