Skip to main content
Glama

btcpay_request

Execute BTCPayServer API operations for payment processing, invoice management, and store administration using service-based methods.

Instructions

Execute a BTCPayServer API operation using the service-based approach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNameYesMethod name (e.g., "create", "get", "list", "delete")
parametersNoParameters for the method (use get_method_info to see required parameters)
serviceNameYesService name (e.g., "payment-requests", "invoices", "lightning")

Implementation Reference

  • src/index.ts:118-139 (registration)
    Registration of the 'btcpay_request' tool in the MCP ListTools response, including its name, description, and input schema.
    { name: 'btcpay_request', description: 'Execute a BTCPayServer API operation using the service-based approach.', inputSchema: { type: 'object', properties: { serviceName: { type: 'string', description: 'Service name (e.g., "payment-requests", "invoices", "lightning")' }, methodName: { type: 'string', description: 'Method name (e.g., "create", "get", "list", "delete")' }, parameters: { type: 'object', description: 'Parameters for the method (use get_method_info to see required parameters)' } }, required: ['serviceName', 'methodName'] } }
  • Handler for the 'btcpay_request' tool: retrieves the specified service from the registry and executes the requested method with given parameters, returning success or error response.
    case 'btcpay_request': { const serviceName = args?.serviceName as string; const methodName = args?.methodName as string; const parameters = args?.parameters as Record<string, any> || {}; const service = serviceRegistry.getService(serviceName); if (!service) { return { content: [ { type: 'text', text: `Service "${serviceName}" not found.\n\nAvailable services: ${serviceRegistry.getServiceNames().join(', ')}` } ] }; } try { const result = await service.executeMethod(methodName, parameters); return { content: [ { type: 'text', text: `**${serviceName}.${methodName}** executed successfully:\n\n\`\`\`json\n${JSON.stringify(result, null, 2)}\n\`\`\`` } ] }; } catch (error) { return { content: [ { type: 'text', text: `**Error executing ${serviceName}.${methodName}:**\n\n${error instanceof Error ? error.message : String(error)}\n\nUse get_method_info to check parameter requirements.` } ] }; } }

Latest Blog Posts

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