PayPal-owned global payment processor. Target: LatAm SaaS selling to US/EU with existing Braintree accounts. GraphQL API (v2019-01-01) — transactions, vault, customers, client tokens.
Braintree gives your agent 22 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.
authorize_transaction — Authorize a transaction (reserve funds without capturing) via Braintree GraphQL authorizePaymentMethod. Pass a paymentMethodId obtained from client-side tokenization (Drop-in / Hosted Fields / SDK nonce). Capture later with capture_transaction.charge_transaction — Authorize and capture a transaction atomically via Braintree GraphQL chargePaymentMethod. Use for one-step sales. For auth-now-capture-later split, use authorize_transaction + capture_transaction.capture_transaction — Capture a previously authorized transaction via captureTransaction. Amount defaults to full authorized amount when omitted (partial captures allowed up to the authorized total).// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("authorize_transaction", { /* ... */ });$ npm install @codespar/mcp-braintreeAdd this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"braintree": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-braintree"
],
"env": {
"BRAINTREE_MERCHANT_ID": "<your_braintree_merchant_id>",
"BRAINTREE_PUBLIC_KEY": "<your_braintree_public_key>",
"BRAINTREE_PRIVATE_KEY": "<your_braintree_private_key>"
}
}
}
}After restart, your agent can call any of the 22 tools below — try authorize_transaction first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
BRAINTREE_MERCHANT_IDBraintree merchant id (from the Control Panel > API).
BRAINTREE_PUBLIC_KEYBraintree public API key — Basic auth username.
BRAINTREE_PRIVATE_KEYBraintree private API key — Basic auth password (secret).
BRAINTREE_ENVBraintree environment. 'sandbox' (default, https://payments.sandbox.braintree-api.com/graphql) or 'production' (https://payments.braintree-api.com/graphql).
BRAINTREE_API_VERSIONBraintree-Version header value (YYYY-MM-DD). Defaults to 2019-01-01.
Each tool is independent — your agent loads only what it needs to reduce context and response time.
authorize_transactioncharge_transactioncapture_transactionrefund_transactionvoid_transactionvault_payment_methoddelete_payment_methodcreate_customerMCP is a protocol — any framework that speaks it can mount this server.