agentify

agentify

Turn any OpenAPI / Swagger spec into an agent-ready MCP server.

Category
访问服务器

README

agentify

Turn any OpenAPI / Swagger spec into an agent-ready MCP server.

npm 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 / any MCP client

Add to your MCP client config (e.g. Claude Desktop / Claude Code):

{
  "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.

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

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 (v0.1)

  • JSON request/response bodies are first-class; multipart/form bodies are passed through best-effort.
  • cookie parameters and OAuth2 flows are not yet handled (use --header for 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选