- Home
- MCP servers
- Blockchain Payment
Blockchain Payment
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"logos-42-blockchain-payment-mcp": {
"command": "blockchain-payment-mcp",
"args": [],
"env": {
"DEBUG": "true",
"PYTHONPATH": ".",
"PRIVATE_KEY": "your-private-key-here",
"DEFAULT_NETWORK": "base_sepolia",
"MAX_TRANSACTION_VALUE": "10"
}
}
}
}You run a blockchain payment MCP server that exposes programmable endpoints to query balances, manage wallets, and perform transfers across multiple networks. It centralizes blockchain interactions into a single, configurable service you can drive from your MCP client, enabling safe, auditable, and scalable payment operations for ETH and major tokens.
How to use
You interact with the MCP server through an MCP client. Start by installing the MCP package, then configure the server entry points you want to run locally or remotely. Use the provided tools to check balances, estimate gas, send transactions, and manage wallets. All calls are executed through the MCP server with your chosen network and token settings, and you can constrain usage with the built-in safety limits.
Key capabilities you will leverage include querying ETH and token balances, sending ETH or ERC20 transfers, tracking transaction status, estimating gas, validating addresses, and managing wallets (create, switch, list, set private keys, remove). Each operation is exposed as an MCP tool you can call from your client or script.
How to install
pip install blockchain-payment-mcp
Configure the MCP server entry in your MCP client setup. The project includes a sample MCP configuration that defines how to start the server and which environment variables it uses.
{
"mcpServers": {
"blockchain-payment": {
"command": "blockchain-payment-mcp",
"args": [],
"env": {
"PRIVATE_KEY": "your-private-key-here",
"DEFAULT_NETWORK": "base_sepolia",
"DEBUG": "true",
"MAX_TRANSACTION_VALUE": "10",
"PYTHONPATH": "."
}
}
}
}
If you prefer running the server from Python directly (local development), you can start the MCP client using Python with the server module. This runs the MCP server in stdio mode, suitable for local testing.
python -m blockchain_payment_mcp.server
Additional setup and tips
You can also configure a local development entry through a dedicated Cursor-like MCP client configuration that runs the server as a Python module. This is useful when you want to host the MCP server entirely on your machine for testing and integration.
The server supports a default network, a private key for signing transactions, and a maximum transaction value to help enforce safety limits during development and production.
Security and safety notes
-
The server enforces a maximum transaction value to prevent accidental large transfers during development and testing.
-
All Ethereum addresses are strictly validated to reduce the risk of misdirected transfers.
-
Private keys can be provided via environment variables or at runtime, with options to keep keys out of code.
-
The server includes robust error handling and logging to help you diagnose issues and maintain audit trails.
Example usage scenarios
Query the ETH balance of a specific address and optionally a token balance in one call, then decide whether to initiate a transfer based on the result.
Estimate gas for a potential transfer before sending, to better plan fees and timing.
Create or import wallets, switch between them, and securely store private keys for signing transactions.
Troubleshooting tips
If you encounter issues starting the MCP server, verify that the environment variables PRIVATE_KEY, DEFAULT_NETWORK, and MAX_TRANSACTION_VALUE are set correctly and that the chosen network is supported.
Check logs for detailed error messages and ensure the Python dependencies are installed from the requirements file.
Available tools
get_balance
Query the balance of a specific address. You can request ETH or a token balance for a given network.
get_network_info
Retrieve information about the current network configuration and status.
get_supported_tokens
List all tokens supported by the MCP server for transfers and balance checks.
validate_address
Validate that a given address conforms to the expected Ethereum address format.
send_transaction
Send a transfer of ETH or an ERC20 token to a specified address on a chosen network.
get_transaction_status
Check the status and details of a previously submitted transaction.
estimate_gas_fees
Estimate the gas fees for a potential transaction given the destination, amount, and token.
create_wallet
Create a new wallet address and associated private key.
set_user_wallet
Set or update the user wallet private key for later transactions.
list_wallets
List all wallets that have been added to the MCP client.
switch_wallet
Switch the active wallet used for subsequent operations.
remove_wallet
Remove a wallet by its label from the MCP client.