Mcp Braintree

io.github.codespar由 GitHub 账号 codespar 发布v0.2.2更新于 Oct 24, 2026

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

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

让助手通过 GraphQL 操作 Braintree(PayPal)银行卡支付:授权、扣款、请款、退款、撤销、保管支付方式,并管理客户与争议。

可以做什么
通过 Braintree GraphQL API 提供 22 个工具,包括 authorize_transaction、charge_transaction、capture_transaction、refund_transaction、void_transaction 和 submit_for_settlement。还涵盖支付方式保管(vault_payment_method、update_payment_method、delete_payment_method、verify_payment_method)、客户管理(创建、更新、查询、搜索、删除)、交易与争议查询、接受与终结争议、商户账户查询,以及用于客户端令牌化的 create_client_token。支付方式 ID 来自客户端令牌化,不接受原始卡号。
适用场景
适合已拥有 Braintree 商户账户、希望由助手处理支付操作、支付方式保管和客户记录的商家。适用于代理驱动的支付流程,也可先在沙箱环境测试再用于生产。
运行要求
以 npm 包(@codespar/mcp-braintree)通过 stdio 在本地运行,需要 Node.js。需要 BRAINTREE_MERCHANT_ID、BRAINTREE_PUBLIC_KEY 和 BRAINTREE_PRIVATE_KEY,可选 BRAINTREE_ENV(sandbox 或 production)与 BRAINTREE_API_VERSION。需要访问 Braintree GraphQL 端点的网络连接。
安装前请注意
BRAINTREE_PRIVATE_KEY 是密钥,这组凭据拥有完整支付权限;生产模式会动用真实资金。工具可以扣款、退款、撤销、保管、删除支付方式和客户,以及接受或终结争议,写入操作不可逆。金额按传入内容转发,额外字段可通过 additional 对象发送。建议先在沙箱环境使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Braintree,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

来源:packages/payments/braintree/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分