APIFold
APIFold reads an OpenAPI 3.x or Swagger 2.x specification and generates a live, production-ready MCP server endpoint. AI agents — Claude, Cursor, Copilot, or any MCP-compatible client — can connect immediately. Tool calls execute real HTTP requests to real upstream APIs with securely stored credentials. No stubs, no mocks, no glue code.
Quick Start
CLI (fastest)
npx apifold serve ./your-openapi-spec.yaml --base-url https://api.example.comOne command. Your spec becomes a running MCP server with SSE transport on localhost:3000. Connect Claude or Cursor immediately.
From the API Registry
npx apifold serve --registry stripe --base-url https://api.stripe.comShips with 8 pre-configured API specs: Stripe, GitHub, Slack, HubSpot, Twilio, OpenAI, Notion, and Petstore.
Hosted Platform
Sign up at apifold.dev
Import a spec (URL, file upload, or browse the registry)
Copy the connection snippet into Claude Desktop or Cursor
Your MCP server is live with a unique endpoint URL
Related MCP server: api-to-mcp
Features
OpenAPI 3.x + Swagger 2.0 — auto-converts Swagger 2.0 specs transparently
CLI tool —
npx apifold servefor zero-config local MCP serversAPI registry — one-click deploy from 8 curated API specs
OAuth 2.0 — Authorization Code (PKCE), Client Credentials, 8 provider presets, auto token refresh
Access profiles — tool-level permissions (Read Only / Read-Write / Full Access)
Analytics — call volume, latency percentiles, error breakdown, usage quotas
Custom domains — use
mcp.yourcompany.comwith DNS verificationUnique endpoint IDs — cryptographic, unguessable URLs per server
SSE + Streamable HTTP — both MCP transport modes supported
Vault encryption — AES-256-GCM for all stored credentials
SSRF protection — DNS pinning, redirect blocking, private IP rejection
CLI
npm install -g @apifold/cliCommand | Description |
| Start an MCP server from an OpenAPI spec |
| Start from a registry spec |
| Output MCP tool definitions as JSON |
| Parse-only validation with warnings |
| Generate an |
Config file
# apifold.config.yaml
spec: ./openapi/stripe.yaml
port: 3001
transport: sse
baseUrl: https://api.stripe.com
auth:
type: bearer
token: ${STRIPE_API_KEY}
filters:
tags: [payments, customers]
methods: [get, post]Self-Hosting
Development
git clone https://github.com/Work90210/APIFold.git
cd APIFold
pnpm install
cp .env.example .env
docker compose -f infra/docker-compose.dev.yml up -d
pnpm devOpen http://localhost:3000 to access the dashboard.
Production
cp .env.example .env
# Edit .env with your production values
docker compose -f infra/docker-compose.yml up -dUsing the Transformer Library
The core conversion logic is a standalone MIT-licensed npm package:
npm install @apifold/transformerimport { parseSpec, transformSpec, autoConvert } from "@apifold/transformer";
// Auto-convert Swagger 2.0 if needed
const { spec } = await autoConvert(rawSpec);
// Parse and transform
const parsed = parseSpec({ spec });
const { tools } = transformSpec({ spec: parsed.spec });
// tools = MCPToolDefinition[] ready for any MCP serverArchitecture
graph LR
Spec["OpenAPI / Swagger\nSpec"] --> Transformer
subgraph MT["APIFold"]
Transformer["Transformer\n(MIT lib)"]
Transformer --> Runtime["Runtime\nExpress + SSE"]
Web["Web App\nNext.js"] --> DB["Postgres 16\nRedis 7"]
Runtime --> DB
CLI["CLI Tool\nnpx apifold"]
Registry["API Registry\n8 specs"]
end
Runtime --> Upstream["Upstream API\n(Stripe, GitHub, etc.)"]
Agent["AI Agent\nClaude, Cursor,\nCopilot, etc."] -- "MCP / SSE" --> RuntimeComponent | Path | Description |
Transformer | OpenAPI to MCP conversion. Pure functions. MIT licensed. | |
Runtime | Express MCP server with SSE/HTTP, OAuth token refresh, access profiles. | |
Web App | Next.js dashboard. Import specs, manage credentials, analytics, custom domains. | |
CLI | Standalone CLI tool. | |
Registry | Curated catalog of 8 validated API specs with one-click deploy. | |
Types | Shared TypeScript type definitions. | |
UI | Design system and component library. |
Available Commands
Command | Description |
| Start all services with hot-reload |
| Build all packages |
| Run tests |
| Lint all packages |
| Type-check all packages |
| Format all files with Prettier |
| Run database migrations |
| Open Drizzle Studio |
Contributing
All code contributions must go through a pull request and be approved before merging. See the contribution guide.
Want to add an API to the registry? See packages/registry/CONTRIBUTING.md.
Security
For security issues, please refer to our security policy. Do not post security vulnerabilities as public GitHub issues.
License
Everything else — GNU Affero General Public License v3.0
Available Tools
2 toolsget_server_endpointB
Get the SSE endpoint URL for a specific APIFold MCP server by slug.
Inputs: slug (required), userKey (required).
list_serversA
List all 18 free hosted APIFold MCP servers (GitHub, Stripe, Slack, OpenAI, Notion, and more). Each server proxies a REST API — bring your own API key.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one lists all available servers (discovery), while the other retrieves a specific connection endpoint (retrieval). No functional overlap exists between listing a catalog and fetching a specific URL.
Both tools follow a consistent verb_noun pattern using snake_case (get_server_endpoint, list_servers). The verb choices ('get' vs 'list') accurately reflect the read operations and maintain predictable conventions.
With only 2 tools, the surface feels minimal/thin despite the server connecting to 18 different API proxies. While functional for pure discovery (list + get), the count is borderline for the implied richness of the domain.
Covers the core read-only lifecycle for a directory service: discovery (list) and connection (get endpoint). Minor gap in filtering/search capabilities for the 18 servers, though listing all is acceptable at this scale.
Maintenance
Related MCP Connectors
9 remote MCP servers on Cloudflare Workers for AI agents. Free tier + Pro API keys.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Hosted MCP server to manage a restaurant menu from AI agents - 39 tools over the DuckHub API.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceTurns any OpenAPI specification into a fully working MCP server with a single command, enabling AI agents to call APIs without writing any glue code.MIT
- AlicenseNot gradedqualityDmaintenanceTurns any OpenAPI REST or GraphQL API into an MCP server, allowing AI assistants like Claude to interact with APIs without writing code.57 npmMIT
- AlicenseAqualityDmaintenanceTurn any data source into an MCP server in 5 minutes. Build knowledge bases that AI assistants like Claude and Cursor can query directly.27 npm23MIT
- AlicenseNot gradedqualityDmaintenanceFree, minimal REST API wrapper as an MCP server that lets your AI agent call any API.MIT