MCPSERV.CLUB
nonchan7720

OAS-MCP

MCP Server

Generate MCP servers from OpenAPI specs

Stale(55)
0stars
2views
Updated May 30, 2025

About

OAS-MCP is a Go tool that automatically generates Model Context Protocol servers and client code from OpenAPI YAML/JSON files, enabling real‑time communication via SSE.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview of OAS‑MCP

OAS‑MCP is a Go‑based tool that turns an OpenAPI specification into a fully functional Model Context Protocol (MCP) server. By parsing the YAML or JSON definition of an API, it automatically generates a Go client library and then exposes each endpoint as an MCP tool. This means that any service described by OpenAPI can instantly become a set of callable actions for AI assistants such as Claude, without manual coding of the MCP plumbing.

The server solves a common pain point for developers who want to integrate third‑party APIs into conversational agents: the need to write both client wrappers and MCP adapters by hand. OAS‑MCP removes that boilerplate, ensuring that the generated code is type‑safe, up‑to‑date with the spec, and follows best practices for Go. The result is a rapid, repeatable workflow where a single command produces a ready‑to‑deploy MCP server that mirrors the original API’s capabilities.

Key features include:

  • Automatic client generation using , which translates OpenAPI paths, parameters, and schemas into idiomatic Go structs and functions.
  • Seamless MCP integration via , turning each generated endpoint into a tool that the AI assistant can invoke with a simple JSON payload.
  • Real‑time communication powered by Server‑Sent Events (SSE), allowing streaming responses from the API to be forwarded directly to the user in a conversational flow.
  • Extensible code generation with , giving developers the option to customize or extend the generated client before it is wrapped as an MCP tool.

Typical use cases span from internal tooling to public APIs:

  • A data science team can expose a custom analytics endpoint as an MCP tool, letting analysts query results through chat without writing new code.
  • A SaaS product can publish its REST API as a conversational interface, enabling customers to perform CRUD operations via natural language.
  • Rapid prototyping of AI‑driven bots that need to call multiple services; the developer writes an OpenAPI spec once, and OAS‑MCP handles all downstream plumbing.

Because the entire pipeline is driven by the OpenAPI spec, any updates to the API—new endpoints, changed parameters, or revised schemas—are automatically reflected in the MCP server after a regeneration step. This tight coupling ensures consistency between documentation, client code, and conversational capabilities, reducing bugs and maintenance overhead.