用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hongmaple0820/agent-academy --skill mcporter命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | mcporter |
| description | MCPorter CLI - 管理、调用和生成 MCP 服务器/工具。支持 HTTP 和 stdio 传输,OAuth 认证,类型生成,CLI 生成。触发词:MCP、mcporter、MCP服务器、MCP工具。 |
| version | 1.0.0 |
| author | steipete |
TypeScript 运行时、CLI 和代码生成工具包,用于 Model Context Protocol。
# npm
npm install mcporter
# pnpm
pnpm add mcporter
# Homebrew
brew tap steipete/tap
brew install steipete/tap/mcporter
# 或直接使用 npx(无需安装)
npx mcporter list
# 列出所有已配置的 MCP 服务器
npx mcporter list
# 列出特定服务器的工具
npx mcporter list linear
npx mcporter list context7 --schema
# 列出 URL 服务器
npx mcporter list https://mcp.linear.app/mcp
# 函数调用语法
npx mcporter call 'linear.create_comment(issueId: "ENG-123", body: "Looks good!")'
# 标志语法
npx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'
# URL + 工具后缀
npx mcporter call shadcn.io/api/mcp.getComponent component=vortex
# 直接指向 HTTPS MCP 服务器
npx mcporter list --http-url https://mcp.linear.app/mcp --name linear
# 通过 Bun 运行本地 stdio MCP 服务器
npx mcporter call --stdio "bun run ./local-server.ts" --name local-tools
# 保存配置以便后续使用
npx mcporter list --http-url https://mcp.example.com/mcp --persist config/mcporter.local.json
npx mcporter call context7.resolve-library-id libraryName=react
npx mcporter call context7.get-library-docs context7CompatibleLibraryID=/websites/react_dev topic=hooks
LINEAR_API_KEY=sk_linear_example npx mcporter call linear.search_documentation query="automations"
# 快照当前标签页
npx mcporter call chrome-devtools.take_snapshot
# 首次认证
npx mcporter auth vercel
# 搜索文档
npx mcporter call vercel.search_vercel_documentation topic=routing
import { callOnce } from "mcporter";
const result = await callOnce({
server: "firecrawl",
toolName: "crawl",
args: { url: "https://anthropic.com" },
});
console.log(result);
import { createRuntime, createServerProxy } from "mcporter";
const runtime = await createRuntime();
const chrome = createServerProxy(runtime, "chrome-devtools");
const snapshot = await chrome.takeSnapshot();
console.log(snapshot.text());
await runtime.close();
将任何服务器定义转换为可共享的 CLI 工具:
# 生成 TypeScript CLI
npx mcporter generate-cli --command https://mcp.context7.com/mcp
# 生成编译后的二进制文件
npx mcporter generate-cli linear --compile
# 从配置中的服务器生成
npx mcporter generate-cli firecrawl --bundle dist/firecrawl.js
# 仅生成类型
npx mcporter emit-ts linear --out types/linear-tools.d.ts
# 生成客户端包装器
npx mcporter emit-ts linear --mode client --out clients/linear.ts
配置文件 config/mcporter.json:
{
"mcpServers": {
"context7": {
"baseUrl": "https://mcp.context7.com/mcp",
"headers": {
"Authorization": "$env:CONTEXT7_API_KEY"
}
},
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
},
"imports": ["cursor", "claude-code", "claude-desktop", "codex", "windsurf", "opencode", "vscode"]
}
# 列出配置
npx mcporter config list
# 添加服务器
npx mcporter config add my-server https://api.example.com/mcp
# 移除服务器
npx mcporter config remove my-server
# 导入编辑器配置
npx mcporter config import cursor --copy
# 检查状态
npx mcporter daemon status
# 启动
npx mcporter daemon start
# 停止
npx mcporter daemon stop
# 重启
npx mcporter daemon restart
| 标志 | 说明 |
|---|---|
--config <path> | 自定义配置文件 |
--root <path> | stdio 命令的工作目录 |
--log-level <level> | 日志级别 (debug/info/warn/error) |
--oauth-timeout <ms> | OAuth 浏览器等待时间 |
--tail-log | 流式输出日志文件的最后 20 行 |
--output <format> | 输出格式 (json/raw) |
--json | JSON 格式输出 |
--http-url <url> | 直接指定 HTTP MCP 服务器 |
--stdio <cmd> | 直接指定 stdio 命令 |