Sezzlee OpenAPI

io.github.sezzlee由 GitHub 帳號 sezzlee 發布v1.0.0更新於 Oct 30, 2026

Expose an OpenAPI document to agents as a search-first tool catalog over your existing API.

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

概覽

AI 產生的概覽

把 OpenAPI(Swagger 2.0 / OpenAPI 3.0–3.2)文件轉成以搜尋為先的工具目錄,讓助理找到並呼叫你既有的 API 操作。

可以做什麼
  • 搜尋由 OpenAPI 文件建立的 API 操作目錄
  • 載入某個操作成為工具,附上整理好的參數與說明
  • 透過網路呼叫後端操作並讀取回應
  • 讀取因超過大小上限而被暫存的結果
  • 依間隔或訊號重新載入文件並更新目錄
適用情境
適用於後端已發布 OpenAPI 文件但沒有整合嵌入式 SDK 的情況,希望助理透過受控目錄而非直接發 HTTP 請求來探索與呼叫其操作。也適合需要在設定檔中定義曝光範圍、命名與憑證規則的團隊。
執行需求
透過 npm 套件 @sezzlee/openapi-mcp 以 stdio 在本機執行(需要 Node.js,可用 npx 或全域安裝)。需設定環境變數 SEZZLEE_OPENAPI_CONFIG 指向 JSON 設定檔,其中指定 OpenAPI 來源(本機路徑或 http(s) 網址)與選擇規則。後端憑證在設定中以環境變數引用;需要能連線到後端的網路。
安裝前請注意
每次呼叫都會請求你的後端,並附上它從設定所指定環境變數解析出的憑證,這些密鑰會被代為使用。依你曝光的操作而定,它可能寫入、修改或刪除資料,建議維持預設的按需選擇並盡量縮小範圍。未設定權杖交換的 http 傳輸只能綁定回環位址,呼叫端的 MCP 權杖不會轉送給後端。可見性不等於權限控管:除非文件宣告 security 為空,目錄會把操作身分標示為未知。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@sezzlee/openapi-mcp

MCP server that exposes an OpenAPI (Swagger 2.0 / OpenAPI 3.0–3.2) document as sezzlee's search-first tool catalog — search_tools, load_tool, invoke_tool, read_result — over a remote backend, calling it with fetch.

Status: 1.0.0, stable. Install with npm install -g @sezzlee/openapi-mcp or run it with npx -y @sezzlee/openapi-mcp; the binary is sezzlee-openapi.

How this differs from the embedded SDK

The NestJS SDK sits inside your backend process: it discovers endpoints from your own controllers/routes and replay each MCP call through your existing pipeline, so your authentication and authorization run exactly as they do today.

openapi-mcp is a separate service. It has no access to a backend's process or pipeline — it reads the backend's OpenAPI document to learn what operations exist (the ingestion rules), and calls the backend over the network for every invocation, attaching a credential it resolves itself (how a credential is chosen and written). This is the only path for a backend that has no embedded SDK integrated into it.

Everything an embedded SDK declares in code, a document declares in one x-sezzlee extension per operation, and a host that cannot edit the document declares under operations in this config: selection, tool name, prefix, behaviour hints, argument curation, variants, families, search terms and revisions (the x-sezzlee extension). A backend that routes many capabilities through one endpoint (POST /Rest/InvokeDynamicMethod/{methodId}) lists them in that operation's x-sezzlee.family; each member becomes its own tool, with its own name, description and body, and the dispatch key stays hidden.

Quick start

