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.
Install MCP From Openapi
Built from the published package, never by AI.
claude mcp add mcp-from-openapi -- npx -y mcp-from-openapiRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"mcp-from-openapi": {
"args": [
"-y",
"mcp-from-openapi"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"mcp-from-openapi": {
"args": [
"-y",
"mcp-from-openapi"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"mcp-from-openapi": {
"args": [
"-y",
"mcp-from-openapi"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add mcp-from-openapi -- npx -y mcp-from-openapi{
"mcpServers": {
"mcp-from-openapi": {
"args": [
"-y",
"mcp-from-openapi"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add mcp-from-openapi npx -y mcp-from-openapiGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
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
ANo 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 →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
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.
