# OpenAPI MCP Server

> Turn OpenAPI-defined REST APIs into MCP tools.

- **URL**: https://followmcp.com/en/servers/mcp-openapi-server
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 302
- **FMRS Score**: 53/100 (Grade D)
- **Source**: https://github.com/ivo-toby/mcp-openapi-server
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Node.js
- **Auth**: API key / credential required

## Overview
OpenAPI MCP Server exposes API endpoints from an OpenAPI specification as MCP tools, with optional prompts and resources. It supports stdio and streamable HTTP transports for MCP clients and can be used as a CLI or a Node.js library.

## Best for
- Teams or developers with an OpenAPI specification who want MCP clients to call its REST API.
- Node.js developers who need to filter endpoints or implement custom authentication logic.

## Not for
- APIs without an OpenAPI specification when no specification content can be supplied.
- Users who require an official MCP implementation maintained by the upstream product or protocol owner.

## Required permissions
- Must read the configured OpenAPI specification, which can come from a URL, local file, standard input, or inline content.
- API calls require access to the configured API and use the configured headers, auth provider, or TLS credentials.
- HTTP transport must listen on the configured host and port; the default host is 127.0.0.1.

## Risks
- Exposed MCP tools can call upstream API endpoints; endpoint filtering is not authorization, so rely on the upstream API's authentication and access controls.
- Protect static headers and credentials. Use the always spec-auth mode only when you trust the specification host.
- HTTP transport binds to localhost by default; consider additional authentication if exposing it to other hosts.
- Disabling TLS certificate verification allows untrusted server certificates and should only be configured intentionally.

## Client config (JSON)
```json
{
  "mcpServers": {
    "openapi": {
      "command": "npx",
      "args": [
        "-y",
        "@ivotoby/openapi-mcp-server"
      ],
      "env": {
        "API_BASE_URL": "https://api.example.com",
        "OPENAPI_SPEC_PATH": "https://api.example.com/openapi.json",
        "API_HEADERS": "Authorization:Bearer token123,X-API-Key:your-api-key"
      }
    }
  }
}
```
