oas-mcp
openapi to mcp server
Documentation
OAS-MCP
OpenAPI仕様からModel Context Protocol(MCP)サーバーを自動生成するツール
概要
OAS-MCPは、OpenAPI仕様書(YAML/JSON)からModel Context Protocol(MCP)サーバーとツールを自動的に生成するGoアプリケーションです。OpenAPIの各エンドポイントはMCPツールとして利用可能になります。
機能
- OpenAPI仕様からGoクライアントコードを自動生成
- 生成したクライアントコードを利用したMCPサーバーの構築
- 各APIエンドポイントをMCPツールとして提供
- SSE (Server-Sent Events) を活用したリアルタイム通信
必要条件
- Go 1.24以上
インストール方法
# リポジトリをクローン
git clone https://github.com/nonchan7720/oas-mcp.git
cd oas-mcp
# 依存関係のインストール
go mod download使用方法
# OpenAPI仕様からクライアントコードを生成
go run cmd/main.go -path=./api/openapi.yaml -output=./pkg/client
# または、go:generateを使用
go generate ./...主な依存ライブラリ
- ogen-go/ogen - OpenAPIからGoコードを生成
- mark3labs/mcp-go - MCPサーバー実装
- dave/jennifer - Goコード生成ライブラリ
ライセンス
このプロジェクトはオープンソースソフトウェアとして提供されています。詳細についてはLICENSEファイルをご覧ください。
Frequently asked questions
What is oas-mcp?
oas-mcp is openapi to mcp server
How do I install oas-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is oas-mcp open source?
Yes — it is hosted on GitHub at https://github.com/nonchan7720/oas-mcp.
Related MCP tools
Convert Any OpenAPI V3 API to MCP Server Go-based implementation. Trusted by 500+ developers. Trusted by 500+ developers.
:robot: The free, Open Source alternative to OpenAI, Claude and others. Self-hosted and local-first. Drop-in replacement for OpenAI, running on consumer-gra...
MCP Toolbox for Databases is an open source MCP server for databases. Go-based implementation. Trusted by 10900+ developers.
A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
WhatsApp MCP server Go-based implementation. Trusted by 4900+ developers. Trusted by 4900+ developers. Trusted by 4900+ developers.
MCP server for Grafana Go-based implementation. Trusted by 1700+ developers. Trusted by 1700+ developers. Trusted by 1700+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP