Install
$ agentstack add mcp-evalops-mcp-openapi ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
mcp-openapi
OpenAPI 3.x to MCP server bridge in TypeScript.
mcp-openapi takes an OpenAPI spec and turns it into an MCP server where each OpenAPI operation is an MCP tool. Tool calls are proxied to the original REST API with runtime validation and auth handling.
Capabilities
- OpenAPI 3.0+ support (YAML/JSON,
$refdereference, operation compilation) - Proxy behavior to upstream REST API
- Authentication via env vars:
- API keys (
in: header|query|cookie) - HTTP Bearer
- HTTP Basic
- OAuth2 / OpenID Connect (static token or client credentials token fetch)
- Runtime validation:
- Zod validation generated from OpenAPI-derived JSON Schema
- AJV JSON Schema validation
- Response schema validation by HTTP status
- Typed TypeScript implementation
- Strict lint mode for OpenAPI quality gates (
--strict) - Configurable tool naming template (
--tool-name-template) - Policy engine:
- allow/deny tool patterns
- allow methods/path prefixes
- allow hosts
- Optional response transform hook (
--response-transform) - Multiple transports:
stdiostreamable-http(Hono)sse(legacy compatibility transport)- Transport hardening:
- graceful shutdown
- SSE session caps/TTL
- Observability:
- Prometheus metrics
- status counters
- latency histogram buckets
- Built-in browser test clients:
/test/streamable/test/sse- Project scaffold (
init) that generates: package.jsontsconfig.jsonsrc/server.ts.env.exampleREADME.mdDockerfile
Install
npm install
Consume as a library from GitHub:
npm install github:evalops/mcp-openapi
Library Usage
import { parseSpec, generateToolsWithTags } from "mcp-openapi";
const normalized = await parseSpec("./openapi.yaml");
const generated = generateToolsWithTags(normalized, { prefix: "github" });
console.log(generated.tools[0]?.name);
The library entrypoint exports:
parseSpecgenerateToolsgenerateToolsWithTagsNormalizedSpec
Run
stdio
npm run dev -- --spec ./openapi.yaml
StreamableHTTP
npm run dev -- --spec ./openapi.yaml --transport streamable-http --port 3000
Endpoints:
http://localhost:3000/healthhttp://localhost:3000/metricshttp://localhost:3000/mcphttp://localhost:3000/test/streamable
SSE (legacy)
npm run dev -- --spec ./openapi.yaml --transport sse --port 3000
Endpoints:
http://localhost:3000/healthhttp://localhost:3000/metricshttp://localhost:3000/ssehttp://localhost:3000/messages?sessionId=...http://localhost:3000/test/sse
CLI
mcp-openapi --spec [options]
mcp-openapi init [dir]
mcp-openapi generate --spec [--out-dir ./generated]
Options:
--server-url--cache-path--out-dir--strict--tool-name-template--print-tools--validate-spec--transport stdio|streamable-http|sse--port--watch-spec--timeout-ms--retries--retry-delay-ms--max-response-bytes--max-concurrency--allow-hosts host1,host2--allow-tools pattern1,pattern2--deny-tools pattern1,pattern2--allow-methods GET,POST--allow-path-prefixes /v1,/public--response-transform--sse-max-sessions--sse-session-ttl-ms
Template placeholders for --tool-name-template:
{operationId}{method}{path}{tag}
Response transform module example:
export default function transform({ operation, response }) {
return { ...response.body, transformedBy: operation.operationId };
}
Auth env vars
MCP_OPENAPI_API_KEYMCP_OPENAPI_BEARER_TOKENMCP_OPENAPI_BASIC_USERNAMEMCP_OPENAPI_BASIC_PASSWORDMCP_OPENAPI_OAUTH2_ACCESS_TOKENMCP_OPENAPI_OAUTH2_CLIENT_IDMCP_OPENAPI_OAUTH2_CLIENT_SECRETMCP_OPENAPI__TOKENMCP_OPENAPI__CLIENT_IDMCP_OPENAPI__CLIENT_SECRET
Build and verify
npm run check
npm run build
npm test
npm run smoke
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: evalops
- Source: evalops/mcp-openapi
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.