mercury-invoicing-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MERCURY_API_KEY | Yes | Your Mercury API token. Get it from Mercury Settings → API Tokens. For sandbox, use a token starting with 'mercury_sandbox_'. | |
| MERCURY_MCP_DRY_RUN | No | Set to 'true' to enable dry-run mode, where write tools simulate actions without calling the Mercury API. | |
| MERCURY_API_BASE_URL | No | Override the base URL for the Mercury API (e.g., for a self-hosted proxy). Default is auto-detected based on the token (production or sandbox). | |
| MERCURY_MCP_AUDIT_LOG | No | Absolute path to an audit log file (e.g., '/var/log/mercury-mcp-audit.log'). Enables structured JSON logging of write calls with sensitive fields redacted. | |
| MERCURY_MCP_STATE_DIR | No | Override the directory for persisting rate-limit state (default is '~/.mercury-mcp/'). | |
| MERCURY_MCP_RATE_LIMIT_DISABLE | No | Set to 'true' to disable all rate limiting (not recommended). | |
| MERCURY_MCP_RATE_LIMIT_payments | No | Override rate limit for payments bucket (e.g., '15/day,300/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_invoices_write | No | Override rate limit for invoices_write bucket (e.g., '20/day,400/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_recipients_add | No | Override rate limit for recipients_add bucket (e.g., '5/day,60/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_customers_write | No | Override rate limit for customers_write bucket (e.g., '5/day,100/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_invoices_cancel | No | Override rate limit for invoices_cancel bucket (e.g., '5/day,50/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_webhooks_create | No | Override rate limit for webhooks_create bucket (e.g., '3/day,20/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_webhooks_delete | No | Override rate limit for webhooks_delete bucket (e.g., '3/day,20/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_webhooks_update | No | Override rate limit for webhooks_update bucket (e.g., '3/day,20/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_internal_transfer | No | Override rate limit for internal_transfer bucket (e.g., '5/day,100/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_recipients_update | No | Override rate limit for recipients_update bucket (e.g., '3/day,30/month'). Must specify both daily and monthly caps. | |
| MERCURY_MCP_RATE_LIMIT_transactions_update | No | Override rate limit for transactions_update bucket (e.g., '100/day,1000/month'). Must specify both daily and monthly caps. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mercury_list_accountsA | List all deposit bank accounts in your Mercury workspace (checking, savings, treasury). USE WHEN: enumerating Mercury bank accounts before drilling into transactions, balances, or statements. Typically the first call when you have an account ID in hand or need one. DO NOT USE: for IO Credit card accounts (use RETURNS: |
| mercury_get_accountA | Retrieve details for a specific Mercury deposit account by ID. USE WHEN: fetching the full detail of a single account whose ID is already known (typically from DO NOT USE: to enumerate accounts (use RETURNS: |
| mercury_list_cardsA | List physical and virtual cards attached to a Mercury account. USE WHEN: enumerating cards (debit, virtual debit, IO Credit) issued against an account — for spend audits, freezing review, or cardholder lookups. DO NOT USE: to list IO Credit transactions (use RETURNS: |
| mercury_list_credit_accountsA | List Mercury IO Credit card accounts (charge cards, distinct from deposit accounts). USE WHEN: enumerating IO Credit accounts to find their balance, statement closing date, or to feed an ID into DO NOT USE: for deposit accounts (checking/savings/treasury) — use RETURNS: |
| mercury_list_credit_transactionsA | List transactions on a Mercury IO Credit card account, including pending (not-yet-settled) card authorisations. USE WHEN: auditing IO Credit card spend, reconciling a statement, or building a card-level transaction view. Wraps DO NOT USE: for deposit-account transactions (use RETURNS: |
| mercury_list_transactionsA | List transactions for a Mercury deposit account, with optional filters (date range, status, search). USE WHEN: auditing deposit-account activity, reconciling a statement, or building a per-account ledger view. Filters server-side: DO NOT USE: for IO Credit transactions (use RETURNS: |
| mercury_get_transactionA | Retrieve a specific transaction by ID for a Mercury deposit account. USE WHEN: fetching the full detail of one transaction whose ID is already known (typically from DO NOT USE: to enumerate transactions (use RETURNS: |
| mercury_send_moneyA | Send money from a Mercury account to an external recipient via ACH, wire, or check. REAL FUNDS LEAVE YOUR ACCOUNT. USE WHEN: paying a vendor / contractor / counterparty whose DO NOT USE: to move money between your own Mercury accounts (use SIDE EFFECTS: moves real money out of the account. Whether the payment executes immediately or queues for approval depends entirely on your Mercury workspace's approval policy (Settings → Approvals on app.mercury.com) — the MCP cannot enforce this; Mercury does. On a $0-threshold workspace every send waits for sign-off; on a permissive workspace small payments may settle without re-prompting. Wires are usually irreversible once executed. Idempotent via RETURNS: |
| mercury_update_transactionA | Update a transaction's internal note or category (no money movement). USE WHEN: tagging a transaction with a category for bookkeeping, or attaching an internal memo. Send DO NOT USE: to change the amount, counterparty, or status — those are immutable post-execution. Mercury endpoint is SIDE EFFECTS: overwrites the note / category on Mercury's side. Persistent. Audit log on Mercury records the change. No effect on the booked transaction itself or on the counterparty. RETURNS: |
| mercury_create_internal_transferA | Move money between two of your own Mercury accounts (e.g. Checking → Savings). Funds stay inside your organisation. USE WHEN: rebalancing cash between your own Mercury accounts — sweeping idle deposits to Treasury, funding a sub-account before issuing cards, etc. Both accounts must belong to your workspace. DO NOT USE: to send money to an external counterparty (use SIDE EFFECTS: moves real money between two accounts you own. Settles immediately, no approval workflow because no external recipient is involved. Persistent ledger entries on both sides. Idempotent via RETURNS: |
| mercury_request_send_moneyA | Request to send money — Mercury creates a pending approval request that a human must approve before any funds move. ALWAYS creates an approval request, regardless of workspace policy. USE WHEN: submitting an outbound payment that should always wait for human sign-off — for safety, audit, or because workspace policy demands it. Pairs naturally with the "submit, then wait for approver" workflow. DO NOT USE: when you intend to transfer between your own accounts (use SIDE EFFECTS: creates a pending approval request on Mercury — no money has moved at this point. A human approver must sign off in the Mercury web/mobile app. Once approved, Mercury executes the underlying ACH / wire / check. Idempotent via RETURNS: |
| mercury_list_recipientsA | List all payment recipients (counterparties for outbound ACH/wire/check) in your Mercury workspace. USE WHEN: enumerating recipients before sending money — need a DO NOT USE: for AR customers (use RETURNS: |
| mercury_update_recipientA | Update an existing payment recipient (legal name, nickname, contact emails, default payment method). USE WHEN: amending a recipient's contact info or default payment method after creation. Useful for re-routing future payments to a recipient via a different method (e.g. ACH → wire) without recreating it. DO NOT USE: to change the bank account number / routing number — that requires a fresh recipient (security policy on Mercury's side). Use SIDE EFFECTS: writes the recipient record on Mercury. Persistent. Only the fields you pass are changed. Mercury endpoint is RETURNS: |
| mercury_add_recipientA | Add a new payment recipient (a counterparty you can later send money to via ACH/wire/check). USE WHEN: onboarding a new vendor, contractor, or other payee before sending money. The returned DO NOT USE: for AR customers (use SIDE EFFECTS: writes a new recipient to Mercury. Persistent. Idempotent via RETURNS: |
| mercury_list_statementsA | List monthly statements for a Mercury deposit account. Each statement has a downloadable PDF URL. USE WHEN: fetching the URL of a past statement (e.g. for accounting export, audit, or sharing with a CPA). The PDF URL is short-lived — re-fetch it shortly before download. DO NOT USE: for IO Credit account statements (Mercury exposes them only via the dashboard, not the API). For Treasury statements use RETURNS: |
| mercury_get_treasuryA | Retrieve Mercury Treasury account information (balance, current yield, eligibility, etc.). USE WHEN: checking treasury cash balance or yield for cash-management decisions, or to confirm the workspace has Treasury enabled. DO NOT USE: for deposit accounts (use RETURNS: |
| mercury_list_treasury_transactionsA | List transactions for a Mercury Treasury account (sweeps, dividend accruals, etc.). USE WHEN: auditing Treasury cash flows, reconciling yield accruals, or building a Treasury-only ledger view. DO NOT USE: for deposit-account transactions (use RETURNS: |
| mercury_list_treasury_statementsA | List monthly statements for a Mercury Treasury account. USE WHEN: fetching the URL of a past Treasury statement for tax/audit export. PDF URL is short-lived — fetch it shortly before download. DO NOT USE: for deposit-account statements (use RETURNS: |
| mercury_list_categoriesA | List transaction categories available in your Mercury workspace (e.g. Office Supplies, Meals, Travel). USE WHEN: discovering valid DO NOT USE: to list transactions in a category (use RETURNS: |
| mercury_get_organizationA | Retrieve information about your Mercury organization (legal name, EIN, registered address, etc.). USE WHEN: fetching the workspace's legal identity for invoice generation, tax documents, or to confirm which organization the API token is bound to. DO NOT USE: for per-account info (use RETURNS: |
| mercury_list_invoicesA | List invoices in your Mercury workspace, with cursor-based pagination. USE WHEN: enumerating invoices for an AR audit, finding the ID of an invoice to update/cancel, or building a dunning report. Use DO NOT USE: for one invoice whose ID is known (prefer RETURNS: |
| mercury_get_invoiceA | Retrieve a specific invoice by ID, including line items, status, and the payment URL. USE WHEN: fetching the full detail of one invoice (line items, current status, balance due, payment URL) whose ID is already known. DO NOT USE: to enumerate invoices (use RETURNS: |
| mercury_create_invoiceA | Create a new invoice (one-shot or to be sent recurrently). Requires AR write scope. USE WHEN: billing a customer that already exists in Mercury ( DO NOT USE: when the customer does not exist yet (call SIDE EFFECTS: writes a new invoice to Mercury. Persistent. With RETURNS: |
| mercury_update_invoiceA | Update an existing invoice. Pass only the fields you want to change. USE WHEN: amending an outstanding invoice (line items, due date, memo, PO number) before the customer pays. The MCP fetches the current invoice and merges your changes before submitting — Mercury's update endpoint requires the full payload despite the API docs implying PATCH. DO NOT USE: to cancel an invoice (use SIDE EFFECTS: overwrites the invoice on Mercury's side. The customer-facing payment URL stays the same. If the invoice was already emailed, the customer is NOT re-notified of the change — communicate the change out-of-band if needed. RETURNS: |
| mercury_cancel_invoiceA | Cancel an outstanding invoice. Mercury sends a cancellation notice to the customer if the invoice was already emailed. USE WHEN: voiding an invoice that was issued in error, that the customer disputes, or that needs to be re-issued under a corrected line-item set. ALWAYS confirm with the user before calling — the customer-facing notification is automatic. DO NOT USE: on an invoice already paid (Mercury rejects cancellation). To refund a paid invoice, refund out-of-band via the bank, then optionally update the internal note. SIDE EFFECTS: marks the invoice as RETURNS: |
| mercury_list_invoice_attachmentsA | List attachments associated with an invoice (PDF copies, supporting documents). USE WHEN: discovering which files were attached to an invoice — for archival, audit, or to share with a customer. The download URL is short-lived; refetch shortly before download. DO NOT USE: to upload an attachment — this MCP currently exposes only the read side. Mercury's API does support attachment upload ( RETURNS: |
| mercury_list_customersA | List Accounts Receivable customers, with cursor-based pagination. USE WHEN: enumerating AR customers before creating an invoice (need a DO NOT USE: for payment recipients ( RETURNS: |
| mercury_get_customerA | Retrieve a specific Accounts Receivable customer by ID. USE WHEN: fetching the full detail of one customer whose ID is already known. Faster than relisting + filtering when you have the ID. DO NOT USE: to enumerate customers (use RETURNS: |
| mercury_create_customerA | Create a new Accounts Receivable customer (a billable entity you will later invoice). USE WHEN: onboarding a new customer before issuing them an invoice. The returned DO NOT USE: for payment recipients (use SIDE EFFECTS: writes a new customer to your Mercury workspace. Persistent. NOT idempotent at the API level — calling twice with the same payload creates two customers; check RETURNS: |
| mercury_update_customerA | Update an existing Accounts Receivable customer. Pass only the fields you want to change. USE WHEN: amending a customer's contact details (name, email, billing address) after creation. Existing invoices are not retroactively modified. DO NOT USE: to delete a customer (use SIDE EFFECTS: writes the new customer record to Mercury. Persistent. Only the fields you pass are changed — omitted fields keep their current value. RETURNS: |
| mercury_delete_customerA | Permanently delete an Accounts Receivable customer. DESTRUCTIVE. USE WHEN: removing a customer that was created by mistake, or that the user explicitly wants to purge. ALWAYS confirm with the user before calling — there is no undo. DO NOT USE: when the customer has invoices in SIDE EFFECTS: permanent deletion on Mercury's side. The customer disappears from the AR list. Past invoices' RETURNS: confirmation payload from Mercury ( |
| mercury_list_webhooksA | List all webhook endpoints configured for your Mercury workspace. USE WHEN: enumerating registered webhook endpoints — for audit, finding a webhook ID before update/delete, or to confirm a delivery target is registered. DO NOT USE: to inspect webhook delivery history (Mercury exposes that only via the dashboard, not the API). RETURNS: |
| mercury_get_webhookA | Retrieve a specific webhook endpoint by ID. USE WHEN: fetching the full detail of one webhook (URL, current status, subscribed events) whose ID is already known. DO NOT USE: to enumerate webhooks (use RETURNS: |
| mercury_create_webhookA | Register a new webhook endpoint. Mercury will POST events as JSON to the provided URL. USE WHEN: subscribing an external system to Mercury events (transaction.posted, invoice.paid, etc.) so you can react in near real-time without polling. DO NOT USE: with non-HTTPS URLs, loopback / RFC 1918 / link-local / cloud-metadata IPs — the MCP enforces a defense-in-depth gate on top of Mercury's own validation to block accidental SSRF or exfiltration via prompt injection. SIDE EFFECTS: writes a new webhook subscription to Mercury. Persistent. Once registered, Mercury immediately starts delivering matching events to your URL — make sure the endpoint is ready to receive (and ideally verify Mercury's signature). NOT idempotent at the API level — calling twice creates two subscriptions firing duplicate events. RETURNS: |
| mercury_update_webhookA | Update an existing webhook endpoint (URL, status, or subscribed events). USE WHEN: rotating a webhook's destination URL, changing the event subscription, or reactivating a webhook Mercury auto-disabled after consecutive delivery failures (set DO NOT USE: to inspect delivery history. Same SSRF / non-HTTPS URL guard as SIDE EFFECTS: overwrites the webhook record. Persistent. If RETURNS: |
| mercury_delete_webhookA | Delete a webhook endpoint. DESTRUCTIVE — Mercury stops delivering events to that URL. USE WHEN: decommissioning a webhook (URL no longer reachable, integration retired, accidental duplicate). ALWAYS confirm with the user — there is no undo, and any downstream system that depended on the events stops being notified. DO NOT USE: to temporarily silence a webhook (use SIDE EFFECTS: permanent deletion on Mercury's side. Future events that would have fired this webhook are silently dropped — no replay. Past delivery history is also lost from the Mercury dashboard. RETURNS: confirmation payload ( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| mercury-send-ach | Resolve source account + recipient, confirm with the user, then submit an ACH transfer via mercury_send_money. Mirrors Mercury's `send-an-ach-payment` recipe. |
| mercury-create-recipient | Create a Mercury payment recipient and (when routing + account numbers are supplied) configure it for ACH. Mirrors Mercury's `create-a-new-payment-recipient` recipe. |
| mercury-accounts-overview | List every Mercury account with balance + status in a single compact table. Mirrors Mercury's `retrieve-information-about-all-of-your-accounts` recipe. |
| mercury-recipients-overview | List every Mercury recipient, flagging which are ACH-ready vs missing bank details. Mirrors Mercury's `retrieve-information-about-all-of-your-payment-recipients` recipe. |
| mercury-create-customer | Duplicate-check the AR customer list, then call mercury_create_customer. Required for mercury_create_invoice — you can only invoice a customer that already exists. |
| mercury-create-invoice | Resolve customer + deposit account, confirm with the user, then call mercury_create_invoice. Surfaces Mercury's default SendNow behaviour so the user knows the invoice lands in the customer's inbox on confirmation. |
| mercury-unpaid-invoices-overview | List every Mercury invoice that is not yet fully paid, flagging overdue ones, and print a total owed. Read-only: no reminders are sent, no invoices are cancelled. |
| mercury-pending-card-transactions | List pending (not-yet-settled) transactions on every Mercury IO Credit account. Answers the "quelles sont mes dernieres transactions CB non payées?" question. Uses the IO Credit endpoints (`/credit` + singular `/account/{id}/transactions`) documented in the Mercury API reference. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/klodr/mercury-invoicing-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server