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
3
input formats
1206
ops → tools, one spec
2
transports
0
lines hand-wired

§1 · the transformation

Four stages. Deterministic. Same spec in, same tools out, every time.

01
spec
OpenAPI 3.x, Swagger 2.0, or a Postman collection. Whatever you already have.
02
normalize
One internal model. $refs resolved, params flattened, auth understood.
03
typed tools
Each operation becomes a tool with JSON Schema inputs and outputs.
04
mcp server
Serving over stdio or Streamable HTTP. An agent connects and calls.

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.

petstore.yamlOpenAPI 3.0 · 19 operations → 19 tools
  • 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.

run — dynamic
  • + zero codegen — the server is the spec
  • + instant: parse, type, serve in one step
  • + nothing written to disk
$ npx @namanchopra/mcpify run ./openapi.yaml
generate — codegen
  • + 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.

npm

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.

MCP Registry

Emit a schema-correct server.json and register it in the official MCP Registry — the catalog agents and clients use to discover servers.

hosted · Fly.io

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 --deploy

gated ▸ 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.

methodannotationwhat the agent may assume
GET▸ read-onlyNo side effects. An agent can call it freely while exploring.
POST / PATCH / PUT▸▸ writeCreates or mutates state. Worth a confirmation policy.
DELETE▸! destructiveIrreversible by default. Agents should ask before pulling this lever.

legend  ▸ read-only  ▸▸ write  ▸! destructive

§6 · what you get

Everything the mechanical work needed — handled.

01
every HTTP method

GET, POST, PUT, PATCH, DELETE, HEAD — each mapped to a tool with the right idempotency and safety hints.

02
filter what you expose

Narrow to a subset with tag:, path:, or op: patterns — or --read-only for a safe surface. Big specs stay usable.

03
auth, from the spec

API key, bearer, basic, and OAuth2 client-credentials — read from env vars at runtime, never written down.

04
three input formats

OpenAPI 3.0 / 3.1, Swagger 2.0, and Postman collections — auto-detected from a local file or a URL.

05
two transports

stdio for a local agent, Streamable HTTP for anything remote. Same tools, same behavior, either way.

06
typed inputs

Each tool ships a JSON Schema. Arguments are validated before a request goes out — bad calls never hit your API.

07
response shaping

Large payloads are capped with a truncation notice, so a single call can never blow past the agent context.

08
SSRF-guarded

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

deterministic & offline

No LLM anywhere in the pipeline. Parsing, typing, and codegen are pure functions of your spec — reproducible in CI, runnable with the network off.

secrets via env vars only

API keys and tokens are read from the environment at runtime. They never appear in generated code, logs, or anything you might commit.

SSRF-guarded base URL

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