Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

MCP From Openapi

MCP server by agentfront Verified · npm:mcp-from-openapi

Converts Swagger 2.0 and OpenAPI 3.0, 3.1 and 3.2 specifications into MCP tool definitions. It is for developers who want AI assistants to call an existing REST API through MCP tools.

  • Score 91
  • 12 stars
  • 20k a week
  • Apache-2.0
  • Updated

Install MCP From Openapi

Built from the published package, never by AI.

claude mcp add mcp-from-openapi -- npx -y mcp-from-openapi

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install MCP From Openapi in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-from-openapi block.

About

mcp-from-openapi is a TypeScript library that converts Swagger 2.0 and OpenAPI 3.0, 3.1 and 3.2 specifications into MCP tool definitions. When the same parameter name appears in different locations, such as path and body, it renames the inputs automatically and records how each one maps to the HTTP request. Each tool includes an input schema, an output schema, annotations, and metadata for authentication and servers.

The library also includes buildHttpRequest(), which applies OpenAPI serialization rules for queries, paths, multipart and binary bodies, so developers do not have to assemble requests by hand. It supports filtering by tag, method, path or operationId, client compatibility targets for Claude, OpenAI and Gemini, and SSRF protection during $ref resolution. It is aimed at developers who want to expose an existing API to AI assistants through MCP and register the tools with the official MCP SDK.

Written from the project's README and checked against it.

Tools it gives your assistant

  • generateToolsGenerates MCP tool definitions from a loaded OpenAPI or Swagger specification.
  • buildHttpRequestTurns a tool and input values into a ready-to-send HTTP request.
  • toSdkToolConverts a generated tool for one-line registration with the official MCP SDK.
  • analyzeToolSetEstimates the token cost of each tool and warns at context-budget thresholds.
  • lintFlags spec gaps that can hurt tool-calling accuracy.
  • fromArazzoBuilds consolidated MCP tools from Arazzo 1.0 workflows.

What you need

  • Node.js or a V8 isolate runtime such as Cloudflare Workers
  • npm, yarn or pnpm to install the package

Try asking

  • Turn this OpenAPI spec into MCP tools for my assistant
  • Build the HTTP request for the createUser tool with these inputs
  • Check my OpenAPI spec for gaps that hurt tool-calling accuracy

Good to know

  • Swagger 2.0 documents are converted to OpenAPI 3.0, and anything that cannot be carried over exactly is recorded in diagnostics.
  • The source links to a known gaps section in the OpenAPI versions documentation.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to MCP From Openapi

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

MCP From Openapi: common questions

What spec versions does mcp-from-openapi support?

It supports Swagger 2.0 and OpenAPI 3.0, 3.1 and 3.2. Swagger 2.0 documents are converted to OpenAPI 3.0 before tools are generated.

How does it handle parameters with the same name?

It detects conflicts across path, query, header, cookie and body parameters and renames them automatically. A mapper records which input goes to which location.

Can it run on Cloudflare Workers?

The source says it works on Node and V8 isolates such as Cloudflare Workers.

How do I install MCP From Openapi?

In Claude Code run claude mcp add mcp-from-openapi -- npx -y mcp-from-openapi. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is MCP From Openapi the official server?

MCP From Openapi is published by npm:mcp-from-openapi from its verified domain in the official MCP Registry.

Is MCP From Openapi free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is MCP From Openapi safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to MCP From Openapi?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does MCP From Openapi work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

MCP From Openapi Install

Add to stack

Loading.