$ timeahead.in
/ servers/npm/openapi-mcp-generator
npm

openapi-mcp-generator

Generates MCP server code from OpenAPI specifications

601 stars25k/wkupdated 36d agogithub ↗
90excellent
▣ Overview
npm versionLicense: MITGitHub repository

What it does

This is a code generator that converts OpenAPI 3.0+ specifications into fully typed MCP servers. Given an OpenAPI spec (local file or URL), it scaffolds a complete Node.js project with TypeScript, Zod validation, and your choice of transport: stdio, web via Hono, or StreamableHTTP. The generated server proxies requests to the original REST API while handling authentication (API keys, Bearer tokens, Basic auth, OAuth2) via environment variables.

Who it's for

Backend engineers and API maintainers who want to expose existing REST APIs to Claude and other MCP clients without writing boilerplate. Teams integrating legacy or third-party APIs into AI workflows.

Common use cases

  • Expose a private REST API to Claude Code via a stdio-based MCP server
  • Generate a web-based MCP server wrapping a third-party SaaS API, complete with HTML test client
  • Automate MCP server creation across multiple OpenAPI specs in a CI/CD pipeline
  • Enable AI agents to call internal microservices with automatic validation and auth

Setup pitfalls

  • Requires --input (OpenAPI spec path/URL) and --output (directory) flags; --base-url must be set if the spec lacks a servers field.
  • Configure auth environment variables (API_KEY, BEARER_TOKEN, etc.) before running the generated server.
  • High risk classification: generated code reads and writes the filesystem and makes network calls. Validate the OpenAPI spec, test generated servers in isolated environments, and audit for malicious endpoints.
  • Transport choice affects dependencies: web transports require Hono. Review package.json after generation and install only necessary dependencies.
▣ Score BreakdownMCPScore = Σ(raw × weight)
DimensionRawWeighted
Security
35%
100
35.0
Freshness
25%
100
25.0
Adoption
20%
81
16.1
Quality
10%
90
9.0
Trust
10%
50
5.0
Total
90.1
⚿ Capabilities & Risk Explainer
fs readfs writenetworkexecevalsecrets
◆ Risk level: high
fs read + fs write + network + exec + eval + secrets active — can execute code, access credentials, and make external network calls.
⚙ Install config
Claude Desktop · Cursor · Windsurf · VS Code (Copilot) · Claude Code
add to your MCP client config:
{
  "mcpServers": {
    "openapi-generator": {
      "command": "npx",
      "args": [
        "-y",
        "openapi-mcp-generator"
      ]
    }
  }
}
📈 Score historylast 33 snapshots
4/30/20266/11/2026 · 33 snapshots
⚙ Maintenance health
46/ 100 · is this project alive?
contributors (1y)7
top contributor share33%
releases (1y)0
ci✓ passing
⛁ Raw data
weekly downloads25k
github stars601
forks86
open issues20
license✓ present
readme length11112 chars
last publish0d ago
last commit36d ago
last updated1d ago
install verified✓ pass · 28d ago
owner of this server? claim your listing to get a verified badgeclaim →
🔔 Score drop alerts
get notified by email when this server's score drops 5+ points