MCP.so
登录

OpenAPI to MCP Generator

@LostInBrittany

关于 OpenAPI to MCP Generator

A Java program that generates a Quarkus MCP server form an Open API Swagger file

基本信息

分类

开发工具

许可证

MIT

运行时

java

传输方式

stdio

发布者

LostInBrittany

配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is OpenAPI to MCP Generator?

It automatically converts OpenAPI/Swagger specifications into fully functional Model Context Protocol (MCP) servers, allowing LLMs to interact with any REST API through standardized tools. Designed for developers who want to expose REST APIs as MCP-compatible tools.

How to use OpenAPI to MCP Generator?

Use jbang SwaggerToMcpGenerator.java path/to/swagger.json GeneratedMcpServer to generate a server, then jbang GeneratedMcpServer.java to run it. Authentication is configured via environment variables such as API_KEY, BEARER_TOKEN, or API_USERNAME/API_PASSWORD.

Key features of OpenAPI to MCP Generator

  • Parses OpenAPI specification files and converts endpoints to MCP tools.
  • Supports GET, POST, PUT, DELETE, and PATCH methods.
  • Handles path parameters, query parameters, and request bodies.
  • Provides API Key, Bearer Token, and Basic authentication support.
  • Formats JSON responses and includes robust error handling.
  • Allows runtime server selection when multiple servers are defined.

Use cases of OpenAPI to MCP Generator

  • Turn any public REST API (e.g., weather data) into LLM-accessible tools.
  • Expose internal REST APIs to AI assistants like Claude Desktop.
  • Quickly create MCP servers for cloud management APIs (e.g., Clever Cloud).
  • Generate standardized tool interfaces without writing manual MCP code.

FAQ from OpenAPI to MCP Generator

What is the Model Context Protocol (MCP)?

MCP is a standardized way for tools and LLMs to communicate, allowing tools to expose functionality to any MCP-compatible LLM and enabling LLMs to discover and use tools consistently.

How do I select a specific server when multiple are defined?

Use the --server-index <index> or --server-url <url> option during generation, or set the SERVER_INDEX or SERVER_URL environment variable at runtime.

How do I authenticate the generated MCP server?

Set environment variables: API_KEY and API_KEY_HEADER for API key auth, BEARER_TOKEN for bearer token, or API_USERNAME and API_PASSWORD for Basic auth.

What HTTP methods are supported?

GET, POST, PUT, DELETE, and PATCH are supported for converting endpoints to MCP tools.

Are there any known limitations or planned improvements?

The README lists planned features including form data/multipart support, OAuth 2.0 authentication, a web UI for spec uploads, and WebSocket endpoint support, indicating these are not yet implemented.

评论

开发工具 分类下的更多 MCP 服务器