{
  "markdown": "# agentify\n\n**Turn any OpenAPI / Swagger spec into an agent-ready MCP server.**\n\n[![npm](https://img.shields.io/npm/v/agentify-openapi)](https://www.npmjs.com/package/agentify-openapi)\nListed on the [official MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.sani-savaliya/agentify) (`io.github.sani-savaliya/agentify`) and [Smithery](https://smithery.ai/servers/sanisavaliya12/agentify).\n\nPoint it at a spec — a URL, a file, OpenAPI 3.x or Swagger 2.0 — and every operation\nbecomes a tool an AI agent can call. No code generation, no per-API boilerplate, no\nhosting. One command.\n\n```bash\nnpx agentify-openapi https://petstore3.swagger.io/api/v3/openapi.json --list\n```\n\n```\nSwagger Petstore - OpenAPI 3.0 v1.0.27\nBase URL: https://petstore3.swagger.io/api/v3\nTools: 19\n\n  getPetById\n    Find pet by ID.\n  findPetsByStatus\n    Finds Pets by status.\n  ...\n```\n\n## Why\n\n> *\"Today, agents have to operate software designed for humans. The interfaces of\n> the future will be built for agents — APIs, MCPs, CLIs — with agents as\n> first-class citizens.\"* — [YC RFS: Software for Agents](https://www.ycombinator.com/rfs)\n\nThere are tens of thousands of APIs that already describe themselves with an OpenAPI\ndocument. `agentify` makes every one of them agent-native, instantly, without anyone\nhand-writing an integration.\n\n## Use it with Claude, Cursor, Windsurf — any MCP client\n\nAdd it to your client's MCP config. The same `command`/`args` shape works in\n**Claude Desktop**, **Claude Code** (`claude mcp add`), **Cursor**\n(`.cursor/mcp.json`), **Windsurf**, **Cline**, and anything else that speaks MCP:\n\n```json\n{\n  \"mcpServers\": {\n    \"petstore\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agentify-openapi\", \"https://petstore3.swagger.io/api/v3/openapi.json\"]\n    }\n  }\n}\n```\n\nThe agent now has one tool per API operation. Calling a tool builds the HTTP request\n(path params, query string, headers, JSON body) and returns the live response.\n\n## Big API? Pick just the tools you need\n\nPointing at GitHub (1000+ operations) or Stripe (400+) would flood your agent with\nhundreds of tools and wreck its tool-selection accuracy. Filter down to what matters —\nby tag, HTTP method, or name glob — and cap the total:\n\n```bash\n# GitHub, read-only, just the repo endpoints\nnpx agentify-openapi https://api.github.com/openapi.json --tag repos --read-only\n\n# Stripe customer endpoints only, hard cap at 25 tools\nnpx agentify-openapi ./stripe.json --include \"*Customer*\" --max-tools 25\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"github-repos\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"agentify-openapi\", \"https://api.github.com/openapi.json\",\n               \"--tag\", \"repos\", \"--read-only\", \"--max-tools\", \"30\"],\n      \"env\": { \"AGENTIFY_BEARER_TOKEN\": \"ghp_your_token\" }\n    }\n  }\n}\n```\n\n`--read-only` (GET/HEAD/OPTIONS) is also a simple safety rail — expose a giant API to\nan agent without exposing anything that can mutate state.\n\n## Auth\n\nProvide credentials via environment variables — `agentify` reads the spec's declared\nsecurity scheme to find the right header name when it can:\n\n| Variable | Effect |\n|---|---|\n| `AGENTIFY_BEARER_TOKEN` | `Authorization: Bearer <token>` |\n| `AGENTIFY_BASIC_USER` / `AGENTIFY_BASIC_PASS` | HTTP basic auth |\n| `AGENTIFY_API_KEY` | API key (sent as a header by default) |\n| `AGENTIFY_API_KEY_HEADER` | Override the api-key header name |\n| `AGENTIFY_API_KEY_QUERY` | Send the api key as a query param instead |\n\nYou can also inject raw headers from the CLI: `--header \"X-Org-Id: 42\"` (repeatable).\n\n## CLI\n\n```\nagentify <spec-url-or-file> [options]\n\n  --base-url <url>     Override the API base URL from the spec\n  --header \"K: V\"      Add a raw header to every request (repeatable)\n  --name <name>        Override the MCP server name\n  --list               Print the discovered tools and exit (no server)\n  -h, --help           Show help\n\n  Tool selection (keep big APIs from flooding the agent's context):\n  --tag <tag>          Keep only operations with this tag (repeatable)\n  --exclude-tag <tag>  Drop operations with this tag (repeatable)\n  --method <verb>      Keep only this HTTP method, e.g. GET (repeatable)\n  --read-only          Shorthand: keep only GET/HEAD/OPTIONS operations\n  --include <glob>     Keep only tools matching this glob (repeatable)\n  --exclude <glob>     Drop tools matching this glob (repeatable)\n  --max-tools <n>      Hard cap on tool count (warns when it truncates)\n```\n\n## How it works\n\nA small, pure pipeline — each stage is independently unit-tested:\n\n```\nspec ──▶ operations ──▶ tool defs ──▶ http request ──▶ response\n │           │              │              │              │\nload &    one tool       JSON Schema   path/query/    fetch + surface\nderef     per op         for inputs    header/body    status & body\n$refs                                  + auth\n```\n\nOnly the HTTP execution and MCP transport touch the outside world; everything else is\ndeterministic and tested.\n\n## Programmatic use\n\n```ts\nimport { loadSpec, extractOperations, resolveBaseUrl, createServer } from \"agentify-openapi\";\n\nconst spec = await loadSpec(\"./openapi.yaml\");\nconst tools = extractOperations(spec);\nconst baseUrl = resolveBaseUrl(spec);\n// ...build your own MCP server, or just inspect the generated tool defs\n```\n\n## Limitations\n\n- JSON request/response bodies are first-class; `multipart`/form bodies are passed\n  through best-effort.\n- `cookie` parameters and OAuth2 flows are not yet handled (use `--header` for now).\n- One server per spec. Multi-spec aggregation is on the roadmap.\n\n## Development\n\n```bash\nnpm install\nnpm test          # vitest, 80%+ coverage enforced\nnpm run build     # tsc -> dist/\nnode scripts/smoke.mjs   # end-to-end MCP client smoke test (network)\n```\n\n## License\n\nMIT\n",
  "bytes": 5795,
  "sha": "4b93a862147d1fa5dbf5a2bb24471fc686193f7ab95dad0d31d09bfa3288ed3d",
  "repo_slug": "sani-savaliya/agentify",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sani_savaliya_agentify_753787da/readme"
}