Cursor
Add Abazi's MCP server to Cursor with one mcp.json entry, check the six tools in Cursor's settings, and let the agent search the catalog and buy under the owner's mandate.
Cursor connects to remote MCP servers over streamable HTTP. One entry in mcp.json points it at https://api.52-28-238-205.sslip.io/mcp with the agent's credential in an Authorization header. Cursor's agent then sees Abazi's six tools.
Before you start
| You need | Why |
|---|---|
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 agent | Without one every purchase is denied with MANDATE_MISSING. |
| Cursor | With agent mode. |
Connect
Cursor reads MCP servers from two places:
| File | Scope |
|---|---|
~/.cursor/mcp.json | Every project on this computer |
.cursor/mcp.json in a project | That project only |
Add the abazi server. If the file already has an mcpServers object, add abazi inside it.
{
"mcpServers": {
"abazi": {
"url": "https://api.52-28-238-205.sslip.io/mcp",
"headers": {
"Authorization": "Bearer YOUR_AGENT_KEY"
}
}
}
}The file now holds a secret. Prefer the global file. If you use the project file, keep .cursor/mcp.json out of version control.
Verify
Open Cursor Settings > MCP. abazi shows a green status and six tools: search_catalog, request_purchase, request_installment_purchase, get_purchase_status, get_spending_status and get_receipt. If it shows an error, toggle it off and on after fixing the file.
Ask the agent for a search. Searching spends nothing.
Use the abazi search_catalog tool to find "forecast" services. Show the service ids and prices.The result lists 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
Search the catalog for forecast and buy it for Tbilisi with task id trip-plan-7. Then fetch the receipt.Cursor asks you to run each tool call unless you have turned on auto-run. The agent calls request_purchase with the service_id, the task_id and a fresh idempotency_key. It sends no price, address or network; Abazi takes those from the catalog and the mandate.
ALLOW
status is paid, with decision: "ALLOW", the resource and a receipt_id. The agent calls get_receipt for the signed receipt and its public verification link. If status is submitted, it polls get_purchase_status after poll_after_ms.
REQUIRE_APPROVAL
status is awaiting_approval, with a reason such as ABOVE_AUTO_THRESHOLD or FIRST_PURCHASE. The approval link goes to the owner's approvers, never to Cursor. The agent keeps the same intent_id and polls get_purchase_status. The link expires after 10 minutes.
DENY
The tool returns an error result with error_code: "POLICY_DENIED", a reason_code such as HARD_CAP_EXCEEDED, retryable and next_action. A denial is final for that purchase.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
Tool calls fail with AGENT_CREDENTIAL_INVALID | The credential is wrong, rotated or revoked (AGENT_CREDENTIAL_INVALID). Replace it in mcp.json. The tool list still loads with a bad key; only the calls fail. |
| No tools listed | Check the JSON, that the key is url (not command), and that the URL ends in /mcp. Reload the server in Cursor Settings > MCP. |
The purchase stays awaiting_approval | A person has not decided yet. Keep polling the same intent_id; do not start a new purchase. |
IDEMPOTENCY_CONFLICT | The same idempotency_key was sent with a different request. Use a new key for a different purchase. |
Next steps
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.
Any MCP client
Connect any MCP host or your own agent to Abazi's streamable HTTP endpoint with a Bearer header, check it with curl, and make a first purchase from the MCP Python SDK.