Skip to main content
B

Braintree

@codespar/mcp-braintree Β· v0.2.2

🌐 GlobalPaymentsAuth · API Keybeta22 tools5 env vars

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.

Get started Β· freeView docs

MIT Β· runs locally with your own credentials

Package
@codespar/mcp-braintree
Version
0.2.2
npm dist-tag
latest
Category
Payments
Auth
API Key
Country
🌐 Global
License
MIT
Transport
stdio Β· streamable-http

Quickstart

Install, set the credentials, make the first call.

Pick your client. The server runs locally over stdio, with your own credentials.

Add the server to your clientOne config entry. No build step, no SDK required.
Set the environment variables5 variables read by this server's code, listed below.
Restart and make the first callThe agent can call any of the 22 tools. Try authorize_transaction first.
terminal
# Claude Code claude mcp add braintree -e BRAINTREE_API_VERSION=… -e BRAINTREE_ENV=… -e BRAINTREE_MERCHANT_ID=… -e BRAINTREE_PRIVATE_KEY=… -e BRAINTREE_PUBLIC_KEY=… -- npx -y @codespar/mcp-braintree@0.2.2 # then: /mcp to confirm the server is connected
Environment variables5 variables
BRAINTREE_API_VERSIONBraintree-Version header value (YYYY-MM-DD). Defaults to 2019-01-01.optional
BRAINTREE_ENVBraintree environment. 'sandbox' (default, https://payments.sandbox.braintree-api.com/graphql) or 'production' (https://payments.braintree-api.com/graphql).optional
BRAINTREE_MERCHANT_IDBraintree merchant id (from the Control Panel > API).required
BRAINTREE_PRIVATE_KEYBraintree private API key β€” Basic auth password (secret).requiredsecret
BRAINTREE_PUBLIC_KEYBraintree public API key β€” Basic auth username.required

Names read from the package code (@codespar/mcp-braintree@0.2.2). Descriptions and flags come from its manifest. Self-hosted, you hold the credentials.

First call demoauthorize_transaction

"Authorize a transaction"

tools/callauthorize_transactionresult returned

Tools

What your agent can call.

22 tools, as the package's tools/list returns them.

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).

refund_transaction

Refund a settled transaction via refundTransaction. Amount defaults to the full settled amount when omitted. For partial refunds, pass a smaller amount.

void_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.

vault_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.

delete_payment_method

Delete a vaulted payment method via deletePaymentMethodFromVault. Irreversible β€” the token cannot be used for future charges after deletion.

create_customer

Create a Braintree customer via createCustomer. Customers group multiple vaulted payment methods and transactions under one identity.

update_customer

Update an existing Braintree customer via updateCustomer. Only fields present in the request are updated.

get_transaction

Fetch a transaction by id via the GraphQL search.transactions query. Returns id, status, amount, orderId, createdAt, and the associated payment method.

get_customer

Fetch a customer by id via the GraphQL node(id:) query. Returns customer scalars (id, firstName, lastName, email, company, phone).

submit_for_settlement

Submit a previously authorized transaction for settlement via submitTransactionForSettlement. Unlike capture_transaction (captureTransaction), this marks the transaction for the next settlement batch and supports optional order id / descriptor overrides.

Names and descriptions come from the package's tools/list (@codespar/mcp-braintree@0.2.2). A kind (read, write, delete) is shown only when the package annotates its tools or each tool was verified one by one; neither exists for this server yet.

Compatibility

MCP is a protocol. Any client that speaks it can mount this server.

The CodeSpar runtime does not route this server. Mount it in your client over stdio Β· streamable-http.

Protocol

Any MCP client

stdio Β· streamable-http

Questions

Before you install.

How do I install the Braintree MCP server?

Run npx -y @codespar/mcp-braintree@0.2.2 and add the config block above to your MCP client: Claude Code, Cursor, Claude Desktop, VS Code, or any MCP-compatible client. No build step, no SDK required.

What can my agent do with Braintree?

Braintree exposes 22 tools for payments. Your agent calls them directly; the full list is above.

How does Braintree authenticate, and how are credentials stored?

Braintree uses API Key. Self-hosted, you hold the credentials: the server reads them from its environment variables.

How does Braintree handle upstream API changes?

Every server is versioned independently on npm. The command on this page pins 0.2.2, the version whose tools are listed here; your agent keeps running it until you change the version.

Is Braintree open source? How do I report a bug?

Yes. Braintree is MIT-licensed and published on npm as @codespar/mcp-braintree, source on GitHub (link in the Details panel). Report issues on the package repository; security issues go to security@codespar.dev, and we respond within 24 hours.

Start in seconds.

Add the config above, set the variables, and your agent calls the tools.

Start in seconds demo
Add the server to your client with the config above.
Set the environment variables listed above.
Ask your agent for the first call.
Braintree β€” MCP server Β· 22 tools | CodeSpar