mcpify
mcpify
あらゆるAPIをMCPサーバーに変換。コマンド一つで。コード不要。
npx mcpify https://petstore3.swagger.io/api/v3/openapi.json✓ mcpify: Petstore v1.0.0 — 19 tools
base: https://petstore3.swagger.io/api/v3
transport: stdioこれだけです。これでAIエージェントはPetstore API全体にアクセスできるようになります。SDKのインストールも、グルーコードの記述も、サーバーのデプロイも不要です。
OpenAPI仕様を指定するだけで、完全に動作するMCPサーバーが手に入ります。
なぜこれが必要か
エージェントを構築するすべてのチームが同じ壁に突き当たります。モデルがAPIを呼び出す必要がある場合、それぞれを接続するために、MCPサーバーのコード作成、スキーマ変換、認証の実装といった数日間の作業が必要になるからです。
mcpify はそれを一つのコマンドに集約します。OpenAPI仕様には、エンドポイント、パラメータ、スキーマ、認証など、必要な情報がすべて記述されています。私たちはそれを実行時にMCPサーバーへ変換するため、コード生成ステップや維持すべきソースファイルは不要です。
Related MCP server: mcpify
インストール
npx を使用してオンデマンドで実行します(推奨):
npx mcpify <spec>またはグローバルにインストールします:
npm install -g mcpifyNode.js 18以上が必要です。
使用方法
ホストされた仕様から
npx mcpify https://api.example.com/openapi.jsonローカルファイルから (JSONまたはYAML)
npx mcpify ./spec.yaml単一のcurlコマンドから
npx mcpify --curl "curl -H 'Authorization: Bearer xxx' https://api.github.com/user/repos"あらゆるcurlコマンドから単一ツールのMCPサーバーを生成します。ボディは解析され、入力スキーマに変換されます。
サーバーを起動せずにツールを一覧表示
npx mcpify list ./spec.jsonスタンドアロンで編集可能なプロジェクトを生成
npx mcpify generate ./spec.json ./my-mcp
cd my-mcp && npm install && npm start動作をカスタマイズしたい場合(キャッシュの追加、カスタム認証フロー、後処理など)に使用してください。
認証
起動前に環境変数を設定してください。mcpify は仕様の securitySchemes を読み取り、自動的にマッチングします。
# HTTP bearer schemes
export MCPIFY_BEARER_TOKEN=xxx
# apiKey schemes (header or query, as the spec says)
export MCPIFY_API_KEY=xxx
# HTTP basic
export MCPIFY_BASIC_AUTH=user:password
# Per-scheme override (use the scheme's name from the spec)
export MCPIFY_AUTH_<SCHEME_NAME>=xxx
# Free-form extra headers on every request
export MCPIFY_HEADERS='{"X-Trace-Id":"abc","X-Internal":"1"}'大規模な仕様のフィルタリング
Stripeの完全なOpenAPIは約600のエンドポイントがあります。ほとんどのエージェントはそれらすべてを必要とせず、多くのクライアントはそれほど多くのツールを許容しません。以下のように絞り込みます:
# Only the customers tag
npx mcpify ./stripe.json --tag customers
# Only operations whose tool name matches a regex
npx mcpify ./stripe.json --filter "^createCustomer|^getCustomer"
# Hard cap
npx mcpify ./stripe.json --max-tools 30Claude Desktopでの使用
~/.config/claude/claude_desktop_config.json (Linux/macOS) または %APPDATA%\Claude\claude_desktop_config.json (Windows) に設定します:
{
"mcpServers": {
"petstore": {
"command": "npx",
"args": ["-y", "mcpify", "https://petstore3.swagger.io/api/v3/openapi.json"]
},
"github": {
"command": "npx",
"args": ["-y", "mcpify", "--curl",
"curl -H 'Authorization: Bearer ghp_xxx' https://api.github.com/user/repos"]
}
}
}Cursor / Cline / Claude Codeでの使用
同様に、command と args でMCPサーバーを設定できる場所であればどこでも動作します。mcpify はstdioを使用します。
# Claude Code:
claude mcp add petstore -- npx -y mcpify https://petstore3.swagger.io/api/v3/openapi.jsonプログラムによるAPI利用
import { loadOpenApiSpec, parseOpenApi, serve } from "mcpify";
const raw = await loadOpenApiSpec("./spec.yaml");
const spec = parseOpenApi(raw);
await serve(spec, {
baseUrl: "https://staging.example.com",
filterTag: "users",
});仕組み
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ OpenAPI spec │ ─→ │ mcpify runtime │ ─→ │ MCP client │
│ (JSON / YAML) │ │ (stdio server) │ │ (Claude/Cursor) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
↓ tool call
┌─────────┐
│ fetch │ → your API
└─────────┘仕様をデリファレンス(
$refを解決)します。各操作をMCPツールに変換します。パス/クエリ/ヘッダーパラメータは入力プロパティになり、リクエストボディはネストされた
bodyプロパティになります。ツール呼び出し時に、URLを構築し、環境変数から認証情報を付与してリクエストを送信し、レスポンスを返します。
コード生成は行いません。再起動ループもありません。仕様が唯一の信頼できる情報源です。
制限事項
ストリーミングレスポンスボディ — 現在はバッファリングされており、64KBに制限されています。
OAuth2フロー — 自動実行されません。
MCPIFY_BEARER_TOKENを介して事前に取得したトークンを提供してください。ファイルアップロード (
multipart/form-data) — まだサポートされていません。Webhook / コールバック — 対象外です。
Swagger 2.0 — 部分的な対応です。最良の結果を得るには、まずOpenAPI 3に変換してください。
上記すべてについてプルリクエストを歓迎します。
開発
git clone https://github.com/qualuo/mcpify
cd mcpify
npm install
npm run build
npm testライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Discover and call 10,000+ production APIs from one MCP server. Pay-per-call billing for AI agents.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAutomatically converts Swagger/OpenAPI specifications into MCP servers, enabling AI agents to interact with any REST API through natural language by exposing endpoints as AI-friendly tools.3-
- AlicenseNot gradedqualityCmaintenanceConverts any OpenAPI specification into an MCP server, allowing AI assistants to interact with REST APIs through natural language.9 npm1MIT
- AlicenseNot gradedqualityDmaintenanceTurns any OpenAPI REST or GraphQL API into an MCP server, allowing AI assistants like Claude to interact with APIs without writing code.8 npmMIT
- AlicenseNot gradedqualityDmaintenanceConverts an OpenAPI spec into an MCP server, enabling AI agents to call your API without writing tool definitions or integration code.3MIT