btcpayserver-mcp
This server provides a Model Context Protocol (MCP) interface for BTCPayServer, enabling AI assistants to interact with the complete BTCPayServer API ecosystem through a simplified toolset.
Core Capabilities:
Explore Services: Use
get_service_infoto discover available BTCPayServer services (invoices, payment requests, stores, users, webhooks, etc.)Understand Parameters: Use
get_method_infoto get detailed parameter requirements, descriptions, and examples for any service methodExecute Operations: Use
btcpay_requestto perform any BTCPayServer API operation, including:Payment Processing: Create and manage Bitcoin invoices, payment requests, and Lightning Network transactions
Store Management: Configure stores, payment methods, wallets, payout processors, email settings, and exchange rates
User Administration: Manage user accounts, permissions, API keys, and OAuth authorization
Integration & Automation: Handle webhooks, notifications, apps, and pull payments for real-time event handling
System Monitoring: Query server status, version, and configuration details
Key Features:
Compatible with BTCPayServer v1.7.0 and later
Works seamlessly with Claude Desktop and other MCP-compatible AI assistants
Robust error handling with clear messages for configuration, validation, and authentication issues
Follow a three-step workflow: discover services → understand parameters → execute operations
Provides comprehensive integration with BTCPayServer for Bitcoin payment processing, including invoice creation and management, payment request handling, Lightning Network operations, store management, webhook configuration, and user administration through BTCPayServer's complete API ecosystem.
Click on "Install 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., "@btcpayserver-mcpcreate a new invoice for $25.99"
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.
BTCPayServer Model Context Protocol Server (Beta)
A 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.
Tool Reference
The BTCPayServer MCP Server provides a streamlined set of tools for interacting with BTCPayServer APIs:
Tool | Description | Primary Use |
| Discover methods available for a service | Exploration and discovery |
| Get detailed parameter requirements | Request preparation |
| Execute API calls to BTCPayServer | Performing operations |
Related MCP server: Square MCP Server
Integration with AI Assistants
Claude Desktop Integration
For Claude Desktop integration, add this configuration to your claude_desktop_config.json:
{
"mcpServers": {
"btcpayserver-mcp": {
"command": "node",
"args": ["path/to/btcpayserver-mcp/dist/index.js"],
"env": {
"BTCPAY_BASE_URL": "https://your-btcpay-instance.com",
"BTCPAY_API_KEY": "your_api_key_here",
"BTCPAY_STORE_ID": "your_default_store_id"
}
}
}
}Service Catalog
BTCPayServer MCP provides access to BTCPayServer's complete API ecosystem. Check out the BTCPayServer API Documentation for detailed information about each service:
Payment Services
Service | Description |
| Create, manage, and track Bitcoin invoices for payments |
| Create payment requests for donations or recurring billing |
| Manage internal Lightning Network operations |
| Store-level Lightning Network configurations |
| Lightning Address management and setup |
Store Management
Service | Description |
| Store creation, configuration, and management |
| Configure and manage store email settings and SMTP |
| Manage available payment methods for stores |
| Configure automated payout processing |
| Manage and process store payouts |
| Exchange rate configuration and management |
| Store user access and permissions management |
| Store wallet management and operations |
User & Access Management
Service | Description |
| User account management and administration |
| API key creation and permission management |
| OAuth and authorization flow management |
Integration & Automation
Service | Description |
| Real-time event notifications and webhook management |
| System notifications and alerts |
| BTCPayServer app integrations and plugins |
| Pull payment requests and refund management |
System
Service | Description |
| Server status, version, and configuration information |
Usage Pattern
For optimal interaction with the BTCPayServer API through MCP:
1. Discover: Use get_service_info to explore available methods
get_service_info(serviceName: "invoices")2. Understand: Use get_method_info to learn parameter requirements
get_method_info(serviceName: "invoices", methodName: "create")3. Execute: Use btcpay_request to perform the operation
btcpay_request(serviceName: "invoices", methodName: "create", parameters: {storeId: "your-store-id", amount: "10.00", currency: "USD"})Installation
Clone this repository:
git clone <repository-url>
cd btcpayserver-mcpInstall dependencies:
npm installBuild the project:
npm run buildConfiguration
The MCP server requires the following environment variables:
BTCPAY_BASE_URL- Your BTCPayServer instance URL (e.g.,https://btcpay.example.com)BTCPAY_API_KEY- Your BTCPayServer API keyBTCPAY_STORE_ID- (Optional) Default store ID for operations
Setting up BTCPayServer API Key
Log into your BTCPayServer instance
Go to Account → Manage Account → API Keys
Click Generate Key
Select the required permissions for your use case:
Store management:
btcpay.store.canmodifystoresettingsPayment requests:
btcpay.store.cancreateinvoiceUser management:
btcpay.user.canmodifyprofileWebhooks:
btcpay.store.webhooks.canmodifywebhooksetc..
Copy the generated API key
Environment Setup
Create a .env file in your project root:
BTCPAY_BASE_URL=https://your-btcpay-instance.com
BTCPAY_API_KEY=your_api_key_here
BTCPAY_STORE_ID=your_default_store_idOr set environment variables directly:
export BTCPAY_BASE_URL=https://your-btcpay-instance.com
export BTCPAY_API_KEY=your_api_key_here
export BTCPAY_STORE_ID=your_default_store_idUsage
Running the MCP Server
npm startFor development:
npm run devDevelopment and Debugging
Using MCP Inspector: The MCP Inspector provides a visual interface for testing:
# Build the project
npm run build
# Start the inspector with the BTCPayServer MCP Server
npx @modelcontextprotocol/inspector node dist/index.jsDevelopment Workflow:
Clone the repository
Install dependencies:
npm installStart development mode:
npm run buildRun the server:
node dist/index.jsTest your changes using the MCP Inspector
The MCP server provides comprehensive error handling:
Configuration Errors: Missing environment variables
API Errors: BTCPayServer API communication issues
Validation Errors: Invalid input parameters
Authentication Errors: Invalid or expired API keys
All errors are properly formatted and returned with descriptive messages.
Development
Project Structure
src/
├── index.ts # Main MCP server implementation
├── services/ # BTCPayServer service implementations
│ ├── base-service.ts # Base service class
│ ├── invoices.ts # Invoice management
│ ├── payment-requests.ts # Payment request handling
│ ├── stores.ts # Store management
│ ├── webhooks.ts # Webhook management
│ └── ... # Other service modules
├── utils/
│ └── btcpay-client.ts # BTCPayServer API client
└── types.ts # TypeScript type definitionsBuilding
npm run buildRunning in Development
npm run devSecurity Considerations
API Key Security: Never commit API keys to version control
Environment Variables: Use secure environment variable management
Webhook Secrets: Always use webhook secrets for verification
HTTPS: Ensure BTCPayServer instance uses HTTPS
Permissions: Use principle of least privilege for API key permissions
BTCPayServer Compatibility
This MCP server is compatible with BTCPayServer v1.7.0 and later. It uses the official BTCPayServer REST API v1.
Contributing
Fork the repository
Create a feature branch
Commit your changes
Push to the branch
Create a Pull Request
License
MIT License - see LICENSE file for details.
Support
For issues and questions:
Check the BTCPayServer documentation
Review the API reference
Open an issue in this repository
Help us improve this MCP
Note: Some methods might not be working properly. Please help us by reporting requirements and making pull requests to improve them. Also, to keep it up with the latest API version, we need to continue updating it.
Available Tools
3 toolsbtcpay_requestC
Execute a BTCPayServer API operation using the service-based approach.
| Name | Required | Description | Default |
|---|---|---|---|
| serviceName | Yes | Service name (e.g., "payment-requests", "invoices", "lightning") | |
| methodName | Yes | Method name (e.g., "create", "get", "list", "delete") | |
| parameters | No | Parameters for the method (use get_method_info to see required parameters) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool executes API operations but doesn't disclose critical traits like authentication requirements, rate limits, error handling, or whether it performs read/write operations. This leaves significant gaps in understanding how the tool behaves in practice.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that clearly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, though it could be slightly more informative without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a generic API tool with three parameters, no annotations, and no output schema, the description is incomplete. It fails to explain what the tool returns, how errors are handled, or provide context on the service-based approach, making it inadequate for effective agent use without additional documentation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the input schema already documents the three parameters (serviceName, methodName, parameters) with descriptions. The description adds no additional meaning beyond what the schema provides, such as examples of common use cases or parameter interactions, resulting in a baseline score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool executes BTCPayServer API operations using a service-based approach, which provides a general purpose but lacks specificity about what resources or actions it handles. It doesn't distinguish from sibling tools like get_method_info or get_service_info, making it somewhat vague about its exact function beyond being a generic API caller.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. The description mentions a service-based approach but doesn't explain when to choose this over other methods or tools, leaving the agent without clear usage context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_method_infoC
Get detailed parameter requirements and examples for a specific service method.
| Name | Required | Description | Default |
|---|---|---|---|
| serviceName | Yes | Service name (e.g., "payment-requests", "invoices", "lightning") | |
| methodName | Yes | Method name (e.g., "create", "get", "list", "delete") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions retrieving 'detailed parameter requirements and examples,' implying a read-only operation, but fails to specify if this requires authentication, rate limits, or what the output format looks like (e.g., structured data or examples). This leaves gaps in understanding the tool's behavior and constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to parse quickly. Every part of the sentence contributes to understanding the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (2 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain what the output includes (e.g., parameter types, examples, or error cases), nor does it address behavioral aspects like authentication needs. For a tool that retrieves detailed information, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, clearly documenting both required parameters ('serviceName' and 'methodName') with examples. The description adds minimal value beyond this, as it only reiterates the general purpose without providing additional syntax, format details, or context for parameter usage. Baseline 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Get') and resource ('detailed parameter requirements and examples for a specific service method'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_service_info' or 'btcpay_request', which might have overlapping or related functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It lacks context on prerequisites, such as needing prior knowledge of service names, or comparisons to sibling tools like 'get_service_info', which might offer broader service information. This omission leaves the agent without clear usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_service_infoB
Discover available BTCPayServer services and their methods. Use this to explore what operations are available.
| Name | Required | Description | Default |
|---|---|---|---|
| serviceName | No | Optional: Get info for a specific service (e.g., "payment-requests", "invoices", "lightning"). If not provided, lists all services. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'discovers' and 'explores', which suggests a read-only operation, but doesn't explicitly state whether it's safe, whether it requires authentication, what format the output returns, or any rate limits. This leaves significant behavioral gaps for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with two clear sentences that directly state the purpose and usage without any wasted words. It's front-loaded with the core functionality and efficiently communicates essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is reasonably complete for a discovery tool. However, it lacks details about output format and doesn't fully compensate for the absence of annotations, leaving some contextual gaps for an agent trying to use this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the schema already fully documents the single optional parameter. The description doesn't add any additional meaning about parameters beyond what's in the schema, but since schema coverage is high, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with the verb 'discover' and resource 'available BTCPayServer services and their methods', making it easy to understand what the tool does. However, it doesn't explicitly distinguish this from its sibling tools (btcpay_request, get_method_info), which would be needed for a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some usage guidance with 'Use this to explore what operations are available', which implies this is for discovery purposes. However, it doesn't explicitly state when to use this tool versus its siblings (btcpay_request, get_method_info) or provide any exclusion criteria, leaving room for ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
- First observed
btcpay_request - First observed
get_method_info - First observed
get_service_info
TDQS
Each tool has a clearly distinct purpose: btcpay_request executes API operations, get_method_info provides parameter details for specific methods, and get_service_info discovers available services. There is no overlap in functionality, and an agent can easily distinguish between them based on their descriptions.
The tool names follow a consistent verb_noun pattern throughout: btcpay_request, get_method_info, and get_service_info. All use snake_case with clear action-object naming, making them predictable and easy to understand.
With only 3 tools, the server feels thin for a BTCPayServer integration, which typically involves multiple operations like creating invoices, managing stores, or handling payments. While the tools provide a foundation for exploration and execution, the count is borderline low for the apparent scope of interacting with a payment processing platform.
The tool surface is significantly incomplete for a BTCPayServer domain. It lacks core operations such as creating invoices, retrieving payment details, managing stores, or handling webhooks. The tools focus on discovery and generic execution, but without direct methods for common workflows, agents will likely encounter dead ends or inefficiencies.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
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 for Lemon Squeezy — stores, products, orders, subscriptions, license keys.
Related MCP Servers
- AlicenseDqualityNot gradedmaintenanceA comprehensive MCP server that provides sophisticated tools for interacting with PocketBase databases. This server enables advanced database operations, schema management, and data manipulation through the Model Context Protocol (MCP).1450270MIT
- AlicenseBqualityFmaintenanceA server that enables interaction with Square's API via Goose, supporting queries for locations, customers, and more with context preservation and MCP-compliant responses.124MIT
- FlicenseNot gradedqualityDmaintenanceA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI agents to manage merchant payment processing through the BTCPay Server Greenfield REST API. It supports tools for creating invoices, managing stores, tracking payments, and performing Lightning Network operations.21MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abhijay007/btcpayserver-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server