OpenAPI to MCP

by constellation39

Not rated
GitHub

About

A Go tool for converting OpenAPI specifications into MCP tools.

Details

Author
constellation39
Categories
Developer Tools, API

Setup

Install OpenAPI to MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/constellation39/vrchat-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

openapi-to-mcpis a Go implementation for converting OpenAPI specifications into MCP (Model Context Protocol) tools.

This project aims to provide a flexible framework that allows developers to automatically expose existing OpenAPI interfaces as MCP tools through simple configuration, enabling AI models to call these interfaces directly.

You can installopenapi-to-mcpin two ways.

The easiest way to install and run the tool is usinggo install. After installation, theopenapi-to-mcpcommand will be available in your shell.

go install github.com/constellation39/openapi-to-mcp@latest

If you want to modify the code or contribute, clone the repository and build the project.

git clone https://github.com/constellation39/openapi-to-mcp cd openapi-to-mcp go build . # The executable will be ./openapi-to-mcp

Follow these steps to configure and run the tool.

Create a.envfile in the project's root directory or set the following environment variables in your system. You can start by copying the example file:

# On Windows copy .env.example .env # On macOS/Linux cp .env.example .env

Then, edit the.envfile with your desired configuration:

Execute the application from your terminal.

For development, you can also run directly usinggo run:

Configure your MCP client to connect toopenapi-to-mcpbased on theMCP_TRANSPORTyou've chosen.

- Stdio Mode (Default): IfMCP_TRANSPORTisstdio, configure your client to execute the command directly. Theenvblock can be used to pass or override environment variables.

{ "mcpServers": { "openapi-to-mcp": { "command": "openapi-to-mcp", "env": { "MCP_BASE_URL": "http://localhost:8080", "OPENAPI_SRC": "./example/openapi.yaml" } } } }

Note: If running from source, you might set"command"to"./openapi-to-mcp"or usego run main.go.

- SSE Mode: IfMCP_TRANSPORTissse, the server will start on theMCP_BASE_URL. Configure your client to connect to the/sseendpoint.

{ "mcpServers": { "openapi-to-mcp": { "url": "http://localhost:8080/sse" } } }

- Stream Mode: IfMCP_TRANSPORTisstream, the server will start on theMCP_BASE_URL. Configure your client to connect to the/streamendpoint.

{ "mcpServers": { "openapi-to-mcp": { "url": "http://localhost:8080/stream" } } }

Please ensurehttp://localhost:8080matches theMCP_BASE_URLin your configuration.

.github/ core/ ├── openapi.go # OpenAPI specification parsing and tool generation logic ├── session/ # Session management ├── middleware.go # MCP middleware definitions └── utils.go # Common utility functions example/ ├── openapi.yaml # Example OpenAPI specification file main.go # Main application entry point README.md README_zh.md go.mod go.sum

Contributions are welcome! Feel free to submit a Pull Request or report an Issue.

This project is released under the MIT License.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

A server that dynamically creates MCP endpoints from any OpenAPI specification URL.

Turn any OpenAPI 3.0 spec into an MCP server with zero code — deploy to Cloudflare Workers, Node.js, Docker, or run locally via npx, with a built-in OAuth 2.1 server for MCP clients that require custom connector authentication.

An MCP server for any web application with an OpenAPI specification, connecting AI models to external tools and data services.

A zero-configuration tool to automatically expose FastAPI endpoints as MCP tools.

An MCP server that enables Large Language Models to make HTTP requests and interact with web APIs. It supports automatic tool generation from OpenAPI/Swagger specifications.

CLI tool that generates MCP servers from OpenAPI/Postman specs — pip install mcpgen-cli

A secure MCP-to-OpenAPI proxy server that converts MCP tools into OpenAPI compatible HTTP servers, with support for multiple server types and automatic API documentation.

Turn any OpenAPI/Swagger spec into Claude tools. Zero config, zero code.

Connect to any OpenAPI-based API with built-in OAuth2 authentication management.

Converts OpenAPI/Swagger specifications to Model Context Protocol (MCP) format, providing a modern Web UI and a backend service.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.