Turn any REST API into an MCP server in one command
LocalAbout Turn any REST API into an MCP server in one command
mcpify is a command-line tool for turning OpenAPI 3.x documents into MCP servers, so developers can expose existing REST APIs to AI agents. It generates tools from the spec at runtime and applies a configured global auth header.
Key features
- 01Generate tools from OpenAPI operations
- 02Read JSON or YAML specs from URL or file
- 03Handle GET, POST, PUT, PATCH, DELETE
- 04Map request parameters and JSON bodies
- 05Apply a global API key or bearer header
- 06Preview generated tools without serving
Use cases
- 01Expose an existing REST API to an AI agent
- 02Preview operations before starting the server
- 03Connect a staging API using a custom base URL
MCP support
It runs as an MCP server over stdio and exposes each operation in an OpenAPI spec as a tool. MCP clients can invoke those tools to make corresponding HTTP requests.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmcpify
Turn any REST API into an MCP server in one command. Point mcpify at an OpenAPI
spec and every endpoint becomes a tool your AI agent (Claude, Cursor, Windsurf, …) can
call — no glue code, no per-endpoint wrappers.
mcpify https://api.example.com/openapi.json
That's it. Every operation in the spec is now a live MCP tool.
Why
MCP is how AI agents call real tools. But wiring an
existing API into MCP means hand-writing a tool wrapper for every endpoint — tedious and
stale the moment the API changes. Almost every API already publishes an OpenAPI spec.
mcpify reads that spec and generates the whole MCP server at runtime, so:
- Zero per-endpoint code — N endpoints → N tools, automatically.
- Always in sync — regenerate from the spec; no wrappers to maintain.
- Auth-aware — pass an API key / bearer token once, applied to every call.
Install
pipx install mcpify-cli # or: uvx mcpify-cli ...
Use
Preview the tools a spec produces (no server):
mcpify --list examples/petstore-mini.yaml
Run it as an MCP server (stdio):
mcpify https://petstore3.swagger.io/api/v3/openapi.json
mcpify ./openapi.yaml --base-url https://staging.internal.api
mcpify ./openapi.yaml --auth "Authorization: Bearer $TOKEN" # or set MCPIFY_AUTH
Plug it into Claude
Add to your MCP client config (Claude Desktop / Claude Code mcp.json):
{
"mcpServers": {
"petstore": {
"command": "mcpify",
"args": ["https://petstore3.swagger.io/api/v3/openapi.json"]
}
}
}
Restart the client and ask: "list the available pets" — Claude calls the API directly.
How it works
- Load the OpenAPI 3.x document (URL or file, JSON or YAML).
- Walk every path/method into an
Operationwith a generated JSON input schema. - Serve them over MCP; each tool call is mapped to a live HTTP request (path, query, header params and JSON bodies all handled) and the response is returned to the agent.
Supported
- OpenAPI 3.x, JSON or YAML, from a URL or local file
GET/POST/PUT/PATCH/DELETE- Path, query, and header parameters; JSON request bodies
- A single global auth header (API key or bearer token)
Roadmap
- Per-operation filtering (
--only,--tag) to expose a subset of a large API $refresolution for fully-expanded body schemas- Swagger 2.0 specs
- SSE / HTTP transport in addition to stdio
PRs welcome.
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.