Open Source · MIT Licensed

OpenAPI to MCP
in seconds

Generate an MCP server from any OpenAPI specification. Let AI assistants interact with your REST APIs instantly.

$ npm install -g @bahridev/mcpify copy
terminal
# Start an MCP server from any OpenAPI spec
mcpify ./openapi.yaml

# With authentication
mcpify ./api.yaml --bearer-token $TOKEN

# Filter specific operations
mcpify ./api.yaml --include "get*,list*" --exclude "delete*"

mcpify v1.0.0 — serving 24 tools from "My API"

Everything you need

Zero config required. Just point it at your spec.

Zero Config

Point it at any OpenAPI 3.x spec and get a fully functional MCP server. No setup, no boilerplate.

🔍

Smart Filtering

Include or exclude operations with glob patterns. Filter by tags. Expose only what you need.

🔒

Authentication

Bearer tokens, API keys, environment variables. Auto-detects auth type from your spec.

📦

Dual Interface

Use as a CLI tool or import as a library. Full TypeScript types included.

🏷️

Tool Annotations

Automatically marks GET as read-only, DELETE as destructive. AI knows what's safe.

🌐

URL or File

Load specs from local files or remote URLs. Supports YAML and JSON.

How it works

From spec to server in four steps.

1

Parse

Reads and dereferences your OpenAPI spec, resolving all $ref pointers

2

Generate

Converts each operation into an MCP tool with JSON Schema validation

3

Serve

Starts an MCP server over stdio that AI assistants can connect to

4

Execute

When a tool is called, builds and sends the HTTP request, returns the response

Quick setup

Add to your AI assistant config and start using your API in seconds.

Claude Desktop
{
  "mcpServers": {
    "my-api": {
      "command": "mcpify",
      "args": [
        "./openapi.yaml",
        "--bearer-token",
        "sk-..."
      ]
    }
  }
}
Programmatic API
import { parseSpec, generateTools,
  startServer } from '@bahridev/mcpify'

const spec = await parseSpec('./api.yaml')
const tools = generateTools(spec.operations)

await startServer({
  spec, tools,
  operations: spec.operations,
  baseUrl: spec.defaultServerUrl,
  auth: { type: 'none' },
  transport: 'stdio',
  port: 3100,
  maxResponseSize: 50 * 1024,
})