Skip to main content
Tribridge ships an official Model Context Protocol (MCP) server: a thin, scoped wrapper around the public API. An agent can create payments, inspect them, register webhooks and replay deliveries. It cannot refund, pay out, sweep wallets or change account settings.

What the agent can do

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
This is deliberately not sufficient to create webhooks or replay events. Add those scopes only if the agent’s task needs them, and rotate the key when the task is done.

Connect

Use the hosted endpoint with OAuth or an API key:
See Tribridge MCP (remote) for Claude/ChatGPT setup, the consent flow, and troubleshooting.

Local stdio (Claude Desktop, Claude Code, local agents)

Claude Desktop:
Claude Code:
Inspector (manual testing):
Then call 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:
Agents should repeat the mode to the user and confirm the amount before a live payment.

Safety model

  • Scopes. Every endpoint declares a required scope; missing scopes return insufficient_scope naming 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_untrusted envelope, 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 return isError: true with a stable code and a next step:
Codes cover 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:
It teaches an agent how to create payments server-side, verify webhook signatures (HMAC-SHA256, constant-time), process events idempotently, handle replays, choose scopes, and roll from test to live. Point your agent at it alongside the docs.

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

  1. Use test mode first. Simulate a payment and verify your webhook handler.
  2. Use a dedicated Agent (safe) key with caps; never a shared production full-access key.
  3. Confirm amount, currency and mode with a human before live payments.
  4. Deduplicate webhooks on event_id; treat replays as the same event.
  5. Log tool errors; surface next_step to the user instead of retrying blindly.
  6. Revoke the agent key when the task is complete.

Machine-readable resources