npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codespar/mcp-braintree

v0.2.1

Published

MCP server for Braintree (PayPal) — global payment processor via the Braintree GraphQL API. Authorize, charge, capture, refund, void; vault payment methods; manage customers; mint client tokens.

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)

| Tool | Purpose | |---|---| | authorize_transaction | Authorize a transaction (reserve funds without capturing) via Braintree GraphQL authorizePaymentMethod. | | charge_transaction | Authorize and capture a transaction atomically via Braintree GraphQL chargePaymentMethod. | | capture_transaction | Capture a previously authorized transaction via captureTransaction. | | refund_transaction | Refund a settled transaction via refundTransaction. | | void_transaction | Void an unsettled transaction (reverse the authorization) via reverseTransaction. | | vault_payment_method | Permanently store a tokenized payment method in the Braintree vault via vaultPaymentMethod. | | delete_payment_method | Delete a vaulted payment method via deletePaymentMethodFromVault. | | create_customer | Create a Braintree customer via createCustomer. | | update_customer | Update an existing Braintree customer via updateCustomer. | | get_transaction | Fetch a transaction by id via the GraphQL search.transactions query. | | get_customer | Fetch a customer by id via the GraphQL node(id:) query. | | submit_for_settlement | Submit a previously authorized transaction for settlement via submitTransactionForSettlement. | | update_payment_method | Update metadata on a vaulted payment method via updatePaymentMethod. | | verify_payment_method | Run a credit-card verification (zero-auth or $1 auth) on a tokenized payment method via verifyPaymentMethod. | | delete_customer | Delete a Braintree customer via deleteCustomer. | | find_customer | Search for customers via the GraphQL search.customers query. | | search_transactions | Search transactions via the GraphQL search.transactions query. | | find_dispute | Fetch a dispute by id via the GraphQL node(id:) query. | | accept_dispute | Accept liability for a dispute via acceptDispute — the merchant concedes and the disputed amount is refunde... | | finalize_dispute | Finalize a dispute via finalizeDispute — submits previously added evidence to the card network for review. | | find_merchant_account | Fetch a merchant account by id via the GraphQL node(id:) query. | | create_client_token | Mint a Braintree client token via createClientToken for client-side tokenization (Drop-in, Hosted Fields, m... |

Install

npm install @codespar/mcp-braintree

Environment

BRAINTREE_MERCHANT_ID="..."   # merchant id
BRAINTREE_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:

  • sandboxhttps://payments.sandbox.braintree-api.com/graphql
  • productionhttps://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

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

License

MIT