klanex

io.github.chrassyPublished by GitHub account chrassyv0.1.0Updated Nov 2, 2026

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

VerifiedStreamable HTTPWeb executableCloud & InfrastructureDeveloper Tools

Overview

AI-generated overview

klanex is an async execution layer that lets an assistant submit third-party API calls with schema gating, retries, idempotency, approval gates and an audit…

What you can do
  • Submit HTTP calls to third-party APIs for reliable async execution, optionally gated by a JSON Schema and with idempotency keys, retries and approval pauses
  • Check an execution's status, attempts, target response or classified error, and list executions filtered by status or time range
  • Replay a finished execution byte-exact with the same payload and sealed credentials
  • Report plan and current-month execution usage and quota
  • List stored credential connections so a call can reference a connection ID instead of raw headers
When to use it
Useful when an assistant must call external APIs where transient failures, rate limits, duplicate submits or hallucinated payloads are a real risk, or when credentials should stay out of the model context. Also handy for destructive calls that need a human approval step.
Requirements
Either the hosted HTTP endpoint or the local npm package klanex-mcp run via npx for stdio-only clients. A klanex API key is required, passed as the X-API-Key header or the KLANEX_API_KEY environment variable; free sandbox keys starting with klx_test_ route to the sandbox endpoint. Network access to klanexai.com is needed.
Before you install
The API key is a secret and grants access to the account's executions and stored credential connections. Executions perform real HTTP calls to third-party APIs, which can change or delete data on those services; use requires_approval for destructive actions and idempotency keys to avoid duplicates. Payloads and target responses pass through klanex's servers, and usage beyond the plan may incur overage if allowed.

Installation

In SourceWeft

  1. Open klanex in the dashboard and add it to a workspace.
  2. Connect X-API-Key credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.chrassy%2Fklanex/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

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

Source: README.md at commit 10bfb81

Tools

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.

Parametersurlrequiredmethodheaderspayloadseal_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.

Parametersexecution_idrequired

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.

Takes no parameters.

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.

Takes no parameters.

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.

Parameterslimitsinceuntilcursorstatus

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).

Parametersexecution_idrequired

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts