What the agent can do
Recommended key: Agent (safe)
Create a dedicated key in Dashboard → API keys → Create key → preset Agent (safe):payments:create,payments:read,webhooks:read- MCP access enabled
- $100 maximum per payment, $500 per day
- Optional expiry
Connect
Remote MCP (recommended for claude.ai and ChatGPT)
Use the hosted endpoint with OAuth or an API key:Local stdio (Claude Desktop, Claude Code, local agents)
get_supported_chains, get_fees, and create_payment with {"amount": 5}.
How mode is surfaced
The key prefix decides mode, and every authenticated result includes it:Safety model
- Scopes. Every endpoint declares a required scope; missing scopes return
insufficient_scopenaming the exact permission. - Caps. Per-payment and daily caps are enforced by Tribridge, not by the MCP.
- No money out. The MCP refuses to expose refunds, payouts, sweeps or settlements. If a future route were added, backend middleware rejects MCP-originated requests for reserved scopes.
- MCP opt-in. Keys can disable MCP; such keys receive
mcp_not_allowed. - Untrusted content. Merchant/payment text (descriptions, customer names, merchant names) is
returned as data inside an
ok/content_is_untrustedenvelope, with control characters stripped and length capped. The server never turns backend text into instructions. - Secrets. API keys are never logged; logs go to stderr only (stdout is the protocol).
Error handling
Failures returnisError: true with a stable code and a next step:
invalid_api_key, api_key_expired, insufficient_scope, mcp_not_allowed,
payment_cap_exceeded, daily_cap_exceeded, mode_mismatch, not_found, conflict,
invalid_request, rate_limited, backend_error, network_error, timeout, invalid_response.
Writes are never retried automatically. They send an Idempotency-Key; reuse the same value when
retrying the same logical operation.
Give an agent the integration skill
The MCP package includes a ready-to-use skill:Remote MCP for claude.ai and ChatGPT
Local stdio works for Claude Code and desktop clients. To connect from claude.ai or ChatGPT, host the MCP over Streamable HTTP with the built-in OAuth 2.1 server. See Host the remote MCP server.Agent checklist
- Use test mode first. Simulate a payment and verify your webhook handler.
- Use a dedicated Agent (safe) key with caps; never a shared production full-access key.
- Confirm amount, currency and mode with a human before live payments.
- Deduplicate webhooks on
event_id; treat replays as the same event. - Log tool errors; surface
next_stepto the user instead of retrying blindly. - Revoke the agent key when the task is complete.

