spec in → server out · no hand-wiring
Point mcpify at any API spec and get a working MCP server out the other side.
OpenAPI, Swagger, or Postman → tools an agent can call. One command. No hand-wiring.
$ npx @namanchopra/mcpify run ./openapi.yaml↳ or install it globally:
$ npm install -g @namanchopra/mcpify§1 · the transformation
Four stages. Deterministic. Same spec in, same tools out, every time.
out ▸ stdio for local agents · Streamable HTTP for anything remote
§2 · see it on any spec
Point it at what you already have. Every operation becomes a named, typed tool.
- listPets▸ read-only
- getPetById▸ read-only
- createPet▸▸ write
- updatePet▸▸ write
- deletePet▸! destructive
- + 14 more, all named & typed
§3 · two modes
Run it now, or generate a project you own. Pick one.
- + zero codegen — the server is the spec
- + instant: parse, type, serve in one step
- + nothing written to disk
$ npx @namanchopra/mcpify run ./openapi.yaml- + a self-contained TypeScript project
- + editable — change any tool by hand
- + publishable to npm, deployable anywhere
$ npx @namanchopra/mcpify generate ./openapi.yaml -o my-server§4 · ship it
Generate once, then publish everywhere — three targets, composable in one command.
Publish the generated package so anyone can `npx` it. mcpify makes package.json release-ready and runs npm publish — an already-published version is skipped, not re-sent.
Emit a schema-correct server.json and register it in the official MCP Registry — the catalog agents and clients use to discover servers.
Emit a Dockerfile + fly.toml and run one-command fly deploy for a live Streamable HTTP endpoint — on infrastructure you own, no lock-in.
$ npx @namanchopra/mcpify publish ./my-server --npm --registry --deploygated ▸ a confirmation prompt (defaults to no) · --dry-run previews everything · tokens come from env vars only
§5 · correct by construction
Safety annotations, derived — not declared.
Every tool's safety hint comes straight from its HTTP method. The agent knows what's safe to call before it calls it — and you never annotate anything by hand.
| method | annotation | what the agent may assume |
|---|---|---|
| GET | ▸ read-only | No side effects. An agent can call it freely while exploring. |
| POST / PATCH / PUT | ▸▸ write | Creates or mutates state. Worth a confirmation policy. |
| DELETE | ▸! destructive | Irreversible by default. Agents should ask before pulling this lever. |
legend ▸ read-only ▸▸ write ▸! destructive
§6 · what you get
Everything the mechanical work needed — handled.
GET, POST, PUT, PATCH, DELETE, HEAD — each mapped to a tool with the right idempotency and safety hints.
Narrow to a subset with tag:, path:, or op: patterns — or --read-only for a safe surface. Big specs stay usable.
API key, bearer, basic, and OAuth2 client-credentials — read from env vars at runtime, never written down.
OpenAPI 3.0 / 3.1, Swagger 2.0, and Postman collections — auto-detected from a local file or a URL.
stdio for a local agent, Streamable HTTP for anything remote. Same tools, same behavior, either way.
Each tool ships a JSON Schema. Arguments are validated before a request goes out — bad calls never hit your API.
Large payloads are capped with a truncation notice, so a single call can never blow past the agent context.
The base URL is validated; a tool call can’t be steered at localhost, private ranges, or metadata endpoints.
§7 · mcpify studio
A local web UI, when you want eyes on it.
Drop a spec, preview every tool it becomes, then start a server on the spot — or download the generated project. Runs on your machine; nothing leaves it.
$ npx @namanchopra/mcpify studio§8 · nothing clever in the pipeline
No LLM anywhere in the pipeline. Parsing, typing, and codegen are pure functions of your spec — reproducible in CI, runnable with the network off.
API keys and tokens are read from the environment at runtime. They never appear in generated code, logs, or anything you might commit.
The upstream base URL is pinned and validated. A tool call can't be steered at internal hosts or metadata endpoints.
You already wrote the spec. That was the hard part.
$ npx @namanchopra/mcpify run ./openapi.yaml