
OpenAPI Swagger MCP
io.github.nhan7777由 GitHub 账号 nhan7777 发布v0.1.5更新于 Nov 3, 2026
通过11个固定工具发现、预览、调用和检查已配置的Swagger/OpenAPI API。
AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。
原文描述
Discover, preview, call, and inspect configured Swagger/OpenAPI APIs through 11 fixed tools.
概览
OpenAPI Swagger 的本地 MCP 服务;无需登录;STDIO。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
安装
在 SourceWeft 中
- 打开 控制台中的 OpenAPI Swagger MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🔌 openapi-swagger-mcp
[npm version] [Node.js] [License: MIT]
Connect your AI coding agent to any Swagger 2.0 or OpenAPI 3.0 / 3.1 service from your local machine.
Most OpenAPI-to-MCP bridges generate one tool per endpoint. That works on a 10-route pet store and falls apart on a 400-route backend. openapi-swagger-mcp takes a different approach: it gives the agent 11 fixed tools to search specs, read schemas, dry-run requests, handle auth, and make real HTTP calls, no matter how many endpoints your API has.
🔎 See what your agent actually sent
Chat summaries only tell you what the model thinks happened. When an agent chains five API calls, refreshes a token, and hits a 422, you want to see the real traffic.
The built-in Local Request Inspector opens a read-only web UI on 127.0.0.1 for your active MCP session:
- 🕒 Live activity timeline: Every MCP tool call is paired with the HTTP requests, redirects, and login/refresh runs it triggered. Offline
preview_operationchecks show up clearly with zero network traffic. - 🧪 Side-by-side HTTP workbench: Check full URLs, query parameters, headers, cookies, request bodies, and formatted or hex responses. Secrets injected from your config stay masked by name.
- 📋 Schema checks & cURL export: Spot request or response fields that broke your OpenAPI contract, and copy a ready-to-run
curlcommand for any exchange.
⚡ Try the built-in demo in 30 seconds
Want to click around the Inspector and test the tools before wiring up your own API? Run demo as your MCP server command (requires Node.js 22.19+):
demo spins up a local mock backend on 127.0.0.1 (demo-shop and demo-account), turns on the Inspector, and serves MCP over stdio. Drop that command into your MCP client, then run the --inspector-url command printed on stderr in a local terminal to watch the agent work in your browser.
🚀 Quick start
1. Create an API config
Run init to generate a starter config.dev.yaml and a client snippet. It validates your inputs and never touches your editor's config files:
💡 Tip: Add
--bearer-env ORDERS_TOKENif your API expects a Bearer token.--clientacceptsgeneric,claude-desktop,claude-code,cursor,vscode,windsurf,cline,codex,omp, orkiro.
Prefer writing YAML by hand? Create config.dev.yaml:
2. Check the config
--check validates syntax, environment variables, and local file paths offline ("ok": true, exit 0). To also fetch and validate your OpenAPI specs over the network, use --check-specs.
3. Register the server in your MCP client
Add this stdio entry to your MCP client config using the absolute path to config.dev.yaml (leave --check out of args):
Need the exact config file path or CLI command for Claude Desktop, Claude Code, Cursor, VS Code / GitHub Copilot, Windsurf, Cline, Codex CLI, OMP, or Kiro? See the 🛠️ MCP Client Setup Guide.
4. Send a first prompt & open the Inspector
Reconnect the MCP server in your client and start with a safe, read-only prompt:
List the configured APIs, check whether the
ordersspec loaded, and showsession.sessionIdandsession.inspector.statewithout calling any API endpoints.
Next, ask the agent to look up an endpoint and dry-run a request:
Find the order details endpoint in
orders, show its required parameters, and preview a request for IDdemo-123without sending it.
If inspector.enabled is true, open the browser UI from your own terminal using the sessionId from list_apis:
🔒 Keep the Inspector URL private: The
#t=...fragment at the end of the URL is your local access token. Run--inspector-urlin your own terminal and open it directly in a browser, not inside the AI chat. See the 🔎 Inspector Guide.
🧭 How a typical session flows
- 🔍 Discover:
list_apisandsearch_operationslocate the right endpoint and current specrevision. - 📐 Read the contract:
get_operation_schemareturns parameters, request body shape, auth requirements, and response schemas. - 🧪 Dry-run:
preview_operationbuilds and validates the request locally (sent: false) without touching the network. - 🚀 Call:
invoke_operationsends the real HTTP request (keeping intentional bad inputs intact for negative testing) and checks the response against the spec. - 🔎 Audit: Open the Inspector to review every tool call, HTTP exchange, auth run, and payload.
⚠️ Two rules to keep in mind
- Point at non-production environments (local, test, or staging).
invoke_operationsends realPOST,PUT,PATCH, andDELETErequests with no undo button. Keep your MCP client's tool confirmation prompts enabled.- Know what reaches your LLM provider. This server runs locally over
stdiowith zero telemetry. However, any tool output your assistant reads is sent by your MCP client to your model provider. Load credentials withfromEnvorfromFileinstead of pasting tokens into chat.
🧰 The 11 fixed tools
📚 Documentation
📦 Alternative installs & package details
- Global install:
npm install -g @nhan7777/[email protected](binary:openapi-swagger-mcp). Always include the@nhan7777/scope; the unscopedopenapi-swagger-mcppackage on npm is a different project. - Official MCP Registry: Published as
io.github.nhan7777/openapi-swagger-mcpon the Official MCP Registry. Everything runs locally on your machine; never upload private configs or tokens to third-party web hosts. - License: MIT. Third-party notices are in THIRD_PARTY_NOTICES.md.
来源:README.md,提交 3f22ca7
工具
0版本历史
4- v0.1.5最新Nov 3, 2026
- v0.1.4Oct 29, 2026
- v0.1.2Oct 21, 2026
- v0.1.1Oct 21, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分