MCP Hub
Back to servers

BCH MCP Server

A comprehensive Bitcoin Cash (BCH) MCP server enabling full wallet management, peer-to-peer transactions, CashToken operations (genesis, minting, burning), and advanced smart contract escrow features. It provides AI agents with deep blockchain integration, real-time price data, and extensive technical documentation.

Tools
43
Updated
Jan 12, 2026

BCH MCP Server

A comprehensive Bitcoin Cash (BCH) MCP server powered by mainnet-js. Provides wallet management, balance checking, sending BCH, CashTokens (genesis, minting, burning, sending), escrow contracts, QR codes, and transaction utilities.

🌐 Live Server

Production URL: https://mcp.cashlabs.dev/mcp

EndpointURL
MCP Endpointhttps://mcp.cashlabs.dev/mcp
Health Checkhttps://mcp.cashlabs.dev/health
Server Infohttps://mcp.cashlabs.dev/
MCP Cardhttps://mcp.cashlabs.dev/.well-known/mcp.json

MCP Client Configuration

{
  "mcpServers": {
    "bch-mcp": {
      "url": "https://mcp.cashlabs.dev/mcp"
    }
  }
}

📋 Available Tools (40+)

🔐 Wallet Management

ToolDescriptionExample Input
wallet_createCreate a new random wallet{ "network": "testnet", "type": "seed" }
wallet_from_idGet wallet info from walletId{ "walletId": "wif:testnet:..." }
wallet_from_seedRestore wallet from mnemonic{ "seedPhrase": "word1 word2...", "network": "testnet" }
wallet_from_wifRestore wallet from WIF private key{ "wif": "cNfsP...", "network": "testnet" }
wallet_watch_onlyCreate watch-only wallet{ "cashaddr": "bchtest:qq...", "network": "testnet" }
get_deposit_addressGet deposit addresses{ "walletId": "wif:testnet:..." }
get_public_keyGet public key and hash{ "walletId": "wif:testnet:..." }

💰 Balance & UTXOs

ToolDescriptionExample Input
get_balanceGet wallet balance{ "walletId": "wif:testnet:...", "unit": "bch" }
get_utxosGet unspent transaction outputs{ "walletId": "wif:testnet:..." }
get_max_amount_to_sendGet max sendable amount{ "walletId": "wif:testnet:...", "outputCount": 1 }

📤 Sending Transactions

ToolDescriptionExample Input
sendSend BCH to addresses{ "walletId": "...", "to": [{ "cashaddr": "...", "value": 0.001, "unit": "bch" }] }
send_maxSend all funds to address{ "walletId": "...", "address": "bchtest:qq..." }
op_return_sendSend with OP_RETURN data{ "walletId": "...", "data": ["MEMO", "Hello"] }
encode_transactionBuild tx without broadcasting{ "walletId": "...", "to": [...] }
submit_transactionBroadcast signed tx hex{ "walletId": "...", "transactionHex": "0200..." }

📜 History & Blockchain

ToolDescriptionExample Input
get_historyGet transaction history{ "walletId": "...", "unit": "bch", "count": 10 }
get_raw_historyGet raw tx history{ "walletId": "..." }
get_block_heightGet current block height{ "network": "testnet" }
decode_transactionDecode tx by hash/hex{ "transaction": "abc123...", "loadInputValues": true }

🪙 CashTokens (Fungible & NFT)

ToolDescriptionExample Input
token_genesisCreate new token category{ "walletId": "...", "amount": "1000000", "capability": "minting" }
token_sendSend tokens{ "walletId": "...", "tokenId": "...", "amount": "100", "cashaddr": "..." }
token_mintMint new NFT tokens{ "walletId": "...", "tokenId": "...", "requests": [...] }
token_burnBurn tokens{ "walletId": "...", "tokenId": "...", "amount": "10" }
get_token_balanceGet token balance{ "walletId": "...", "tokenId": "..." }
get_all_token_balancesGet all FT balances{ "walletId": "..." }
get_nft_token_balanceGet NFT count{ "walletId": "...", "tokenId": "..." }
get_all_nft_token_balancesGet all NFT balances{ "walletId": "..." }
get_token_utxosGet token UTXOs{ "walletId": "...", "tokenId": "..." }
get_token_deposit_addressGet token deposit address{ "walletId": "..." }

🔒 Escrow Contracts

ToolDescriptionExample Input
escrow_createCreate escrow contract{ "arbiterAddr": "...", "buyerAddr": "...", "sellerAddr": "...", "amount": "10000" }
escrow_get_balanceGet escrow balance{ "contractId": "escrow:testnet:..." }
escrow_spendRelease to seller{ "contractId": "...", "wif": "..." }
escrow_refundRefund to buyer{ "contractId": "...", "wif": "..." }

✍️ Signing & Verification

ToolDescriptionExample Input
sign_messageSign message with wallet{ "walletId": "...", "message": "Hello World" }
verify_messageVerify message signature{ "walletId": "...", "message": "...", "signature": "..." }

💱 Price & Conversion

ToolDescriptionExample Input
get_bch_priceGet current BCH/USD price{}
convert_currencyConvert BCH/SAT/USD{ "amount": 100, "from": "usd", "to": "sat" }

