OpenAPI to MCP Generator
@LostInBrittany
OpenAPI to MCP Generator について
A Java program that generates a Quarkus MCP server form an Open API Swagger file
基本情報
設定
ツール
ツールは検出されませんでした
ツールは 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.
「開発者ツール」の他のコンテンツ
FastAPI-MCP
tadata-orgExpose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
MCP Containers
metorialConnect any AI model to 1200+ integrations (MCP, CLI, API)
test
harlancA simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
コメント