Agentify

io.github.sani-savaliya由 GitHub 帳號 sani-savaliya 發布v0.1.1更新於 Oct 25, 2026

Turn any OpenAPI/Swagger spec into an MCP server - every API operation becomes an agent tool.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

Agentify 把任何 OpenAPI 或 Swagger 規格轉成本地 MCP 伺服器,讓每個 API 操作都成為助理可呼叫的工具。

可以做什麼
從網址或本機檔案載入 OpenAPI 3.x 或 Swagger 2.0 規格,把找到的每個 API 操作列為一個工具,不必寫程式碼或自行架站。呼叫這些工具會組出並送出真實 HTTP 請求,支援路徑、查詢、標頭與 JSON 請求內容參數,並回傳回應狀態與內容。可依標籤、HTTP 方法、名稱萬用字元或工具數量上限篩選要曝露的工具,也可限制為唯讀方法。透過環境變數提供 bearer、basic 或 API key 驗證憑證,也能從命令列注入原始標頭。
適用情境
當你想讓助理操作的 API 已發布 OpenAPI 或 Swagger 文件,且希望不必手寫整合就能呼叫其操作時使用。適合規格龐大、只需篩選少數相關端點的情況,以及對 API 的唯讀探索。
執行需求
透過 npx 從 npm 套件 agentify-openapi 以 stdio 在本機執行,需要 Node.js。需要規格網址或檔案路徑,以及連線目標 API 的網路。選用憑證透過 AGENTIFY_BEARER_TOKEN、AGENTIFY_BASIC_USER 與 AGENTIFY_BASIC_PASS,或 AGENTIFY_API_KEY 搭配 AGENTIFY_API_KEY_HEADER 或 AGENTIFY_API_KEY_QUERY 提供。
安裝前請注意
工具會向上游 API 送出真實 HTTP 請求,非唯讀操作可能新增、修改或刪除資料,建議用唯讀選項限制曝露範圍。憑證透過 AGENTIFY_BEARER_TOKEN、AGENTIFY_BASIC_PASS、AGENTIFY_API_KEY 等環境變數傳遞,還可注入原始標頭,請勿放入共用設定。不支援 cookie 參數與 OAuth2 流程,multipart 或表單請求內容僅盡力處理。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agentify,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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.

bash
npx agentify-openapi https://petstore3.swagger.io/api/v3/openapi.json --list
Swagger Petstore - OpenAPI 3.0 v1.0.27Base URL: https://petstore3.swagger.io/api/v3Tools: 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:

json
{  "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:

bash
# GitHub, read-only, just the repo endpointsnpx agentify-openapi https://api.github.com/openapi.json --tag repos --read-only
# Stripe customer endpoints only, hard cap at 25 toolsnpx agentify-openapi ./stripe.json --include "*Customer*" --max-tools 25
json
{  "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:

VariableEffect
AGENTIFY_BEARER_TOKENAuthorization: Bearer <token>
AGENTIFY_BASIC_USER / AGENTIFY_BASIC_PASSHTTP basic auth
AGENTIFY_API_KEYAPI key (sent as a header by default)
AGENTIFY_API_KEY_HEADEROverride the api-key header name
AGENTIFY_API_KEY_QUERYSend 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 + surfacederef     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

ts
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.
  • 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

bash
npm installnpm test          # vitest, 80%+ coverage enforcednpm run build     # tsc -> dist/node scripts/smoke.mjs   # end-to-end MCP client smoke test (network)

License

MIT

來源:README.md,提交 2adbbdf

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。