io.github.sani-savaliya/agentify
Turn any OpenAPI/Swagger spec into an MCP server - every API operation becomes an agent tool.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
agentify-openapiclaude mcp add agentify -e 'AGENTIFY_BEARER_TOKEN=<your agentify_bearer_token>' -e 'AGENTIFY_API_KEY=<your agentify_api_key>' -e 'AGENTIFY_API_KEY_HEADER=<AGENTIFY_API_KEY_HEADER>' -e 'AGENTIFY_API_KEY_QUERY=<AGENTIFY_API_KEY_QUERY>' -e 'AGENTIFY_BASIC_USER=<AGENTIFY_BASIC_USER>' -e 'AGENTIFY_BASIC_PASS=<your agentify_basic_pass>' -- npx -y agentify-openapi@0.1.1 '<openapi_spec_url>'
{
"mcpServers": {
"agentify": {
"command": "npx",
"args": [
"-y",
"agentify-openapi@0.1.1",
"<openapi_spec_url>"
],
"env": {
"AGENTIFY_BEARER_TOKEN": "<your agentify_bearer_token>",
"AGENTIFY_API_KEY": "<your agentify_api_key>",
"AGENTIFY_API_KEY_HEADER": "<AGENTIFY_API_KEY_HEADER>",
"AGENTIFY_API_KEY_QUERY": "<AGENTIFY_API_KEY_QUERY>",
"AGENTIFY_BASIC_USER": "<AGENTIFY_BASIC_USER>",
"AGENTIFY_BASIC_PASS": "<your agentify_basic_pass>"
}
}
}
}
Variables d'environnement
AGENTIFY_BEARER_TOKENsecret Optional. Sent to the upstream API as 'Authorization: Bearer <token>'.AGENTIFY_API_KEYsecret Optional API key for the upstream API. Sent as a header (name auto-discovered from the spec's security schemes, default X-API-Key).AGENTIFY_API_KEY_HEADEROptional. Override the header name used for AGENTIFY_API_KEY.AGENTIFY_API_KEY_QUERYOptional. Send AGENTIFY_API_KEY as this query parameter instead of a header.AGENTIFY_BASIC_USEROptional HTTP basic auth username (pair with AGENTIFY_BASIC_PASS).AGENTIFY_BASIC_PASSsecret Optional HTTP basic auth password (pair with AGENTIFY_BASIC_USER).
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
agentify
Turn any OpenAPI / Swagger spec into an agent-ready MCP server.
Listed on the official MCP Registry (io.github.sani-savaliya/agentify) and Smithery.
Point it at a spec — a URL, a file, OpenAPI 3.x or Swagger 2.0 — and every operation becomes a tool an AI agent can call. No code generation, no per-API boilerplate, no hosting. One command.
npx agentify-openapi https://petstore3.swagger.io/api/v3/openapi.json --list
Swagger Petstore - OpenAPI 3.0 v1.0.27
Base URL: https://petstore3.swagger.io/api/v3
Tools: 19
getPetById
Find pet by ID.
findPetsByStatus
Finds Pets by status.
...
Why
"Today, agents have to operate software designed for humans. The interfaces of the future will be built for agents — APIs, MCPs, CLIs — with agents as first-class citizens." — YC RFS: Software for Agents
There are tens of thousands of APIs that already describe themselves with an OpenAPI
document. agentify makes every one of them agent-native, instantly, without anyone
hand-writing an integration.
Use it with Claude, Cursor, Windsurf — any MCP client
Add it to your client's MCP config. The same command/args shape works in
Claude Desktop, Claude Code (claude mcp add), Cursor
(.cursor/mcp.json), Windsurf, Cline, and anything else that speaks MCP:
{
"mcpServers": {
"petstore": {
"command": "npx",
"args": ["-y", "agentify-openapi", "https://petstore3.swagger.io/api/v3/openapi.json"]
}
}
}
The agent now has one tool per API operation. Calling a tool builds the HTTP request (path params, query string, headers, JSON body) and returns the live response.
Big API? Pick just the tools you need
Pointing at GitHub (1000+ operations) or Stripe (400+) would flood your agent with hundreds of tools and wreck its tool-selection accuracy. Filter down to what matters — by tag, HTTP method, or name glob — and cap the total:
# GitHub, read-only, just the repo endpoints
npx agentify-openapi https://api.github.com/openapi.json --tag repos --read-only
# Stripe customer endpoints only, hard cap at 25 tools
npx agentify-openapi ./stripe.json --include "*Customer*" --max-tools 25
{
"mcpServers": {
"github-repos": {
"command": "npx",
"args": ["-y", "agentify-openapi", "https://api.github.com/openapi.json",
"--tag", "repos", "--read-only", "--max-tools", "30"],
"env": { "AGENTIFY_BEARER_TOKEN": "ghp_your_token" }
}
}
}
--read-only (GET/HEAD/OPTIONS) is also a simple safety rail — expose a giant API to
an agent without exposing anything that can mutate state.
Auth
Provide credentials via environment variables — agentify reads the spec's declared
security scheme to find the right header name when it can:
| Variable | Effect |
|---|---|
AGENTIFY_BEARER_TOKEN | Authorization: Bearer <token> |
AGENTIFY_BASIC_USER / AGENTIFY_BASIC_PASS | HTTP basic auth |
AGENTIFY_API_KEY | API key (sent as a header by default) |
AGENTIFY_API_KEY_HEADER | Override the api-key header name |
AGENTIFY_API_KEY_QUERY | Send the api key as a query param instead |
You can also inject raw headers from the CLI: --header "X-Org-Id: 42" (repeatable).
CLI
agentify <spec-url-or-file> [options]
--base-url <url> Override the API base URL from the spec
--header "K: V" Add a raw header to every request (repeatable)
--name <name> Override the MCP server name
--list Print the discovered tools and exit (no server)
-h, --help Show help
Tool selection (keep big APIs from flooding the agent's context):
--tag <tag> Keep only operations with this tag (repeatable)
--exclude-tag <tag> Drop operations with this tag (repeatable)
--method <verb> Keep only this HTTP method, e.g. GET (repeatable)
--read-only Shorthand: keep only GET/HEAD/OPTIONS operations
--include <glob> Keep only tools matching this glob (repeatable)
--exclude <glob> Drop tools matching this glob (repeatable)
--max-tools <n> Hard cap on tool count (warns when it truncates)
How it works
A small, pure pipeline — each stage is independently unit-tested:
spec ──▶ operations ──▶ tool defs ──▶ http request ──▶ response
│ │ │ │ │
load & one tool JSON Schema path/query/ fetch + surface
deref per op for inputs header/body status & body
$refs + auth
Only the HTTP execution and MCP transport touch the outside world; everything else is deterministic and tested.
Programmatic use
import { loadSpec, extractOperations, resolveBaseUrl, createServer } from "agentify-openapi";
const spec = await loadSpec("./openapi.yaml");
const tools = extractOperations(spec);
const baseUrl = resolveBaseUrl(spec);
// ...build your own MCP server, or just inspect the generated tool defs
Limitations
- JSON request/response bodies are first-class;
multipart/form bodies are passed through best-effort. cookieparameters and OAuth2 flows are not yet handled (use--headerfor now).- One server per spec. Multi-spec aggregation is on the roadmap.
Development
npm install
npm test # vitest, 80%+ coverage enforced
npm run build # tsc -> dist/
node scripts/smoke.mjs # end-to-end MCP client smoke test (network)
License
MIT
Questions fréquentes
Qu'est-ce que io.github.sani-savaliya/agentify ?
Turn any OpenAPI/Swagger spec into an MCP server - every API operation becomes an agent tool.
Comment installer io.github.sani-savaliya/agentify ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add agentify -e 'AGENTIFY_BEARER_TOKEN=<your agentify_bearer_token>' -e 'AGENTIFY_API_KEY=<your agentify_api_key>' -e 'AGENTIFY_API_KEY_HEADER=<AGENTIFY_API_KEY_HEADER>' -e 'AGENTIFY_API_KEY_QUERY=<AGENTIFY_API_KEY_QUERY>' -e 'AGENTIFY_BASIC_USER=<AGENTIFY_BASIC_USER>' -e 'AGENTIFY_BASIC_PASS=<your agentify_basic_pass>' -- npx -y agentify-openapi@0.1.1 '<openapi_spec_url>'. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.sani-savaliya/agentify ?
Oui. Il attend AGENTIFY_BEARER_TOKEN, AGENTIFY_API_KEY, AGENTIFY_BASIC_PASS, à renseigner dans sa configuration.
io.github.sani-savaliya/agentify est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient io.github.sani-savaliya/agentify ?
Il est publié par sani-savaliya. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.