The server reads its configuration from the file named by SEZZLEE_OPENAPI_CONFIG. Build the package first (this repository never runs @sezzlee/core's consumers against a stale dist):

bash
pnpm turbo run build --filter=@sezzlee/openapi-mcp

A minimal config — a local document, opt-in selection so at least one operation is exposed, default stdio transport:

json
{  "source": "./openapi.json",  "selection": { "default": "include" }}
bash
SEZZLEE_OPENAPI_CONFIG=/absolute/path/to/config.json node packages/servers/openapi-mcp/dist/cli.js

source is either a path (resolved relative to the config file's own directory) or an http(s):// URL. On startup the server ingests the document, builds the catalog, prints a one-line-per-diagnostic-code summary to stderr, and then serves stdio or listens for streamable HTTP, depending on transport.kind.

A config that fails validation, or that names an environment variable that is not set, stops the process with a message on stderr and exit code 2. A document that ingests with a fatal diagnostic, or a catalog with a fatal diagnostic (name_collision, invalid_name, ambiguous_selection, …), stops it with exit code 1.

Configuration

All keys below are read from the SEZZLEE_OPENAPI_CONFIG JSON file and validated with a zod schema (src/platform/config.ts) that rejects unknown keys.

KeyTypeDefaultNotes
transport.kind"stdio" | "http""stdio"—
transport.hoststring (http only)"127.0.0.1"Must stay loopback (127.0.0.1, ::1, localhost) unless tokenExchange is configured — see below
transport.portint, 0–65535 (http only)8787—
transport.pathstring starting with / (http only)"/mcp"—
transport.resourceurl (http only)requiredThe OAuth protected-resource identifier advertised at /.well-known/oauth-protected-resource
transport.authorizationServersarray of url, min 1 (http only)required—
transport.allowedHostnamesarray of string (http only)[]Extra Host header values accepted, on top of the localhost defaults
tokenExchangeobjectnot configuredRFC 8693 token exchange; required for an http transport to authenticate a caller (see Rules)
tokenExchange.tokenEndpointurlrequired—
tokenExchange.clientIdstringrequired—
tokenExchange.clientSecret{ fromEnv: string }required—
tokenExchange.clientAuth"basic" | "post""basic"client_secret_basic or client_secret_post
tokenExchange.audiencestringnot sent—
tokenExchange.resourceurlnot sent—
tokenExchange.scopestringnot sent—
tokenExchange.schemesarray of string, min 1requiredThe security scheme names the exchanged token satisfies
sourcestring, non-emptyrequiredA local file path (relative to the config file) or an http(s):// URL to the OpenAPI document
reload.intervalSecondsinteger ≥ 10not setRe-reads source this often, plus up to 10% jitter. Conditional on the last ETag/Last-Modified for an http(s) source; a body identical to the served one is ignored
reload.onSignalbooleantrueSIGHUP re-reads source. Without a reload block the document is read once at startup and SIGHUP keeps its default action
baseUrlurlnot setReplaces the document's root servers
serverVariablesrecord<string, string>not setOverrides for the document's server variable defaults
hoistPathPrefixstring starting with /not setA leading path segment moved from every route into the base URL
outputSchema"document" | "omit""document"omit for a backend whose responses do not match its document
requestBodyRequired"document" | "always""document"always treats an undeclared requestBody.required as true
strictbooleanfalseRaises openapi_document_invalid from a warning to a fatal diagnostic
selection.default"include" | "exclude""exclude"Whether an operation is exposed when no rule matches it (opt-in by default)
selection.rulesarray of { route?, method?, decision }[]route/method are matched the same way the embedded SDKs match a controller route
operationsrecord<operation key, x-sezzlee object>{}Laid over each operation's x-sezzlee field by field; a key that names no operation is fatal. A field here may not also be set through names, searchTerms or revision.operations
namesrecord<operation key, string>{}Overrides a tool's name; the value must match ^[a-z][a-z0-9_]{0,255}$
revision.cataloginteger ≥ 1not configuredBehaviour revision of every tool; comes before the document root's x-sezzlee revision
revision.pathsrecord<document path, integer ≥ 1>{}Behaviour revision of every operation under that path item; comes before the path item's x-sezzlee revision
revision.operationsrecord<operation key, integer ≥ 1>{}Behaviour revision of one operation; comes before its x-sezzlee revision. The levels add up rather than replacing one another
credentialsrecord<security scheme name, credential>{}Either { "value": { "fromEnv": "..." } } or { "username": { "fromEnv": "..." }, "password": { "fromEnv": "..." } }; see credentials.md
allowHostsarray of string[]Hosts a backend operation may be served from, beyond the document's own root server
refHostsarray of string[]Hosts an external $ref may be fetched from, beyond the document's own host. Kept apart from allowHosts, so allowing a schema host never lets calls or credentials go there
identityCookiesarray of string[]Cookie names treated as identity carriers on top of the default deny-list (compared case-insensitively); they extend it and never replace it
limits.timeoutMspositive int30000Per-invocation deadline
limits.maxResponseBytespositive int262144The largest answer that reaches the agent; a larger success is stored for read_result while results.enabled holds, and refused otherwise
limits.maxBufferedBytespositive int16777216The largest backend body read, applied while the body streams; a larger one is refused unread
results.enabledbooleantrueKeeps over-budget successes in memory and publishes read_result; see result-reading.md
results.lifetimeMsint ≥ 1000600000How long a stored result is kept
results.maxCallerBytespositive int16777216What one caller's stored results may hold; the oldest go first. A caller is the bearer token it authenticated with, or every loopback caller when there is no token exchange
results.maxBytespositive int67108864What all stored results may hold; at least results.maxCallerBytes
limits.maxInlineFileBytespositive int1048576—

A credentials entry is keyed by the security scheme name it satisfies; a tokenExchange.schemes entry marks that same scheme as satisfied by the exchanged token instead. credentials values are never inlined — only a reference to an environment variable — so a config file can be committed and shared.

Rules

  • Only src/net/fetch.ts reaches the network. It is the one place the host allowlist, the manual redirect handling and the byte cap are applied; src/transport/http.ts may use node:http only to listen, never to call out. Redirects are never followed — a followed redirect could carry a request, and its credential, to a host the allowlist never approved.
  • Only src/platform/files.ts touches the filesystem. A file the document references through an external $ref, or named by source, is checked against the directory the document was read from on its realpath, so neither a ../ segment nor a symbolic link can escape it.
  • The caller's MCP token is never forwarded to the backend. Its audience is this server, not the backend; forwarding it would bypass the backend's own audience check. On the http transport with tokenExchange configured, the caller's token is exchanged (RFC 8693) for a backend-scoped token at the transport's bearer gate, and only the exchanged token reaches invoke_tool.
  • An http transport without tokenExchange authenticates no caller, so it may only bind a loopback host (127.0.0.1, ::1, localhost); otherwise the operator's static credentials would be reachable from the network. Configuring tokenExchange on the stdio transport is likewise refused (token_exchange_requires_http) — there is no caller token on stdio to exchange.
  • A reload never widens egress. reload re-reads only the document, never the config, and the hosts the first catalog may call are the ceiling for every later one: a document whose servers move to a host outside it, from https to plain http, or that sends a credential to a plain-http origin that did not carry it before, is refused (widens_egress). A refused document, one with a fatal diagnostic, or one that cannot be read keeps the running catalog. A committed reload advances the catalog generation stamped on every meta-tool and sends tools/list_changed. A tool loaded before a reload answers unknown_tool if it is gone and tool_changed to a call pinned to its old version.
  • Visibility is not enforcement: an operation's security says which credential a call needs, not which caller may make it, so the catalog reports every operation's identity as unknown unless its document says security: [].

Development

bash
pnpm turbo run build --filter=@sezzlee/openapi-mcppnpm turbo run lint --filter=@sezzlee/openapi-mcppnpm turbo run check-types --filter=@sezzlee/openapi-mcppnpm turbo run test --filter=@sezzlee/openapi-mcp

Run these through Turbo, not pnpm --filter @sezzlee/openapi-mcp <task> — the bare filter skips dependsOn: ["build"] and the test task would run against a stale dist.

test/ holds unit suites that need no environment variables, plus one gated suite:

  • acceptance.spec.ts — skipped unless SEZZLEE_OPENAPI_ACCEPTANCE_DOC names a path to a real backend's OpenAPI document. The document itself never enters the repository; the suite ingests it, builds a catalog, asserts there is no fatal diagnostic, and prints the diagnostic summary instead of pinning a snapshot that would copy that backend's surface into the tree. SEZZLEE_OPENAPI_ACCEPTANCE_DOC is declared in this package's turbo.json test task so Turbo passes it through.

來源:packages/servers/openapi-mcp/README.md,提交 0426373

工具

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

版本歷史

3
  1. v1.0.0最新Oct 15, 2026
  2. v0.2.3Oct 12, 2026
  3. v0.2.1Oct 11, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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