klanex

io.github.chrassy由 GitHub 帳號 chrassy 發布v0.1.0更新於 Nov 2, 2026

Reliable async execution for agent tool calls: schema gating, retries, idempotency, audit trail.

已驗證Streamable HTTP可網頁執行雲端與基礎設施開發者工具

概覽

AI 產生的概覽

klanex 是非同步執行層,讓助理提交第三方 API 呼叫,並提供 schema 驗證、重試、冪等、審批關卡與稽核紀錄。

可以做什麼
  • 提交對第三方 API 的 HTTP 呼叫以進行可靠的非同步執行,可選擇以 JSON Schema 驗證,並支援冪等鍵、重試與審批暫停
  • 查詢執行的狀態、嘗試次數、目標回應或分類錯誤,並依狀態或時間範圍列出執行紀錄
  • 以位元組完全一致的方式重播已結束的執行,沿用原始酬載與已封存的憑證
  • 回報方案與當月執行用量及配額
  • 列出已儲存的憑證連線,讓呼叫可引用連線 ID 而不必傳入原始標頭
適用情境
當助理需要呼叫外部 API,且暫時性故障、速率限制、重複提交或模型虛構的酬載構成實際風險時適用;也適合希望憑證不進入模型上下文的場景,以及需要人工審批的破壞性呼叫。
執行需求
可使用託管的 HTTP 端點,或對僅支援 stdio 的用戶端透過 npx 執行本機 npm 套件 klanex-mcp。需要 klanex API 金鑰,透過 X-API-Key 標頭或 KLANEX_API_KEY 環境變數傳入;以 klx_test_ 開頭的免費沙箱金鑰會自動導向沙箱端點。需要連線至 klanexai.com 的網路存取。
安裝前請注意
API 金鑰屬於機密,可存取該帳戶的執行紀錄與已儲存的憑證連線。執行會向第三方 API 發出真實 HTTP 呼叫,可能變更或刪除這些服務上的資料;破壞性操作應使用 requires_approval,並以冪等鍵避免重複。酬載與目標回應會經過 klanex 的伺服器,超出方案的用量若被允許可能產生額外費用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 klanex,將其新增到工作區。
  2. 連接 X-API-Key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.chrassy%2Fklanex/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "klanex": {
      "type": "http",
      "url": "https://api.klanexai.com/mcp",
      "headers": {
        "X-API-Key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

klanex MCP server

[npm] [MCP Marketplace]

Reliable execution for agent tool calls, as an MCP server.

klanex is an async execution layer between an agent's tool-use intents and real third-party APIs: it schema-gates hallucinated payloads before anything runs, absorbs rate limits and outages with retries/backoff/circuit breakers, encrypts credentials, keeps an audit trail, and reports back via signed webhooks. With this MCP server, an agent submits a call once — klanex makes sure it lands.

Failures come back written for the model: every error carries an llm_hint telling the agent exactly what to fix (or that klanex is already handling it), so agents self-correct instead of guessing.

Connect (hosted, recommended)

klanex's MCP server is hosted — no install needed if your client supports HTTP transports:

EndpointEnvironmentKeys
https://api.klanexai.com/mcpproductionklx_live_…
https://api.sandbox.klanexai.com/mcpsandbox (free to try)klx_test_…

Get an API key at klanexai.com — sandbox keys are free.

Claude Code

bash
claude mcp add --transport http klanex https://api.klanexai.com/mcp \  --header "X-API-Key: klx_live_..."

Cursor / Windsurf / VS Code (mcp.json)

json
{  "mcpServers": {    "klanex": {      "url": "https://api.klanexai.com/mcp",      "headers": { "X-API-Key": "klx_live_..." }    }  }}

Authorization: Bearer klx_... works too, for clients that can only set that header.

Connect (stdio shim)

For clients that only speak stdio (e.g. Claude Desktop), this package proxies stdio to the hosted endpoint:

json
{  "mcpServers": {    "klanex": {      "command": "npx",      "args": ["-y", "klanex-mcp"],      "env": { "KLANEX_API_KEY": "klx_live_..." }    }  }}

The shim routes by key prefix — klx_test_… keys go to the sandbox automatically. Set KLANEX_MCP_URL to override.

Tools

ToolWhat it does
executeSubmit an HTTP call for reliable async execution: optional JSON Schema gate, retries/backoff/circuit breakers, idempotency keys, human approval gates, encrypted credentials. wait_seconds blocks up to 55s for the terminal result.
get_executionCurrent status, attempts, target response, or classified error for an execution.
list_executionsThe account's executions, filterable by status/time, paginated.
replay_executionRe-run a terminal execution byte-exact — outage recovery without re-prompting the LLM.
get_usagePlan and current-month usage/quota.
list_connectionsStored credential connections (token vault) to reference via connection_id — so secrets never pass through model context.

Why this beats calling APIs directly

  • Hallucinated payloads are rejected before they execute — pass payload_schema and mismatches return synchronously with a correction hint.
  • Transient failures are not the agent's problem — 429s, timeouts, and 5xxs are retried with backoff behind a circuit breaker; the agent does nothing.
  • A network blip can never double-execute a refund — idempotency_key makes submits safe to retry.
  • Destructive actions can wait for a human — requires_approval pauses execution for an approve/reject decision (API, dashboard, or Slack buttons).
  • Credentials stay out of model context — store them once as a connection; klanex injects them at execution time.

Full API docs: api.klanexai.com/docs

License

MIT

來源:README.md,提交 10bfb81

工具

6

execute

Submit an HTTP call to a third-party API for reliable asynchronous execution. klanex validates the payload (optionally against payload_schema), stores credentials encrypted, executes with automatic retries/backoff/circuit breakers, and keeps an audit trail — you submit once and never retry transient failures yourself. Call this instead of making a direct HTTP request whenever the call has side effects (payments, messages, tickets, writes) or the target may be flaky. Prefer connection_id over headers for credentials. Always set idempotency_key for side-effecting calls so resubmitting can never double-execute. Set wait_seconds to block for the result; otherwise poll get_execution with the returned execution_id.

輸入參數url必填methodheaderspayloadseal_urltimeout_msmax_attemptswait_secondsconnection_idpayload_schemaidempotency_keyrequires_approval

get_execution

Fetch the current state of an execution by ID: status (PENDING_APPROVAL|QUEUED|RUNNING|RETRYING|SUCCEEDED|FAILED), attempts, the target response on success, or a classified error on failure. Retryable failures need no action from you — klanex is still retrying. Header values always read back REDACTED.

輸入參數execution_id必填

get_usage

Report the account's plan and execution usage for the current calendar month: used, included_executions, remaining, and whether overage is allowed. Check this before large batches to avoid hitting a hard quota.

無需輸入參數。

list_connections

List the account's stored credential connections (token vault). Reference a ready connection by its ID in execute's connection_id instead of passing raw headers — the credential is injected at execution time and never passes through your context. Secrets are never returned.

無需輸入參數。

list_executions

List this account's executions, newest first, optionally filtered by status or a created_at time range. Returns next_cursor when a page is full; pass it back as cursor for the next page.

輸入參數limitsinceuntilcursorstatus

replay_execution

Re-run a terminal (SUCCEEDED or FAILED) execution as a brand-new execution: same target, byte-exact original payload, same sealed credentials, fresh attempt counter. This is the outage-recovery path — failed calls can be re-executed without regenerating the payload. Each call creates a new execution (deliberately not idempotent).

輸入參數execution_id必填

版本歷史

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

評分

已滿足適用檢查項的 100%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分