Integrations
Integrates with Ollama to allow running local LLMs as an alternative to cloud-based models for processing API interactions.
Connects with OpenAI models to process API definitions and interact with Swagger-documented endpoints.
Automatically extracts Swagger UI definitions from API endpoints to dynamically generate MCP tools at runtime, enabling AI agents to interact with any Swagger-documented API without manual tool implementation.
スワッガーMCP
概要
swagger-mcp
swagger.json
ファイルを抽出し、実行時に適切に定義されたmcpツールを動的に生成することで、Swagger UIをスクレイピングするツールです。これらのツールは、MCPクライアントがさらなるツール選択を行う際に利用できます。
📽️ デモビデオ
プロジェクトの実際の動作を紹介するデモ ビデオをご覧ください。
🙌 サポート
このプロジェクトが価値があると思われた方は、 LinkedInで以下の方法でサポートしてください。
- 👍 デモ投稿に「いいね!」してシェアしてください
- 💬 コメント欄にご意見・ご感想をお寄せください
- 🔗 今後のアップデートについては私に連絡してください
LinkedIn でのあなたのサポートは、より多くの人々にリーチし、プロジェクトを改善するのに役立ちます。
前提条件
swagger-mcp
を使用するには、次の依存関係があることを確認してください。
- LLM モデル API キー / ローカル LLM : OpenAI、Claude、または Ollama モデルへのアクセスが必要です。
- 任意の MCP クライアント: ( mark3labs - mcphostを使用)
インストールとセットアップ
swagger-mcp
をインストールして実行するには、次の手順に従います。
実行構成
swagger-mcp
を直接実行するには、次を使用します。
主な旗:
--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
に次の構成を含めます。
デモフロー
- バックエンドの一部:Copy
- オラマCopy
- MCPクライアントCopy
フロー図
🛠️ 助けが必要
私はツール定義を改善して以下の点を強化することに取り組んでいます。
✅ より正確な応答のためのエラー処理の改善
✅ LLM の動作制御により、 API 応答のみに依存し、独自のメモリを使用しないようにします。
✅ APIからの厳密なデータ取得を強制することで幻覚やランダムなデータ生成を防ぐ
これらの点を改善するための洞察や提案がある場合は、次の方法でご協力ください。
- 同様の実装に関する経験を共有する
- ツール定義の変更を提案する
- 現在の制限に関するフィードバックの提供
このツールをより信頼性が高く効果的なものにするために、皆様のご意見は非常に貴重です!🚀
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
swagger-mcpは、swagger.jsonファイルを抽出し、実行時に適切に定義されたmcpツールを動的に生成することで、Swagger UIをスクレイピングするツールです。これらのツールは、MCPクライアントがさらなるツール選択を行う際に利用できます。
Related MCP Servers
- -securityAlicense-qualityA Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.Last updated -239PythonMIT License
- -securityAlicense-qualityA server that enables interaction with any API that has a Swagger/OpenAPI specification through Model Context Protocol (MCP), automatically generating tools from API endpoints and supporting multiple authentication methods.Last updated -61TypeScriptApache 2.0
- -securityAlicense-qualityAn MCP server that connects to a Swagger specification and helps an AI to build all the required models to generate a MCP server for that service.Last updated -19TypeScriptMIT License
- -securityAlicense-qualityMCP server providing token-efficient access to OpenAPI/Swagger specs via MCP Resources for client-side exploration.Last updated -355TypeScriptMIT License
Appeared in Searches
- A tool to manage and process a list of Swagger API endpoints
- A service for generating websites in MCP
- Save all service information from mcp.so-like websites to local storage
- A GitHub repository for an MCP server with a clear description of config.json
- Discussing Application Architectures and Server Costing