btcpay-mcp
Enables Bitcoin merchant payment processing through BTCPay Server, allowing AI agents to create invoices, manage stores, track payment statuses, and monitor on-chain wallet transactions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@btcpay-mcp create a $50 invoice for order #1234"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
btcpay-mcp
MCP server for BTCPay Server — let AI agents create invoices, manage stores, track payments, and check exchange rates through the Greenfield REST API.
21 tools · MIT licensed · Zero hardcoded credentials
The only MCP server for BTCPay Server. While other Bitcoin MCP servers cover blockchain data and node RPC,
btcpay-mcpis the first to expose full merchant payment processing — invoice creation, store management, pull payments, payment requests, Lightning operations, wallet management, webhooks, and exchange rates — to AI agents.
pip install btcpay-mcpQuick Start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"btcpay-server": {
"command": "uvx",
"args": ["btcpay-mcp"],
"env": {
"BTCPAY_BASE_URL": "https://your-btcpay-server.com",
"BTCPAY_API_KEY": "your-api-key",
"BTCPAY_STORE_ID": "your-store-id"
}
}
}
}Claude Code
claude mcp add btcpay-server -- uvx btcpay-mcpCursor / VS Code
Add to .cursor/mcp.json or .vscode/mcp.json:
{
"mcpServers": {
"btcpay-server": {
"command": "uvx",
"args": ["btcpay-mcp"],
"env": {
"BTCPAY_BASE_URL": "https://your-btcpay-server.com",
"BTCPAY_API_KEY": "your-api-key",
"BTCPAY_STORE_ID": "your-store-id"
}
}
}
}Manual / pip install
pip install btcpay-mcp
# Set environment variables
export BTCPAY_BASE_URL="https://your-btcpay-server.com"
export BTCPAY_API_KEY="your-api-key"
export BTCPAY_STORE_ID="your-store-id"
# Run
btcpay-mcpOr with pip install from source:
git clone https://github.com/toplyrnarfur/btcpay-mcp.git
# or: git clone https://codeberg.org/toplyr-narfur/btcpay-mcp.git
cd btcpay-mcp
pip install -e ".[dev]"
python -m btcpay_mcp.serverRelated MCP server: Lightning Enable MCP
Tools
Tool | Description |
| BTCPay Server version, sync status, supported methods |
| List all stores accessible with the API key |
| Store configuration: currency, speed policy, checkout type |
| Enabled payment methods: on-chain, Lightning, etc. |
| Create a new invoice (amount, currency, order ID, description) |
| Invoice status, payments received, metadata, timing |
| List invoices with optional status filter |
| Current BTC/fiat exchange rate from BTCPay |
| List pull payments (donations, subscriptions, payroll) |
| Create pull payment for donations, subscriptions, or payroll |
| List actual payout transactions (claims against pull payments) |
| List payment requests (reusable payment links) |
| Create a payment request (persistent payment page) |
| Get payment request details and status |
| List configured webhooks for payment event notifications |
| Create a webhook for real-time payment notifications |
| Refund an invoice (creates pull payment) |
| Lightning node info: alias, version, peers, channels, balance |
| List Lightning channels with capacity, balances, status |
| On-chain wallet balance (confirmed/unconfirmed) |
| List on-chain wallet transactions |
Top Use Cases
Ask your AI agent:
Prompt | What it does |
"Create a $50 invoice for Order #1234" | Generates a BTC/Lightning invoice via BTCPay |
"Show me all unpaid invoices" | Lists pending invoices across stores |
"What payment methods does my store accept?" | Checks configured payment methods |
"What's the BTC/USD rate right now?" | Fetches current exchange rate |
"Show me the status of invoice inv_xxxx" | Retrieves full invoice details and payment status |
"Set up a $100/month donation pull payment" | Creates a pull payment for recurring donations |
"Create a payment request for my consulting service" | Creates a reusable payment link |
"Show me my Lightning node info and balance" | Fetches LN alias, channels, and balances |
"Check my on-chain wallet balance" | Gets confirmed/unconfirmed BTC wallet balance |
"Set up a webhook for invoice settlements" | Creates a webhook for real-time payment notifications |
"Refund invoice inv_xxxx" | Initiates a refund with configurable calculation method |
Configuration
Variable | Default | Description |
|
| Your BTCPay Server URL |
| (empty) | API key from BTCPay Server |
| (empty) | Default store ID for invoice operations |
Creating a BTCPay API Key
Navigate to your BTCPay Server instance
Go to Account → API Keys or Store Settings → API Keys
Create a new API key with appropriate permissions
Note the API key and your store ID
API Endpoints
All from the BTCPay Server Greenfield API v1:
GET /api/v1/server/info— server version and infoGET /api/v1/stores— list storesGET /api/v1/stores/{storeId}— store configurationGET /api/v1/stores/{storeId}/payment-methods— enabled payment methodsPOST /api/v1/stores/{storeId}/invoices— create invoiceGET /api/v1/stores/{storeId}/invoices— list invoicesGET /api/v1/stores/{storeId}/invoices/{invoiceId}— invoice detailsGET /api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods— payment addressesPOST /api/v1/stores/{storeId}/invoices/{invoiceId}/refund— refund invoiceGET /api/v1/stores/{storeId}/pull-payments— list pull paymentsPOST /api/v1/stores/{storeId}/pull-payments— create pull paymentGET /api/v1/stores/{storeId}/payouts— list payoutsGET /api/v1/stores/{storeId}/payment-requests— list payment requestsPOST /api/v1/stores/{storeId}/payment-requests— create payment requestGET /api/v1/stores/{storeId}/payment-requests/{id}— payment request detailsGET /api/v1/stores/{storeId}/webhooks— list webhooksPOST /api/v1/stores/{storeId}/webhooks— create webhookGET /api/v1/stores/{storeId}/lightning/{cryptoCode}/info— LN node infoGET /api/v1/stores/{storeId}/lightning/{cryptoCode}/balance— LN balanceGET /api/v1/stores/{storeId}/lightning/{cryptoCode}/channels— LN channelsGET /api/v1/stores/{storeId}/payment-methods/{pmId}/wallet— wallet balanceGET /api/v1/stores/{storeId}/payment-methods/{pmId}/wallet/transactions— wallet transactionsGET /api/v1/rates— exchange rates
How This Differs from Other Bitcoin MCP Servers
Feature | btcpay-mcp | bitcoin-mcp (Bortlesboat) |
Invoice creation | ✅ Yes | ❌ No |
Store management | ✅ Yes | ❌ No |
Payment lifecycle | ✅ Yes | ❌ No |
Pull payments | ✅ Yes | ❌ No |
Payment requests | ✅ Yes | ❌ No |
Webhooks | ✅ Yes | ❌ No |
Refunds | ✅ Yes | ❌ No |
Lightning node info | ✅ Yes | ❌ No |
Wallet management | ✅ Yes | ❌ No |
Exchange rates | ✅ Yes (BTCPay) | ✅ Yes (Satoshi API) |
Blockchain data | ❌ No | ✅ Yes (49 tools) |
Node RPC | ❌ No | ✅ Yes (optional) |
Merchant payments | ✅ Only option | ❌ No |
btcpay-mcp is complementary to blockchain data servers like bitcoin-mcp. Use both for complete Bitcoin coverage: blockchain data from bitcoin-mcp, payment processing from btcpay-mcp.
Run Tests
pip install -e ".[dev]"
pytest tests/ -vAll 77 tests pass with mock-based testing (no BTCPay instance needed).
Technical Details
Python 3.10+ compatible
FastMCP SDK (official Anthropic MCP Python SDK)
Authentication: Bearer token via
BTCPAY_API_KEYenvironment variableTransport: stdio (for Claude Desktop, Cursor, VS Code, Windsurf, etc.)
Default testnet: Points to
https://testnet.demo.btcpayserver.orgby default
License
MIT
Available Tools
21 toolscreate_invoiceA
Create a new BTCPay invoice.
Args: amount: Payment amount as a string (e.g., '0.001' or '10.00'). Precision is preserved because amounts are sent as strings. currency: Currency code (e.g., 'BTC', 'USD', 'EUR'). Default: 'BTC'. order_id: Optional order ID for tracking (stored in metadata). item_desc: Optional item description (stored in metadata).
Returns the invoice ID, status, checkout URL, and expiration time. Use the checkout URL to direct users to the payment page.
Inputs: amount (required), currency, order_id, item_desc. Returns: result
create_payment_requestA
Create a new payment request (reusable payment link).
Args: title: Title for the payment request. amount: Payment amount as a string (e.g., '0.001'). currency: Currency code (e.g., 'BTC', 'USD'). Default: 'BTC'. description: Optional description shown to payers. expiry_days: Days until expiration (0 = no expiry). Default: 0. allow_custom_amounts: Allow payers to set custom amounts. Default: False.
Returns the payment request ID and a payment link.
Inputs: title (required), amount (required), currency, description, +2 more. Returns: result
create_pull_paymentA
Create a new pull payment for donations, subscriptions, or payroll.
Args: name: Name/label for the pull payment. amount: Payment amount as a string (e.g., '0.01'). currency: Currency code (e.g., 'BTC', 'USD'). Default: 'BTC'. description: Optional description. auto_approve: Auto-approve claims without manual review. Default: False. expires_at: Optional expiration (ISO 8601, e.g., '2026-04-01T00:00:00Z').
Returns the pull payment ID, payment link, and configuration.
Inputs: name (required), amount (required), currency, description, +2 more. Returns: result
create_webhookA
Create a new webhook for real-time payment notifications.
Args: url: The URL to receive webhook POST requests. events: Comma-separated event types or 'all'. Common events: InvoiceSettled, InvoiceExpired, InvoiceInvalid, InvoiceReceivedPayment, InvoicePaymentSettled. Default: 'all'. secret: Optional secret for HMAC-SHA256 signature verification. automatic_redelivery: Auto-redeliver failed webhooks. Default: False.
Returns the webhook ID and configuration.
Inputs: url (required), events, secret, automatic_redelivery. Returns: result
get_exchange_rateA
Get the current BTCPay exchange rate for a currency pair.
Args: currency_pair: Currency pair in format 'BTC_USD', 'BTC_EUR', etc. Default: 'BTC_USD'.
Returns the current exchange rate from BTCPay's configured rate provider.
Inputs: currency_pair. Returns: result
get_invoiceA
Get details and status of a BTCPay invoice.
Args: invoice_id: The invoice ID (UUID string returned by create_invoice).
Returns invoice status, amounts, payments received, and timing information. Status values: New, Processing, Settled, Expired, Invalid.
Inputs: invoice_id (required). Returns: result
get_lightning_infoA
Get Lightning node info and balance for the store.
Args: crypto_code: Crypto code (e.g., 'BTC', 'BTCTest'). Default: 'BTC'.
Returns node alias, version, channel count, peer count, and balances.
Inputs: crypto_code. Returns: result
get_payment_requestA
Get details of a specific payment request.
Args: payment_request_id: The payment request ID.
Returns payment request details including title, amount, status, and generated invoice count.
Inputs: payment_request_id (required). Returns: result
get_server_infoA
Get BTCPay Server version and system information.
Returns the server version, supported features, and system status. Use this to verify connectivity and check what features are available.
No store ID or API key required for this endpoint.
Inputs: no named parameters. Returns: result
get_store_infoA
Get detailed information about a specific BTCPay store.
Args: store_id: Store ID (optional — uses BTCPAY_STORE_ID env var if empty).
Returns store configuration including default currency, speed policy, payment tolerance, and checkout settings.
Inputs: store_id. Returns: result
get_store_payment_methodsA
List payment methods enabled for a BTCPay store.
Args: store_id: Store ID (optional — uses BTCPAY_STORE_ID env var if empty).
Returns enabled payment methods including on-chain (BTC, LTC, etc.) and Lightning, with network details and connection status.
Inputs: store_id. Returns: result
get_wallet_balanceA
Get wallet balance for a payment method (on-chain wallet).
Args: payment_method_id: Payment method ID (e.g., 'BTC' for the store's default BTC wallet). Leave empty to use the first BTC-like method.
Returns confirmed/unconfirmed balance for the wallet.
Inputs: payment_method_id. Returns: result
list_invoicesA
List invoices from the default BTCPay store.
Args: status_filter: Optional status to filter by: 'New', 'Processing', 'Settled', 'Expired', or 'Invalid'. Leave empty for all.
Returns a list of recent invoices with IDs, amounts, statuses, and dates.
Inputs: status_filter. Returns: result
list_lightning_channelsA
List Lightning channels for the store's Lightning node.
Args: crypto_code: Crypto code (e.g., 'BTC', 'BTCTest'). Default: 'BTC'.
Returns channel list with remote node, capacity, balances, and status.
Inputs: crypto_code. Returns: result
list_payment_requestsA
List all payment requests (reusable payment links) for the store.
Payment requests are persistent payment pages that generate invoices on demand — useful for recurring billing, tipping, and donations.
Inputs: no named parameters. Returns: result
list_payoutsA
List all payouts (actual payout transactions) for the store.
Payouts are claims against pull payments. Each payout represents money moved to a destination (wallet address, Lightning node, etc.).
Inputs: no named parameters. Returns: result
list_pull_paymentsA
List all pull payments (donations, subscriptions, payroll) for the store.
Args: include_archived: Whether to include archived pull payments. Default: False.
Pull payments allow you to set up payment links that others can claim. Common uses: donations, recurring payouts, payroll.
Inputs: include_archived. Returns: result
list_storesA
List all BTCPay Server stores accessible with the current API key.
Returns store IDs, names, and websites. Use a store ID from this list as the storeId parameter for invoice operations.
Inputs: no named parameters. Returns: result
list_wallet_transactionsA
List on-chain wallet transactions for a payment method.
Args: payment_method_id: Payment method ID (e.g., 'BTC'). Leave empty to use 'BTC' by default.
Returns a list of wallet transactions with amounts, confirmations, and statuses.
Inputs: payment_method_id. Returns: result
list_webhooksA
List all webhooks configured for the store.
Webhooks notify your application about payment events (invoice created, settled, expired, etc.) in real time.
Inputs: no named parameters. Returns: result
refund_invoiceA
Refund a BTCPay invoice.
Args: invoice_id: The invoice ID to refund. refund_variant: Refund calculation method. Options: 'RateThen' (use rate at time of invoice, default), 'CurrentRate', 'Fiat' (refund exact fiat amount), 'OverpaidAmount' (refund only overpayment). payout_method_id: Optional payout method ID for the refund destination. subtract_percentage: Percentage to subtract from refund (0-100). Default: 0.
Returns the refund result with pull payment ID and amount.
Inputs: invoice_id (required), refund_variant, payout_method_id, subtract_percentage. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct BTCPay resource or operation (invoices vs. payment requests vs. pull payments are clearly differentiated). No functional overlap exists between the 21 tools, and descriptions clarify domain-specific terminology.
Strict adherence to verb_noun snake_case convention throughout (create_invoice, get_invoice, list_invoices). Pluralization is consistent (list_* for collections, get_* for single items), with no mixing of naming styles.
At 21 tools, this exceeds the typical ideal range but remains reasonable for a comprehensive payment processor API covering on-chain, Lightning, webhooks, and store management. Each tool serves a distinct purpose without redundancy.
Core payment acceptance workflows are fully covered (invoice lifecycle, payment requests, webhooks, refunds). Minor gaps exist in resource management operations (missing update/delete for webhooks and payment requests, no create_payout for arbitrary sends).
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server for BTCPayServer integration, providing tools for payment processing, store management, user administration, webhook handling and more with full API coverage.368 npm3MIT
- AlicenseAqualityBmaintenanceMCP server that enables AI agents to make autonomous Bitcoin Lightning Network payments using the L402 protocol. Agents can pay for API access, purchase resources, and complete transactions without human intervention — invoice comes in, sats go out, done.179MIT
- AlicenseAqualityDmaintenanceMCP server that gives AI agents Lightning payments, L402 API access, trust verification, and service discovery.116 npmMIT

satsrail-mcpofficial
AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to accept Bitcoin Lightning payments. It allows agents to create orders, generate invoices, check payment status, and manage the full SatsRail merchant API through natural language.MIT