OpenAPI Gateway

•
2
•

Transforms an OpenAPI specification into a Model Context Protocol (MCP) server, enabling LLMs to interact with and control RESTful APIs.

This project automates the creation of a Model Context Protocol (MCP) server directly from any supplied OpenAPI specification. It effectively converts every HTTP endpoint defined within your `openapi.yaml` into a callable MCP tool, making it possible for Large Language Models (LLMs), such as those powering AnythingLLM, to understand, invoke, and control your existing RESTful systems. This streamlines the integration of AI agents with backend services, allowing LLMs to interact with applications through a structured and programmatic interface.

主要功能

01Offers flexible authentication modes (none, basic, bearer, custom header, query) and global default headers
02Automatically parses OpenAPI paths to register matching MCP tools
03Provides structured logging to both console and file for enhanced LLM troubleshooting
04Supports diverse tool inputs including path parameters, query parameters, headers, and request bodies
05Exposes OpenAPI_GetSchema for inspecting `components.schemas`
062 GitHub stars

使用案例

01Integrating existing RESTful APIs with AI agents that support the Model Context Protocol
02Enabling LLMs to directly control and automate actions within backend services defined by OpenAPI
03Simplifying the development of LLM-powered applications that interact with web services