@klappay/mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KLAP_ENV | No | test or live, exactly. Anything else refuses to start. | test |
| KLAP_API_KEY | No | Use this key instead of ~/.klap/config.json. Requires KLAP_BASE_URL. Its prefix must match KLAP_ENV. | |
| KLAP_BASE_URL | No | Required with KLAP_API_KEY. With a stored key it must equal the stored baseUrl. | |
| KLAP_MCP_ALLOW_LIVE_WRITES | No | Set to exactly 1 to register charges_create, charges_check and webhooks_retry_delivery in live. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Klap Core API (localhost), environment: test. This is the TEST environment: sandbox data and no real funds. Read tools, charges_create, charges_check, webhooks_retry_delivery and sandbox_trigger are available. Moving money out of a charge (escrow release/refund) and managing webhook endpoints or payout recipients are not available through this server.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| klap_statusA | Show which Klap environment (test or live) and API host this server is connected to. Makes no API call. |
| charges_getA | Fetch one charge by id: status, settlement status, amounts, accepted payment pairs, split recipients and timestamps. |
| charges_listA | List this environment's charges, newest first, optionally filtered by status, paid token/network, creation time (since) or isOverpaid. Paginate with limit and the previous page's nextCursor. |
| charges_timelineA | List the lifecycle events of one charge in order (created, transfers detected, confirmed, settled, ...). |
| charges_createA | Create a new test charge. Escrow charges and redirectUrl are not available through this server. Pass idempotencyKey to make a retry safe; without it every call creates a new charge. |
| charges_checkA | Ask the API to re-check a charge's payment on-chain now instead of waiting for the background pass. Optionally pass txHash together with network to verify one specific transaction. Never credits anything that is not really on-chain. |
| charges_prepare_releaseA | Show the exact Safe transaction an escrow release of this charge would execute: destination, token, amount in base units, chain id, Safe nonce, safeTxHash and the EIP-712 typedData the escrow releaser must sign. Read-only: it signs and submits nothing, and the release itself is not available through this server. Valid only while the escrow's balance is unchanged. |
| charges_prepare_refundA | Show the exact Safe transaction an escrow refund of this charge would execute: destination, token, amount in base units, chain id, Safe nonce, safeTxHash and the EIP-712 typedData the escrow releaser must sign. Read-only: it signs and submits nothing, and the refund itself is not available through this server. Valid only while the escrow's balance is unchanged. |
| webhooks_listA | List webhook endpoints and the events they subscribe to. Endpoint URLs are shown as origin + path only (credentials and query strings removed); secrets are never returned, only their display hint. |
| webhooks_list_deliveriesA | List one webhook's delivery attempts (event, status, attempts, response code), newest first. Paginate with limit and the previous page's nextCursor. |
| webhooks_retry_deliveryA | Re-send one past webhook delivery to its endpoint now. The receiving system will process the event again. |
| networks_getA | List the (token, network) payment pairs this environment accepts right now — the same list charges_create validates acceptedPayments against. |
| metrics_queryA | Run an aggregate query over this environment's charges, transactions or distributions (counts, sums, grouped by date bucket or dimension). |
| sandbox_triggerA | Push a test charge into a payment state (confirmed, partially paid, overpaid, expired, underpaid, settled, settlement failed) without moving funds, and fire the matching webhook. Test environment only. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Each tool maps to a distinct resource and action: charges get/list/timeline/check/create, webhook list/deliveries/retry, escrow prepare release vs refund, plus networks, metrics, sandbox, and environment status. The read-only prepare tools are clearly separated from execution and from charge inspection, so an agent can select reliably.
Most tool names follow a predictable resource_action snake_case pattern (charges_get, webhooks_list_deliveries, networks_get, metrics_query). The main deviation is klap_status, which breaks the resource-prefix convention but remains readable and clearly scoped.
Fourteen tools is well within the appropriate range for a payment operations server. Each tool covers a meaningful operation across charges, webhooks, networks, metrics, sandbox testing, and environment status, with little apparent redundancy.
The surface covers charge inspection, test charge creation, webhook delivery inspection/retry, network discovery, metrics, and sandbox simulation. However, notable lifecycle gaps remain: webhook endpoints cannot be created/updated/deleted, and escrow release/refund can only be prepared, not executed, creating dead ends for those workflows.