🛠️ Utilities

ToolDescriptionExample Input
qr_addressGenerate QR code for address{ "address": "bchtest:qq...", "size": 256 }
validate_addressValidate BCH address{ "address": "bchtest:qq..." }
wait_for_transactionWait for incoming tx{ "walletId": "..." }
wait_for_balanceWait for target balance{ "walletId": "...", "value": 0.01, "unit": "bch" }

🧪 Testnet

ToolDescriptionExample Input
get_testnet_satoshisGet free testnet coins{ "walletId": "..." }
return_testnet_satoshisReturn coins to faucet{ "walletId": "..." }

📚 MCP Resources (21 Documentation Guides)

Agents can fetch documentation resources for context:

Core Guides

Resource URIDescription
docs://overviewBCH MCP Server overview and quick start
docs://walletsWallet management - create, restore, watch-only
docs://transactionsSending BCH - standard, max, OP_RETURN
docs://cashtokensCashTokens - genesis, mint, send, burn
docs://escrowEscrow contracts for secure transactions
docs://utilitiesQR codes, price conversion, signing

Reference Guides

Resource URIDescription
docs://bch-basicsBitcoin Cash fundamentals - units, confirmations
docs://addressesAddress formats - CashAddr, token addresses
docs://smart-contractsCashScript - escrow, multisig, covenants
docs://bcmrBCMR - token metadata registries
docs://networkNetwork info - mainnet, testnet, nodes

Developer Resources

Resource URIDescription
docs://api-referenceComplete API reference for all tools
docs://examplesCode examples for common operations
docs://faqFrequently asked questions
docs://developer-resourcesTools, APIs, explorers, community
docs://securitySecurity best practices

CashScript Documentation

Resource URIDescription
docs://cashscriptWhat is CashScript - smart contract language
docs://cashscript-languageLanguage reference - types, operators, statements
docs://cashscript-globalsGlobal variables - tx introspection, time locks
docs://cashscript-covenantsCovenants guide - restrict spending, state
docs://cashscript-sdkTypeScript SDK - Contract, TransactionBuilder

🚀 Quick Start

Using the Live Server

Connect your MCP client to https://mcp.cashlabs.dev/mcp

Local Development

# Install dependencies
npm install

# Build the server
npm run build

# Start the server
npm start

The server will be available at http://localhost:8081.

Docker

# Build the image
docker build -t bch-mcp-server .

# Run the container
docker run -d -p 8081:8081 --name bch-mcp bch-mcp-server

🌍 Deployment to Digital Ocean

Prerequisites

  • A Digital Ocean Droplet (Ubuntu 22.04 recommended)
  • A domain name (optional, for SSL)
  • SSH access to your droplet

Quick Deploy

# SSH into your droplet
ssh root@your-droplet-ip

# Clone the repository
git clone https://github.com/nickthelegend/bch-mcp.git
cd bch-mcp

# Make deployment script executable and run
chmod +x run.sh
./run.sh

DNS Configuration

Add an A Record in your DNS provider:

  • Host: mcp (or @ for root)
  • Value: Your Droplet's IP address
  • TTL: 300

📡 API Endpoints

MethodEndpointDescription
POST/mcpMain MCP endpoint for tool calls
GET/healthHealth check endpoint
GET/Server info and endpoints
GET/.well-known/mcp.jsonMCP server card (metadata)
GET/.well-known/mcp-configMCP configuration schema

🔧 Environment Variables

VariableDefaultDescription
PORT8081Server port
DEBUGfalseEnable debug logging
NODE_ENVproductionNode environment

📖 Usage Examples

Create a Testnet Wallet

{
  "tool": "wallet_create",
  "input": { "network": "testnet", "type": "seed" }
}

Get Free Testnet Coins

{
  "tool": "get_testnet_satoshis",
  "input": { "walletId": "wif:testnet:cNfsP..." }
}

Send BCH

{
  "tool": "send",
  "input": {
    "walletId": "wif:testnet:...",
    "to": [
      { "cashaddr": "bchtest:qq...", "value": 1000, "unit": "sat" }
    ]
  }
}

Create CashToken

{
  "tool": "token_genesis",
  "input": {
    "walletId": "wif:testnet:...",
    "amount": "1000000",
    "capability": "minting"
  }
}

Create Escrow Contract

{
  "tool": "escrow_create",
  "input": {
    "arbiterAddr": "bchtest:qq...",
    "buyerAddr": "bchtest:qq...",
    "sellerAddr": "bchtest:qq...",
    "amount": "50000",
    "network": "testnet"
  }
}

📦 Monitoring

# Check server health
curl https://mcp.cashlabs.dev/health

# View container logs
docker logs -f bch-mcp-server

🔄 Updating

# Pull latest changes
git pull

# Rebuild and restart
docker stop bch-mcp-server
docker rm bch-mcp-server
docker build -t bch-mcp-server .
docker run -d --name bch-mcp-server --network mcp-net --restart unless-stopped -e PORT=8081 bch-mcp-server

📜 License

MIT

👤 Author

nickthelegend

Reviews

No reviews yet

Sign in to write a review