OpenAPI to MCP

OpenAPI to MCP

openapi-to-mcpserver-spaceguy101•byspaceguy101

Converts an OpenAPI specification into an MCP server that exposes the described web API operations as MCP tools.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Automatically converts OpenAPI operations into MCP tools.
  • •Supports both modern Streamable HTTP and legacy SSE transports.
  • •Supports OpenAPI/Swagger 2.0 and OpenAPI 3.x specifications and detects the API base URL automatically.
  • •Handles binary responses and provides graceful shutdown and detailed logging.

BEST FOR

  • •Letting AI agents interact with existing web APIs described by OpenAPI specifications.
  • •Exposing API operations as MCP functions that clients can call over HTTP or SSE.

ABOUT OPENAPI-TO-MCPSERVER-SPACEGUY101

OpenAPI to MCP is cataloged as an MCP server attributed to spaceguy101. Converts an OpenAPI specification into an MCP server that exposes the described web API operations as MCP tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for OpenAPI to MCP are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server support authentication?

No, authentication is not implemented.

Which MCP transports does the server offer?

It supports the modern Streamable HTTP transport and legacy SSE connections.

上游原版 README

在 GitHub 查看同一版本原文

README.md · bb4985b6c2ba · 采集于 2026-11-13 12:51:06 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

OpenAPI to MCP

Converts an OpenAPI specification file into an MCP server that can be used to interact with existing web APIs described by OpenAPI specifications.

This allows AI agents or other clients that understand MCP to interact with existing web APIs described by OpenAPI specifications.

Features

  • Automatic conversion of OpenAPI operations to MCP tools
  • Support for both modern Streamable HTTP and legacy SSE transports
  • Automatic API base URL detection from OpenAPI specs
  • Support for OpenAPI/Swagger 2.0 and OpenAPI 3.x
  • Binary response handling
  • Graceful shutdown handling
  • Detailed logging for debugging

Prerequisites

  • Node.js (v16 or later recommended)

Installation

  1. Clone the repository (or ensure you have the openapi-to-mcp directory).
  2. Navigate to the openapi-to-mcp directory:
    cd openapi-to-mcp
    
  3. Install dependencies:
    npm install
    

Build

Compile the TypeScript code to JavaScript:

npm run build

This will create a dist directory with the compiled JavaScript files.

Usage

Start the server using the start script, providing the path to your OpenAPI specification file using the -f or --file option:

# Example using a local petstore.yaml file
npm start -- serve -f ./path/to/your/openapi.json

# Example with different port and host
npm start -- serve --file ./specs/petstore.json --port 9090 --host 0.0.0.0
  • Replace ./path/to/your/openapi.json with the actual path to your OpenAPI file.
  • The server will parse the file, adapt the API operations to MCP functions, and start listening.
  • It will print the available endpoints for both modern and legacy MCP connections.

Connecting as an MCP Client

The server provides a modern Streamable HTTP transport managed by the MCP SDK. This is the recommended way to connect to the server.

Legacy SSE Connection

For backwards compatibility, the server also supports SSE connections:

  1. Connect to the SSE endpoint (e.g., http://localhost:8080/sse).

  2. You will receive an mcp-hello event upon connection.

  3. To call a function, send an MCP function_call message via a POST request to the /messages endpoint with a sessionId query parameter matching your SSE connection ID.

    Example POST to /messages?sessionId=<your_session_id>:

    Headers:

    Content-Type: application/json
    

    Body:

    {
      "type": "function_call",
      "id": "call-123",
      "function_name": "get_pets_by_status",
      "parameters": {
        "status": "available"
      }
    }
    
  4. The server will execute the corresponding API call and send back a function_return or error event over the established SSE connection.

Development

Run in development mode with auto-recompilation:

# Make sure to provide the OpenAPI file path
npm run dev -- -f ./path/to/your/openapi.yaml

Current Limitations

  • Authentication: Not implemented
  • Schema Validation: While basic schema validation is in place, some complex OpenAPI schema features (discriminators, complex compositions) might not be fully supported.
  • Testing: No automated tests are currently included.
  • Documentation: Individual tool documentation could be improved with more examples and parameter descriptions.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for OpenAPI to MCP from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/openapi-to-mcpserver-spaceguy101)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools