Skip to main content
BR

Braintree

v0.2.1API Key

Procesador de pagos global de PayPal. Objetivo: SaaS de LatAm vendiendo a US/EU con cuentas Braintree existentes. API GraphQL (v2019-01-01) — transacciones, vault, clientes, client tokens.

22 herramientas5 env vars🌐 GLOBALestable en npm

Qué puede hacer tu agente

Braintree le da a tu agente 22 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • authorize_transactionAuthorize 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_transactionAuthorize 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_transactionCapture a previously authorized transaction via captureTransaction. Amount defaults to full authorized amount when omitted (partial captures allowed up to the authorized total).
Ejemplo de llamada
// 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", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-braintree

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "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>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 22 herramientas de abajo — probá authorize_transaction primero.

Variables de entorno · 5

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

BRAINTREE_MERCHANT_ID
obligatorio

Braintree merchant id (from the Control Panel > API).

BRAINTREE_PUBLIC_KEY
obligatorio

Braintree public API key — Basic auth username.

BRAINTREE_PRIVATE_KEY
obligatoriosecret

Braintree private API key — Basic auth password (secret).

BRAINTREE_ENV
opcional

Braintree environment. 'sandbox' (default, https://payments.sandbox.braintree-api.com/graphql) or 'production' (https://payments.braintree-api.com/graphql).

BRAINTREE_API_VERSION
opcional

Braintree-Version header value (YYYY-MM-DD). Defaults to 2019-01-01.

Herramientas disponibles · 22

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

WRITEauthorize_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.
WRITEcharge_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.
WRITEcapture_transaction
Capture a previously authorized transaction via captureTransaction. Amount defaults to full authorized amount when omitted (partial captures allowed up to the authorized total).
DELETErefund_transaction
Refund a settled transaction via refundTransaction. Amount defaults to the full settled amount when omitted. For partial refunds, pass a smaller amount.
DELETEvoid_transaction
Void an unsettled transaction (reverse the authorization) via reverseTransaction. Use when funds are authorized but not yet captured — for captured/settled transactions use refund_transaction instead.
WRITEvault_payment_method
Permanently store a tokenized payment method in the Braintree vault via vaultPaymentMethod. The input paymentMethodId must be a single-use nonce; the mutation returns a permanent vaulted payment method id that can be reused for future charges.
DELETEdelete_payment_method
Delete a vaulted payment method via deletePaymentMethodFromVault. Irreversible — the token cannot be used for future charges after deletion.
WRITEcreate_customer
Create a Braintree customer via createCustomer. Customers group multiple vaulted payment methods and transactions under one identity.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-braintree` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Braintree — MCP server · 22 tools | CodeSpar