braintree-mcp-server is an unofficial Model Context Protocol (MCP) server designed to enable AI assistant models to interact with the PayPal Braintree payment processing service. It implements the MCP specification, providing AI systems with direct, structured access to payment operations through Braintree's GraphQL API, such as retrieving transactions, creating payments, and managing customer data.
Key capabilities:
- Provides MCP tools that enable AI models to perform Braintree payment-related operations.
- Supports executing arbitrary queries through the GraphQL API, and includes examples of common GraphQL operations (such as creating a transaction).
- Provides a simple connectivity test tool to check whether Braintree credentials are valid.
Server versions:
- STDIO transport server (braintree_server.py): Uses standard input/output for communication, designed specifically for integration with Claude Desktop and other MCP clients that support STDIO. Each client session starts a new server process, and the server terminates after the client disconnects. Usage: configure claude_desktop_config.json to point to this server, then select the Braintree tool in Claude Desktop.
- SSE transport server (braintree_sse_server.py): Uses Server-Sent Events for communication, runs as a standalone web server, and can handle multiple client connections. The server continues running until manually stopped, and by default binds to 127.0.0.1:8001 (configurable). Connection method: use an MCP client that supports SSE transport to connect to http://127.0.0.1:8001/sse。
Usage:
- Clone the repository.
- Set up a Python 3.13+ environment.
- Install dependencies (see requirements.txt).
- Create a .env file in the project root directory and fill in the credentials obtained from the Braintree control panel.
- By default, run the server with stdio transport, suitable for integration with AI assistant systems that support MCP.
- The SSE server provides a web-based transport layer, allowing multiple persistent client connections, suitable for standalone deployment scenarios that require multiple clients to access Braintree functionality.
Applicable scenarios:
- Integrate Braintree payment functionality into AI assistant workflows.
- Automate payment queries, transaction creation, and customer data management through AI models.
- Standalone deployment scenarios that require persistent access to Braintree functionality by multiple clients.
Limitations and notes:
- This project is unofficial.
- Before use, ensure that the Braintree credentials in the .env file are correct.
- Verify that the network connection can access the Braintree API endpoints.
- Check whether the Braintree account has rate limits or permission issues.
- The license is MIT, with an additional academic citation requirement: academic or scientific research use must be cited in the format specified in CITATION.md; commercial and non-academic use follows standard MIT terms.
- For the specific dependency list, environment variable names, and complete configuration details, refer to requirements.txt, the .env example, and the documentation in the repository.