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.

评论

其他 分类下的更多 MCP 服务器