Agents and harnesses

Claude Desktop

Connect Claude Desktop to Abazi through the mcp-remote bridge, check the six tools, and ask Claude to find a service and buy it under the owner's mandate.

View as .mdUpdated

Claude Desktop starts MCP servers as local processes over stdio. Abazi's MCP server runs over streamable HTTP, so the configuration starts mcp-remote, a small bridge that forwards stdio to https://api.52-28-238-205.sslip.io/mcp and adds the agent's credential as a Bearer header on every request.

Before you start

You needWhy
An agent credential (agk_test_...)Created in the Console under Agents > New agent. Shown once. Replace YOUR_AGENT_KEY with it. See Get an agent credential.
A signed mandate for that agentWithout one every purchase is denied with MANDATE_MISSING.
Claude DesktopOn macOS or Windows.
Node.jsClaude Desktop runs the bridge with npx, which ships with Node.js.

Connect

Edit the configuration file

In Claude Desktop, open Settings > Developer > Edit Config, or open the file directly:

SystemFile
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json

Add the abazi server. If the file already has an mcpServers object, add abazi inside it.

claude_desktop_config.json
{
  "mcpServers": {
    "abazi": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.52-28-238-205.sslip.io/mcp",
        "--header",
        "Authorization:Bearer ${ABAZI_AGENT_KEY}"
      ],
      "env": {
        "ABAZI_AGENT_KEY": "YOUR_AGENT_KEY"
      }
    }
  }
}

mcp-remote replaces ${ABAZI_AGENT_KEY} with the value from env. The header has no space after the colon on purpose: some systems split arguments at spaces, and Authorization:Bearer survives that intact.

Restart Claude Desktop

Quit Claude Desktop completely and open it again. It reads the file only at start.

Verify

Open a new chat and look at the tools menu in the message box. abazi is listed with six tools: search_catalog, request_purchase, request_installment_purchase, get_purchase_status, get_spending_status and get_receipt.

Ask for a search. Searching spends nothing.

Prompt
Search the Abazi catalog for "forecast" and list the services with their prices.

Claude calls search_catalog and gets back services with a service_id, the merchant and its trust tier, a price in base units (50000 is 0.05 USDC), the asset and the networks.

First purchase

Prompt
Search the catalog for forecast and buy it for Tbilisi. Then show me the receipt.

Claude Desktop asks you to allow each tool call the first time. Claude then calls request_purchase with the service_id, a task_id and a fresh idempotency_key, and reads the result.

ALLOW

status is paid, with decision: "ALLOW", the resource and a receipt_id. Claude calls get_receipt and shows the signed receipt with its public verification link. If status is submitted, the payment is still settling and Claude polls get_purchase_status after poll_after_ms.

REQUIRE_APPROVAL

status is awaiting_approval, with a reason such as ABOVE_AUTO_THRESHOLD, FIRST_PURCHASE or UNKNOWN_MERCHANT_LIMIT. Abazi sends the approval link to the owner's approvers; Claude never sees it. Claude keeps the same intent_id and polls get_purchase_status. The link expires after 10 minutes. See Approve on a phone.

DENY

The tool returns an error result with error_code: "POLICY_DENIED", a reason_code such as HARD_CAP_EXCEEDED or BUDGET_EXCEEDED, retryable and next_action. Claude reports the reason. A denial is final for that purchase.

Troubleshooting

SymptomCause and fix
Tool calls fail with AGENT_CREDENTIAL_INVALIDThe credential in env is wrong, rotated or revoked (AGENT_CREDENTIAL_INVALID). Paste the new one and restart. The tool list still loads with a bad key; only the calls fail.
abazi is not in the tools menuCheck the file is valid JSON, that npx runs in a terminal, and that the URL ends in /mcp. Claude Desktop writes MCP logs next to its configuration (on macOS, ~/Library/Logs/Claude/). Restart after every change.
The purchase stays awaiting_approvalA person has not decided yet. Keep polling the same intent_id; do not start a new purchase.
IDEMPOTENCY_CONFLICTThe same idempotency_key was sent with a different request. Use a new key for a different purchase.

Next steps

On this page