mcpField
M
MCP OpenAPI

MCP OpenAPI

Local
github.com/electrocucarachaDeveloper Tools4Updated 58w ago

About MCP OpenAPI

MCP OpenAPI parses an OpenAPI specification and dynamically generates MCP-compatible server code and tools. It is intended for teams adding MCP support to existing services, including through sidecar deployment.

Key features

  1. 01Parses OpenAPI specifications
  2. 02Generates MCP server code
  3. 03Creates MCP-compatible tools

Use cases

  1. 01Generate MCP support from an API specification
  2. 02Deploy alongside an existing service as a sidecar

MCP support

It generates MCP server components and tools from an OpenAPI specification, making the resulting API capabilities available to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP OpenAPI

License GitHub Super-Linter Ruby Style Guide Code style: black

visitors Scc Code Badge Scc COCOMO Badge

This project aims to accelerate the adoption of the MCP protocol by simplifying server generation through automated tooling. It parses an OpenAPI specification and dynamically generates the corresponding MCP server components.

Key Features

  • Parses OpenAPI specifications
  • Dynamically generates MCP-compatible server code and tools
  • Designed to streamline integration and deployment

Use Cases

One common use case is deploying this application as a sidecar alongside existing services. This enables seamless MCP support without requiring manual server implementation.

By automating the translation from OpenAPI to MCP, this tool reduces the overhead of manual server development and promotes faster adoption of the MCP protocol within modern service architectures.

Workflow

sequenceDiagram
    actor user as User
    actor agent as Agent
    participant ingress as Ingress
    participant mcp_proxy as MCP Proxy
    participant openapi_server as OpenAPI Server
    participant db as Database

    user->>ingress: Request for OpenAPI resource
    ingress->>openapi_server: Forward request
    openapi_server->>db: Query database
    db-->>openapi_server: Database response
    openapi_server-->> user: OpenAPI Server response

    Note over user,db: LLM interaction

    user->>agent: Send a prompt
    agent->>ingress: Request for MCP tool
    ingress->>mcp_proxy: Forward request
    mcp_proxy->>openapi_server: Forward request
    openapi_server->>db: Query database
    db-->>openapi_server: Database response
    openapi_server-->>mcp_proxy: OpenAPI Server response
    mcp_proxy-->>agent: MCP server response
    agent-->>user: Prompt response

Environment variables

NameDefaultDescription
OPENAPI_SPEC_URLURL of the Open API specification.
TRANSPORTstreamable-httpTransport type to use for communication with the MCP server.
HOST127.0.0.1Hostname or IP address to bind the server to.
PORT8000Port number to listen on.

How to setup a development environment

This project includes Dev Container support, making it easy to get started with a fully configured development environment. This ensures consistency across development setups and allows contributors to begin working without manual environment configuration.

Option 1: GitHub Codespaces

You can launch a cloud-based development environment instantly:

Open in GitHub Codespaces

Option 2: Local Dev Container (Visual Studio Code)
  1. Install Visual Studio Code.
  2. Install the Dev Containers extension.
  3. Ensure you have a container runtime installed and running:
  4. Open this repository in Visual Studio Code.
  5. When prompted, reopen the project in a Dev Container.

Validation

A helper script is provided to validate the MCP server. It uses the MCP Python SDK to connect, list tools, and execute them.

List available tools
./tests/client.py -m http://localhost:8000/mcp

Example output:

{
  "properties": {
    "url": {
      "title": "Url",
      "type": "string"
    }
  },
  "required": ["url"],
  "title": "fetch_websiteArguments",
  "type": "object"
}
Call a tool
./tests/client.py -m http://localhost:8000/mcp -a call-tool -t fetch -i url=https://electrocucaracha.com/acerca/

Example output (truncated):

<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="UTF-8" />
    ...
  </head>
</html>

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.