braintree-mcp-server
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: QuentinCody
- License: other
- Language: Python
- Default Branch: main
- Size: 48.8 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Braintree MCP Server
An unofficial Model Context Protocol (MCP) server for interacting with PayPal Braintree payment processing services.
License and Citation
This project is available under the MIT License with an Academic Citation Requirement. This means you can freely use, modify, and distribute the code, but any academic or scientific publication that uses this software must provide appropriate attribution.
For academic/research use:
If you use this software in a research project that leads to a publication, presentation, or report, you must cite this work according to the format provided in CITATION.md.
For commercial/non-academic use:
Commercial and non-academic use follows the standard MIT License terms without the citation requirement.
By using this software, you agree to these terms. See LICENSE.md for the complete license text.
Server Versions
There are two versions of the Braintree MCP server available:
1. STDIO Transport Server (braintree_server.py)
- Uses standard input/output (STDIO) for communication
- Designed for integrations with Claude Desktop and other MCP clients that support STDIO
- Each client session spawns a new server process
- The server terminates when the client disconnects
Usage with Claude Desktop:
1. Configure claude_desktop_config.json to point to this server
2. Open Claude Desktop and select the Braintree tool
2. SSE Transport Server (braintree_sse_server.py)
- Uses Server-Sent Events (SSE) for communication
- Designed as a standalone web server that can handle multiple client connections
- Server runs persistently until manually stopped
- Binds to
127.0.0.1:8001by default (configurable)
Manual Usage:
bash
python braintree_sse_server.py
Connecting to the SSE server:
Use an MCP client that supports SSE transport and connect to http://127.0.0.1:8001/sse
Overview
This server implements the Model Context Protocol (MCP) specification to provide AI assistant models with direct, structured access to Braintree's payment processing capabilities via GraphQL API. It enables AI systems to perform payment operations like fetching transactions, creating payments, and managing customer data through MCP tools.
Installation
Clone this repository
bash git clone https://github.com/yourusername/braintree-mcp-server.git cd braintree-mcp-serverSet up a Python 3.13+ environment ```bash
If using pyenv
pyenv install 3.13.0 pyenv local 3.13.0
Or using another method to ensure Python 3.13+
```
- Install dependencies
bash pip install -e .
Configuration
Create a .env file in the project root with your Braintree credentials:
BRAINTREE_MERCHANT_ID=your_merchant_id
BRAINTREE_PUBLIC_KEY=your_public_key
BRAINTREE_PRIVATE_KEY=your_private_key
BRAINTREE_ENVIRONMENT=sandbox # or production
You can obtain these credentials from your Braintree Control Panel.
Usage
Running the server
Default STDIO Transport
bash
python braintree_server.py
The server runs using stdio transport by default, which is suitable for integration with AI assistant systems that support MCP.
Server-Sent Events (SSE) Transport
bash
python braintree_sse_server.py
The SSE server provides a web-based transport layer that allows multiple persistent client connections. This is useful for standalone deployments where multiple clients need to access the Braintree functionality.
Default configuration: - Host: 127.0.0.1 (localhost) - Port: 8001 - Environment: Defined in your .env file
See requirements.txt for the required dependencies.
Available MCP Tools
braintree_ping
Simple connectivity test to check if your Braintree credentials are working.
```python response = await braintree_ping()
Returns "pong" if successful
```
braintreeexecutegraphql
Execute arbitrary GraphQL queries against the Braintree API.
```python query = """ query GetTransactionDetails($id: ID!) { node(id: $id) { ... on Transaction { id status amount { value currencyCode } createdAt } } } """
variables = {"id": "transactionidhere"}
response = await braintreeexecutegraphql(query, variables)
Returns JSON response from Braintree
```
Common GraphQL Operations
Fetch Customer
graphql
query GetCustomer($id: ID!) {
node(id: $id) {
... on Customer {
id
firstName
lastName
email
paymentMethods {
edges {
node {
id
details {
... on CreditCardDetails {
last4
expirationMonth
expirationYear
cardType
}
}
}
}
}
}
}
}
Create Transaction
graphql
mutation CreateTransaction($input: ChargePaymentMethodInput!) {
chargePaymentMethod(input: $input) {
transaction {
id
status
amount {
value
currencyCode
}
}
}
}
With variables:
json
{
"input": {
"paymentMethodId": "payment_method_id_here",
"transaction": {
"amount": "10.00",
"orderId": "order123",
"options": {
"submitForSettlement": true
}
}
}
}
Troubleshooting
- Ensure your Braintree credentials are correct in the
.envfile - Verify your network connection can reach Braintree's API endpoints
- Check for any rate limiting or permission issues with your Braintree account
Owner
- Login: QuentinCody
- Kind: user
- Repositories: 1
- Profile: https://github.com/QuentinCody
Citation (CITATION.md)
# Citation Information
If you use this software as part of research that results in a publication, please cite it as follows:
## BibTeX Format
```bibtex
@software{cody_braintree_mcp_server_2025,
author = {Cody, Quentin},
title = {Braintree MCP Server: A Model Context Protocol Server for Payment Processing},
year = {2025},
url = {https://github.com/QuentinCody/braintree-mcp-server},
note = {Version 1.0}
}
```
## APA Format
```
Cody, Q. (2025). Braintree MCP Server: A Model Context Protocol Server for Payment Processing. GitHub. https://github.com/QuentinCody/braintree-mcp-server
```
## Additional Information
This software is licensed under the MIT License with an Academic Citation Requirement. See the LICENSE.md file for details.
For questions regarding citation, please contact QuentinCody@gmail.com.
GitHub Events
Total
- Watch event: 2
- Push event: 6
- Public event: 1
- Pull request event: 1
Last Year
- Watch event: 2
- Push event: 6
- Public event: 1
- Pull request event: 1