swagger-mcp
スワッガーMCP
概要
swagger-mcp swagger.jsonファイルを抽出し、実行時に適切に定義されたmcpツールを動的に生成することで、Swagger UIをスクレイピングするツールです。これらのツールは、MCPクライアントがさらなるツール選択を行う際に利用できます。
Related MCP server: MCP Swagger Server
📽️ デモビデオ
プロジェクトの実際の動作を紹介するデモ ビデオをご覧ください。
🙌 サポート
このプロジェクトが価値があると思われた方は、 LinkedInで以下の方法でサポートしてください。
👍 デモ投稿に「いいね!」してシェアしてください
💬 コメント欄にご意見・ご感想をお寄せください
🔗 今後のアップデートについては私に連絡してください
LinkedIn でのあなたのサポートは、より多くの人々にリーチし、プロジェクトを改善するのに役立ちます。
前提条件
swagger-mcpを使用するには、次の依存関係があることを確認してください。
LLM モデル API キー / ローカル LLM : OpenAI、Claude、または Ollama モデルへのアクセスが必要です。
任意の MCP クライアント: ( mark3labs - mcphostを使用)
インストールとセットアップ
swagger-mcpをインストールして実行するには、次の手順に従います。
go install github.com/danishjsheikh/swagger-mcp@latest
swagger-mcp実行構成
swagger-mcpを直接実行するには、次を使用します。
swagger-mcp --specUrl=https://your_swagger_api_docs.json主な旗:
--specUrl: Swagger/OpenAPI JSON URL (必須)--sseMode: SSE モードで実行 (デフォルト: false、true の場合は SSE サーバーとして実行され、それ以外の場合は stdio が使用されます)--sseAddr: SSE サーバーのリッスン アドレス (IP:ポートまたは :ポート形式) (空の場合は、--sseUrl の IP:ポートが使用されます)--sseUrl: SSE サーバーのベース URL (空の場合は、sseAddr を使用して生成されます。例: http://IP:Portまたはhttp://localhost:Port )--sseAddr と --sseUrl の両方が設定されている場合は、自動補完なしでそのまま使用されます。
--baseUrl: APIリクエストのベースURLを上書きする--security: API セキュリティ タイプ (basic、apiKey、またはbearer)--basicAuth: ユーザー:パスワード形式の基本認証--bearerAuth: 認証ヘッダーのベアラートークン--apiKeyAuth: API キー、形式passAs:name=value(例header:token=abc,query:user=foo,cookie:sid=xxx)サポートされているすべてのフラグとオプションについては、main.go を参照してください。
MCP構成
mcphostと統合するには、 .mcp.jsonに次の構成を含めます。
{
"mcpServers":
{
"swagger_loader": {
"command": "swagger-mcp",
"args": ["--specUrl=<swagger/doc.json_url>"]
}
}
}デモフロー
バックエンドの一部:
go install github.com/danishjsheikh/go-backend-demo@latest go-backend-demoオラマ
ollama run llama3.2MCPクライアント
go install github.com/mark3labs/mcphost@latest mcphost -m ollama:llama3.2 --config <.mcp.json_file_path>
フロー図

🛠️ 助けが必要
私はツール定義を改善して以下の点を強化することに取り組んでいます。
✅ より正確な応答のためのエラー処理の改善
✅ LLM の動作制御により、 API 応答のみに依存し、独自のメモリを使用しないようにします。
✅ APIからの厳密なデータ取得を強制することで幻覚やランダムなデータ生成を防ぐ
これらの点を改善するための洞察や提案がある場合は、次の方法でご協力ください。
同様の実装に関する経験を共有する
ツール定義の変更を提案する
現在の制限に関するフィードバックの提供
このツールをより信頼性が高く効果的なものにするために、皆様のご意見は非常に貴重です!🚀
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that provides tools for exploring and testing APIs through Swagger/OpenAPI documentation.517612MIT
- Alicense-qualityDmaintenanceAutomatically converts REST APIs with Swagger/OpenAPI documentation into MCP tools, making any documented API accessible to MCP-compatible clients. Supports authentication, SSL handling, and flexible configuration for seamless API integration.11MIT
- -license-quality-maintenanceDynamically generates MCP tools from Swagger/OpenAPI specifications by extracting swagger.json files at runtime. Enables natural language interaction with any REST API that has Swagger documentation.
- Alicense-qualityDmaintenanceA dynamic MCP server that automatically discovers and generates tools from any REST API using OpenAPI/Swagger specifications, enabling instant endpoint access with zero manual configuration.MIT
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
APIs.guru MCP — keyless directory of 2,500+ public APIs and their OpenAPI specs.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danishjsheikh/swagger-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server