Get the FREE Ultimate OpenClaw Setup Guide →

braintree

MCP server from QuentinCody/braintree-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio quentincody-braintree-mcp-server python braintree_sse_server.py \
  --env BRAINTREE_PUBLIC_KEY="your_public_key" \
  --env BRAINTREE_ENVIRONMENT="sandbox" \
  --env BRAINTREE_MERCHANT_ID="your_merchant_id" \
  --env BRAINTREE_PRIVATE_KEY="your_private_key"

How to use

This MCP server provides a bridge to PayPal Braintree's GraphQL API, exposing MCP tools that let you verify connectivity and run GraphQL queries or mutations against your Braintree account. The STDIO (braintree_server.py) variant is designed for integrations that communicate over standard input/output (useful with AI assistants or clients that spawn dedicated processes per session). The SSE (braintree_sse_server.py) variant runs as a persistent web server and supports multiple concurrent clients via Server-Sent Events, accessible at http://127.0.0.1:8001/sse by default. Typical workflows involve starting the appropriate server, ensuring your credentials are loaded from a .env file, and then invoking the provided MCP tools like braintree_ping and braintree_execute_graphql to verify connectivity and fetch or mutate data such as transactions or customer details.

How to install

Prerequisites:

  • Python 3.13+ installed on your system
  • Git
  • Access to a terminal/command prompt

Installation steps:

  1. Clone the repository:
git clone https://github.com/yourusername/braintree-mcp-server.git
cd braintree-mcp-server
  1. Set up a Python 3.13+ environment (recommended):
# If using pyenv
pyenv install 3.13.0
pyenv local 3.13.0

# Or ensure your system Python is 3.13+ and use a virtualenv if you prefer
python -V
  1. Install dependencies (editable mode if applicable):
pip install -e .
  1. Create a environment file with your Braintree credentials and environment by following the configuration guidance below. For example, create a .env in the project root with:
BRAINTREE_MERCHANT_ID=your_merchant_id
BRAINTREE_PUBLIC_KEY=your_public_key
BRAINTREE_PRIVATE_KEY=your_private_key
BRAINTREE_ENVIRONMENT=sandbox  # or production
  1. Start the STDIO server (single-session per process) or the SSE server (multi-client):
# STDIO transport
python braintree_server.py

# SSE transport
python braintree_sse_server.py
  1. Verify operation using the available MCP tool calls as documented in the Usage section.

Additional notes

Environment variables: Ensure BRAINTREE_MERCHANT_ID, BRAINTREE_PUBLIC_KEY, BRAINTREE_PRIVATE_KEY, and BRAINTREE_ENVIRONMENT are set correctly in a .env file or your environment before starting the server. The SSE server binds by default to 127.0.0.1:8001; change config as needed for deployment. If you encounter authentication errors, double-check your credentials in the Braintree Control Panel and verify the environment (sandbox vs. production). The repository mentions requirements.txt; refer to it to install any additional Python dependencies.

Common issues:

  • Credentials not found or invalid: verify .env loading mechanism.
  • Port already in use: stop the running server or configure a different port for the SSE variant.
  • Network access: ensure outbound access to Braintree endpoints if operating behind a firewall.

Related MCP Servers

Sponsor this space

Reach thousands of developers