MCP.so
ログイン

swagger-mcp

@hauntingsteps

swagger-mcp について

mcp server which will dynamically define tools based on swagger

基本情報

カテゴリ

その他

ライセンス

MIT license

ランタイム

go

トランスポート

stdio

公開者

hauntingsteps

設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is swagger-mcp?

swagger-mcp is a tool that scrapes a Swagger UI by extracting the swagger.json file and dynamically generates well-defined MCP (Model Context Protocol) tools at runtime. It is intended for developers using an MCP client who need to expose API endpoints from a Swagger/OpenAPI specification as MCP tools.

How to use swagger-mcp?

Install via Go: go install github.com/hauntingsteps/swagger-mcp@latest. Run with swagger-mcp --specUrl=https://your_swagger_api_docs.json. Optionally configure SSE mode, authentication, or base URL via flags. Then integrate with an MCP client (e.g., mark3labs/mcphost) by adding a command entry in .mcp.json.

Key features of swagger-mcp

  • Dynamically generates MCP tools from any Swagger/OpenAPI JSON spec.
  • Supports stdio and SSE transport modes.
  • Offers authentication: basic, API key, and bearer token.
  • Allows base URL override for API requests.
  • Easy integration with MCP clients like mcphost.

Use cases of swagger-mcp

  • Exposing a REST API defined by Swagger as MCP tools for an LLM agent.
  • Rapidly prototyping tool calls from an OpenAPI specification without manual tool definition.
  • Running a local MCP server that proxies a third-party API with authentication.

FAQ from swagger-mcp

What prerequisites are needed?

You need an LLM model API key (OpenAI, Claude) or a local LLM (e.g., Ollama), and any MCP client (such as mark3labs/mcphost).

How do I configure authentication?

Use the --security flag with value basic, apiKey, or bearer, and supply the corresponding credential flag (--basicAuth, --bearerAuth, or --apiKeyAuth). API key details are given in passAs:name=value format.

Can swagger-mcp run as an SSE server?

Yes. Use the --sseMode=true flag. Optionally set --sseAddr and --sseUrl to control the server address and base URL.

What Swagger specification format does it expect?

It expects a URL pointing to a JSON file (e.g., swagger.json or openapi.json) served by the Swagger UI or directly accessible.

What is the runtime dependency?

swagger-mcp is a Go binary. You must have Go installed to run go install, or download the prebuilt binary if available. No additional runtime dependencies are required beyond the LLM access and MCP client.

コメント

「その他」の他のコンテンツ