Mcp Braintree

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for Braintree (PayPal) — global card processing via GraphQL: charge, refund, vault

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

MCP server for Braintree (PayPal) card payments: authorize, charge, refund, vault payment methods and manage customers and disputes via GraphQL.

What you can do
  • Authorize, charge, capture, void, refund and submit transactions for settlement
  • Vault, update, verify and delete stored payment methods
  • Create, update, search and delete customers
  • Look up and search transactions, customers, disputes and merchant accounts
  • Mint client tokens for browser or mobile tokenization
When to use it
Useful when you already hold a Braintree merchant account and want an assistant to handle payment operations, vaulting and customer management, for example a SaaS selling to US or EU buyers. Start in the sandbox environment to test flows before touching production.
Requirements
Runs locally over stdio via the npm package (npx), or over HTTP when MCP_HTTP and MCP_PORT are set. Needs a Braintree merchant account and the environment variables BRAINTREE_MERCHANT_ID, BRAINTREE_PUBLIC_KEY and BRAINTREE_PRIVATE_KEY, plus optional BRAINTREE_ENV (sandbox by default) and BRAINTREE_API_VERSION. Network access to the Braintree GraphQL endpoint.
Before you install
BRAINTREE_PRIVATE_KEY is a secret API credential; keep it out of logs and shared configs. The tools move real money in production: charges, captures, refunds, voids, dispute acceptance and customer or payment-method deletion are irreversible. Defaults to sandbox, but setting BRAINTREE_ENV to production enables live transactions. Payment method ids must come from client-side tokenization; raw card numbers are not accepted.

Installation

In SourceWeft

  1. Open Mcp Braintree in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-braintree

MCP server for Braintree (PayPal) — global card processing via the Braintree GraphQL API.

Target customer: LatAm SaaS selling to US/EU buyers who already hold a Braintree merchant account and want agent-driven payments, vaulting, and customer management.

Tools (22)

ToolPurpose
authorize_transactionAuthorize a transaction (reserve funds without capturing) via Braintree GraphQL authorizePaymentMethod.
charge_transactionAuthorize and capture a transaction atomically via Braintree GraphQL chargePaymentMethod.
capture_transactionCapture a previously authorized transaction via captureTransaction.
refund_transactionRefund a settled transaction via refundTransaction.
void_transactionVoid an unsettled transaction (reverse the authorization) via reverseTransaction.
vault_payment_methodPermanently store a tokenized payment method in the Braintree vault via vaultPaymentMethod.
delete_payment_methodDelete a vaulted payment method via deletePaymentMethodFromVault.
create_customerCreate a Braintree customer via createCustomer.
update_customerUpdate an existing Braintree customer via updateCustomer.
get_transactionFetch a transaction by id via the GraphQL search.transactions query.
get_customerFetch a customer by id via the GraphQL node(id:) query.
submit_for_settlementSubmit a previously authorized transaction for settlement via submitTransactionForSettlement.
update_payment_methodUpdate metadata on a vaulted payment method via updatePaymentMethod.
verify_payment_methodRun a credit-card verification (zero-auth or $1 auth) on a tokenized payment method via verifyPaymentMethod.
delete_customerDelete a Braintree customer via deleteCustomer.
find_customerSearch for customers via the GraphQL search.customers query.
search_transactionsSearch transactions via the GraphQL search.transactions query.
find_disputeFetch a dispute by id via the GraphQL node(id:) query.
accept_disputeAccept liability for a dispute via acceptDispute — the merchant concedes and the disputed amount is refunde...
finalize_disputeFinalize a dispute via finalizeDispute — submits previously added evidence to the card network for review.
find_merchant_accountFetch a merchant account by id via the GraphQL node(id:) query.
create_client_tokenMint a Braintree client token via createClientToken for client-side tokenization (Drop-in, Hosted Fields, m...

Install

bash
npm install @codespar/mcp-braintree

Environment

bash
BRAINTREE_MERCHANT_ID="..."   # merchant idBRAINTREE_PUBLIC_KEY="..."    # public API key (Basic auth user)BRAINTREE_PRIVATE_KEY="..."   # private API key (Basic auth password, secret)BRAINTREE_ENV="sandbox"       # 'sandbox' (default) or 'production'BRAINTREE_API_VERSION="2019-01-01"  # optional, Braintree-Version header

Endpoints:

  • sandbox → https://payments.sandbox.braintree-api.com/graphql
  • production → https://payments.braintree-api.com/graphql

Authentication

Braintree's GraphQL endpoint accepts HTTP Basic auth with PUBLIC_KEY:PRIVATE_KEY base64-encoded. Every request also requires a Braintree-Version: YYYY-MM-DD header — the server defaults to 2019-01-01 and can be overridden with BRAINTREE_API_VERSION.

Payment method ids

Most mutations take a paymentMethodId. These come from client-side tokenization (Braintree Drop-in / Hosted Fields / SDKs) — the server does not accept raw PANs. Use create_client_token to mint a token for the browser or mobile SDK.

Run

bash
# stdio (default — for Claude Desktop, Cursor, etc)npx @codespar/mcp-braintree
# HTTP (for server-to-server testing)MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-braintree

Notes

  • Amount is a string in Braintree GraphQL (e.g. "10.50"), not a number. The server forwards whatever shape the agent passes; strings are the safe default.
  • Braintree's GraphQL schema evolves; some input fields not exposed in the MCP inputSchema can still be passed in additional / nested objects and will be forwarded.

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Source: packages/payments/braintree/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts