BTCPay Server MCP server for AI agents

Live

API KEY

PAYMENTS

Accounting & Finance

BTCPay Server gives your agent payments operations in your BTCPay Server store: create and refund invoices, manage payment requests, approve payouts, and read wallet, Lightning, and webhook data.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
BTCPay Server
agent · Acme Q3
Run
Create a 49 USD invoice for order 1042.
S
btcpay_invoice_create
390ms
Payments agent
Created a 49 USD invoice for order 1042 in the store. The invoice is new and awaiting payment.
Sources: BTCPay Server store, 1 invoice
btcpay
1 invoice
18:29
Message Claude...

Tools your payments agent reaches for on BTCPay Server, scoped per user.

CALL ANY TOOL
60 tools for payments in BTCPay Server: create, update, and refund invoices, manage payment requests and payouts, read wallet and Lightning data, run reports, and manage stores and webhooks.
btcpay_app_sales_get
Get app sales
Get sales statistics for a Point of Sale or Crowdfund app over recent days. Returns the total sales count and a per-day series. Use it to report app activity.
Parameters
Name
Type
Required
Description
app_id
string
Required
App ID. Example: 3Ki9vC6eF2ZsEXbXV2tQWQ8d1Sp.
number_of_days
number
Optional
How many of the last days. Defaults to 7. Example: 7.
btcpay_apps_list
List apps
btcpay_invoice_archive
Archive invoice
btcpay_invoice_create
Create invoice
btcpay_invoice_payment_methods_get
Get invoice payment methods
btcpay_invoice_refund
Refund invoice
btcpay_invoice_unarchive
Invoice unarchive
btcpay_invoice_update
Update invoice
btcpay_lightning_invoice_get
Get lightning invoice
btcpay_lightning_payments_list
List lightning payments
btcpay_payment_methods_list
List payment methods
btcpay_payment_request_archive
Archive payment request
btcpay_payment_request_create
Create payment request
btcpay_payout_approve
Approve payout
btcpay_payout_cancel
Cancel payout
btcpay_payout_get
Get payout
btcpay_payouts_list
List payouts
btcpay_pos_app_create
Create pos app
btcpay_pull_payments_list
List pull payments
btcpay_report_run
Run report
btcpay_server_info_get
Get server info
btcpay_store_create
Create store
btcpay_store_delete
Delete store
btcpay_store_email_send
Send store email
btcpay_store_update
Update store
btcpay_store_user_add
Add store user
btcpay_store_user_remove
Remove store user
btcpay_stores_list
List stores
btcpay_wallet_overview_get
Get wallet overview
btcpay_webhook_deliveries_list
List webhook deliveries

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// BTCPay Server tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["btcpay"], toolNames: [
    "btcpay_invoices_list",
    "btcpay_invoice_create",
    "btcpay_wallet_overview_get"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List my latest invoices, create a 49 USD invoice for order 1042, and show the wallet overview" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["btcpay"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List my latest invoices, create a 49 USD invoice for order 1042, and show the wallet overview" }],
  tools,
});

// Execute the tool call with the user's vaulted BTCPay Server API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["btcpay"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List my latest invoices, create a 49 USD invoice for order 1042, and show the wallet overview" }],
  tools,
});

// Tool call runs with the user's vaulted BTCPay Server API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["btcpay"] }, pageSize: 100,
});

const agent = new Agent({
  name: "payments_agent",
  model: "gemini-2.5-pro",
  instruction: "BTCPay Server tools scoped to this user",
  tools,
});

await agent.run("List my latest invoices, create a 49 USD invoice for order 1042, and show the wallet overview");
Try these prompts
Copy any prompt into your agent. Each maps directly to a BTCPay Server tool. Click to copy, paste into your agent, done.
Invoices
Copy the prompt
Copied
List my latest invoices.
Copy the prompt
Copied
Create a 49 USD invoice for order 1042.
Copy the prompt
Copied
Show the payment methods on this invoice.
Payment requests and payouts
Copy the prompt
Copied
List my open payment requests.
Copy the prompt
Copied
Show the pending payouts for this store.
Copy the prompt
Copied
Create a pull payment for this vendor.
Wallet and Lightning
Copy the prompt
Copied
Show the wallet overview for this store.
Copy the prompt
Copied
List recent wallet transactions.
Copy the prompt
Copied
Show my Lightning balance.
SEE HOW AUTH WORKS
Each user connects their own BTCPay Server API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
BTCPay Server
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
BTCPay Server
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
BTCPay Server
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
BTCPay Server
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other accounting and finance connectors.
GTM and RevOps Teams
Revenue forecast commentary
Pulls open pipeline from Salesforce and HubSpot, calculates coverage against quota, flags at-risk stages, posts commentary to Slack, and logs every snapshot to Google Sheets.
GTM and RevOps Teams
CRM AI agent
Reads the Granola transcript after every call, extracts next steps and updates the HubSpot record, drafts the follow-up in Gmail, and confirms in Slack, all on the rep's own delegated OAuth.
Test other agents
See the same per-user auth pattern across other accounting and finance connectors.
GTM
Revenue forecast agent
Score pipeline coverage against quota across Salesforce and HubSpot, post forecast commentary to Slack, log snapshots to Sheets.
GTM
CRM AI agent
Turn each Granola call transcript into a HubSpot record update, a drafted Gmail follow-up, and a Slack recap.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared BTCPay Server API key looks fine in a demo. In production every invoice and payout looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
BTCPay Server today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access BTCPay Server as the user or through a shared key?
As the user. Each user connects their own BTCPay Server API key once, and Scalekit sends it with every call. Audit logs attribute every invoice, payout, and store change to that user, not a shared service account.
Where is the BTCPay Server API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in BTCPay Server?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the get and list tools without btcpay_invoice_refund, btcpay_payout_approve, or btcpay_store_delete. Scalekit also enforces scope checks before every API call.
What happens when a user revokes BTCPay Server access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent move funds in BTCPay Server?
Only if you expose those tools. btcpay_invoice_refund refunds an invoice, btcpay_payout_approve approves a payout, and btcpay_payment_request_pay pays a payment request. Leave them out of toolNames to keep the agent to reading invoices, wallets, and reports.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""btcpay"": {
""url"": ""https://mcp.scalekit.com/btcpay"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.btcpay]
url = ""https://mcp.scalekit.com/btcpay""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""btcpay"": {
""url"": ""https://mcp.scalekit.com/btcpay"",
""type"": ""http""
}
}
}