经 AI Skill Hub 精选评估,MCP TypeScript调用器 获评「强烈推荐」。已获得 4.5k 颗 GitHub Star,这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
MCP TypeScript调用器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
MCP TypeScript调用器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/openclaw/mcporter
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp-typescript---": {
"command": "npx",
"args": ["-y", "mcporter"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 MCP TypeScript调用器 执行以下任务... Claude: [自动调用 MCP TypeScript调用器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp_typescript___": {
"command": "npx",
"args": ["-y", "mcporter"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <img src="https://raw.githubusercontent.com/steipete/mcporter/main/mcporter.png" alt="MCPorter header banner" width="1100"> </p>
<p align="center"> <a href="https://www.npmjs.com/package/mcporter"><img src="https://img.shields.io/npm/v/mcporter?style=for-the-badge&logo=npm&logoColor=white" alt="npm version"></a> <a href="https://github.com/steipete/mcporter/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/steipete/mcporter/ci.yml?branch=main&style=for-the-badge&label=tests" alt="CI Status"></a> <a href="https://github.com/steipete/mcporter"><img src="https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=for-the-badge" alt="Platforms"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="MIT License"></a> </p>
TypeScript runtime, CLI, and code-generation toolkit for the Model Context Protocol.
MCPorter 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.
createRuntime() merges your home config (~/.mcporter/mcporter.json[c], or $XDG_CONFIG_HOME/mcporter/mcporter.json[c] when set) first, then config/mcporter.json, plus Cursor/Claude/Codex/Windsurf/OpenCode/VS Code imports, expands ${ENV} placeholders, and pools connections so you can reuse transports across multiple calls.mcporter generate-cli turns any MCP server definition into a ready-to-run CLI, with optional bundling/compilation and metadata for easy regeneration.mcporter emit-ts emits .d.ts interfaces or ready-to-run client wrappers so agents/tests can call MCP servers with strong TypeScript types without hand-writing plumbing.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.mcporter record captures MCP JSON-RPC traffic as NDJSON, and mcporter replay serves the same responses deterministically for offline debugging and redacted repros.mcporter auth <url> and the CLI promotes the definition to OAuth on the fly. See docs/adhoc.md.mcporter serve exposes daemon-managed keep-alive servers as one MCP bridge with readable server__tool names.--no-browser, vault seeding, cached-token refresh, and auth: "refreshable_bearer" cover non-interactive deployments.httpFetch: "node-http1" keeps providers that reject Node's built-in fetch working.0.11.0 is published on npm and Homebrew, and live/published install smokes are green.LINEAR_API_KEY=sk_linear_example npx mcporter call linear.search_documentation query="automations"
npm install -g mcporter
MCPorter auto-discovers the MCP servers you already configured in Cursor, Claude Code/Desktop, 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/cli-reference.md.
```bash
```bash
Manage this file with mcporter config list|get|add|remove|import when you’d rather avoid hand-editing JSON; see docs/config.md for the full walkthrough. Config files are parsed as JSONC, so inline // and /* ... */ comments plus trailing commas are supported in both mcporter.json and mcporter.jsonc.
Run mcporter config … via your package manager (pnpm, npm, npx, etc.) when you want an interactive view of project MCPs:
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.config get/remove/logout reuse the fuzzy matching logic from mcporter list/call, so typos like sshadcn auto-correct to shadcn (with a dimmed notice) and ambiguous names surface “Did you mean …?” hints.config import <kind> --copy pulls editor-managed entries into config/mcporter.json, letting you customize or remove them locally without touching upstream files.--config <path> / --root <dir>, making it easy to juggle multiple project configs or workspace-specific overrides.config/mcporter.json mirrors Cursor/Claude's shape:
{
"mcpServers": {
"context7": {
"description": "Context7 docs MCP",
"baseUrl": "https://mcp.context7.com/mcp",
"headers": {
"Authorization": "$env:CONTEXT7_API_KEY",
},
},
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--autoConnect"],
"env": { "npm_config_loglevel": "error" },
},
},
"imports": ["cursor", "claude-code", "claude-desktop", "codex", "windsurf", "opencode", "vscode"],
}
What MCPorter handles for you:
${VAR}, ${VAR:-fallback}, and $env:VAR interpolation for config strings. Secret-bearing headers, env, and bearer-token placeholders stay lazy and resolve at runtime.~/.mcporter/credentials.json, or $XDG_DATA_HOME/mcporter/credentials.json when set) unless you override tokenCacheDir.imports to use the default ["cursor", "claude-code", "claude-desktop", "codex", "windsurf", "opencode", "vscode"].chrome-devtools-mcp --autoConnect receives a small compatibility patch while upstream auto-connect can hang on busy Chrome profiles; set MCPORTER_DISABLE_CHROME_DEVTOOLS_COMPAT=1 to opt out.If an HTTP MCP requires browser login (OAuth), persist it with --auth oauth (or set "auth": "oauth" in JSON), then run mcporter auth once:
npx mcporter config add notion https://mcp.notion.com/mcp --auth oauth
npx mcporter auth notion
On headless hosts, use npx mcporter auth notion --no-browser to print the authorization URL instead of launching the platform browser. Treat the printed URL as sensitive operational output. Keep the mcporter auth process alive until the browser redirects back to the printed redirectUrl; process managers that exit or clean up the command after capturing stdout can kill the loopback callback listener before OAuth completes. Run the command from a persistent terminal session, tmux, or a supervised background process such as nohup, and if you open the URL on another machine, make sure the callback port is reachable through a loopback-only tunnel or a configured oauthRedirectUrl.
Providers that do not support dynamic client registration can use a pre-registered app:
{
"mcpServers": {
"hubspot": {
"baseUrl": "https://mcp.hubspot.com/mcp",
"auth": "oauth",
"oauthClientId": "your-client-id",
"oauthClientSecretEnv": "HUBSPOT_CLIENT_SECRET",
"oauthTokenEndpointAuthMethod": "client_secret_post",
"oauthRedirectUrl": "http://127.0.0.1:3434/callback",
},
},
}
Keep client secrets in environment variables or private machine-local configs, and register the exact oauthRedirectUrl with the provider.
For servers with pre-seeded OAuth tokens that need automatic refresh without browser prompts, use auth: "refreshable_bearer". HTTP servers receive Authorization: Bearer <token> headers; STDIO servers require refresh.accessTokenEnv to inject the token as an environment variable:
{
"mcpServers": {
"example": {
"command": "uvx",
"args": ["example-mcp-server"],
"auth": "refreshable_bearer",
"refresh": {
"tokenEndpoint": "https://api.example.com/oauth/token",
"clientIdEnv": "EXAMPLE_CLIENT_ID",
"clientSecretEnv": "EXAMPLE_CLIENT_SECRET",
"clientAuthMethod": "client_secret_basic",
"refreshSkewSeconds": 300,
"accessTokenEnv": "EXAMPLE_ACCESS_TOKEN",
},
},
},
}
mcporter refreshes tokens before they expire (default 5 minutes early) using the refresh token from the vault. For keep-alive stdio servers that can't reload credentials after startup, use "lifecycle": "ephemeral" or restart the daemon before tokens expire.
Headless deployments that already have OAuth tokens can seed the vault without reproducing mcporter's internal vault key:
npx mcporter vault set hubspot --tokens-file ./tokens.json
npx mcporter vault set hubspot --stdin < tokens.json
npx mcporter vault clear hubspot
The JSON payload is { "tokens": { ... }, "clientInfo": { ... } }; tokens is required and clientInfo is optional.
Provide configPath or rootDir to CLI/runtime calls when you juggle multiple config files side by side.
mcporter reads exactly one primary config per run. The lookup order is:
--config (or programmatic configPath).MCPORTER_CONFIG environment variable (set it in your shell to apply everywhere).<root>/config/mcporter.json inside the current project.$XDG_CONFIG_HOME/mcporter/mcporter.json[c] when XDG_CONFIG_HOME is set, falling back to ~/.mcporter/mcporter.json[c] when no XDG mcporter config exists and the project file is missing.All 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:
mcporter config --config ~/.mcporter/mcporter.json add global-server https://api.example.com/mcp
Set MCPORTER_CONFIG=~/.mcporter/mcporter.json in your shell profile when you want that file to be the default everywhere (handy for npx mcporter … runs).
mcporter honors XDG Base Directory env vars for its own files when those vars are explicitly set: XDG_CONFIG_HOME for home configs, XDG_DATA_HOME for the OAuth vault, XDG_CACHE_HOME for schema caches, and XDG_STATE_HOME for daemon/runtime state. If the matching XDG var is unset or relative, mcporter keeps the legacy ~/.mcporter path. Config discovery is XDG-first but still probes ~/.mcporter/mcporter.json[c] when no XDG mcporter config exists, which keeps embedders from hiding the user registry when they set XDG_CONFIG_HOME for another tool. Existing explicit overrides still win.
> Convert the chrome-devtools MCP to a CLI via this one weird trick:
>
> `npx mcporter generate-cli --command "npx -y chrome-devtools-mcp@latest"`
Tip: 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"`).
- `--name` overrides the inferred CLI name.
- Add `--description "..."` if you want a custom summary in the generated help output (otherwise mcporter asks the MCP server for its own description/title during generation).
- 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.
- 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`).
- `--output <path>` writes the template somewhere specific.
- `--runtime bun|node` picks the runtime for generated code (Bun required for `--compile`).
- Add `--compile` to emit a Bun-compiled binary; MCPorter cleans up intermediate bundles when you omit `--bundle`.
- Use `--include-tools a,b,c` or `--exclude-tools a,b,c` to generate a CLI for a subset of tools (mutually exclusive).
- Use `--from <artifact>` (optionally `--dry-run`) to regenerate an existing CLI using its embedded metadata.
- Prefer a positional shorthand if the server already lives in your config/imports:
`npx mcporter generate-cli linear --bundle dist/linear.js`.
- `--server`/`--command` accept HTTP URLs, optional `.tool` suffixes, and even scheme-less hosts (`shadcn.io/api/mcp.getComponents`).
Every artifact embeds regeneration metadata (generator version, resolved server definition, invocation flags). Use:
npx mcporter inspect-cli dist/context7.js # human-readable summary npx mcporter generate-cli --from dist/context7.js # replay with latest mcporter ```
Agents should usually get one small skill per MCP server or workflow instead of a generic "all of mcporter" skill. See docs/agent-skills.md for the pattern and a copyable template.
npx mcporter emit-ts linear --out types/linear-tools.d.ts
MCPorter 是一个 TypeScript 或 CLI 的 MCP 调用工具,提供零配置发现和一键 CLI 生成功能。它支持多种 MCP 服务,包括 Cursor、Claude、Codex、Windsurf 和 OpenCode 等。
MCPorter 的关键功能包括零配置发现、一个命令 CLI 生成、桥接模式、无头 OAuth、HTTP 兼容性和安全的写入功能。它还支持多种 MCP 服务和环境变量的使用。
MCPorter 需要 LINEAR_API_KEY 来使用 Linear 搜索文档功能。需要安装 npm 和 Docker 等依赖包。
MCPorter 可以通过 npm 全局安装,或者使用 Docker 镜像部署。还支持源码安装和 pip 安装等方式。
MCPorter 的使用教程包括快速启动、命令参考和配置管理。用户可以使用 `npx` 命令尝试 MCPorter 的功能,或者查看文档获取更多信息。
MCPorter 的配置文件支持 JSONC 格式,用户可以使用 `mcporter config` 命令管理配置文件。配置文件包括 MCP 服务、环境变量和关键参数等。
MCPorter 提供了一个 Types-only 接口,用户可以使用 `npx mcporter emit-ts` 命令生成类型定义文件。还支持 CLI 生成和 API 接口等功能。
MCPorter 的 FAQ 摘要包括常见问题和解决方案等信息。用户可以通过查看 FAQ 来获取更多信息。
高星项目,TypeScript生态实用工具。MCP协议���装得当,API设计简洁易用。社区活跃度高,适合现代应用开发。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:MCP TypeScript调用器 的核心功能完整,质量优秀。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | mcporter |
| 原始描述 | 开源MCP工具:Call MCPs via TypeScript, masquerading as simple TypeScript API. Or package them。⭐4.5k · TypeScript |
| Topics | MCP协议TypeScriptAPI封装CLI工具开源 |
| GitHub | https://github.com/openclaw/mcporter |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-20 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端