AI assistants work with Anytime Capital Payments in two ways. Coding assistants read these docs as Markdown and write your integration. Agents connect to the MCP server and act on your account directly (create payment links, draft and send invoices, look up payments, refunds and payouts) with exactly the access the API key you give them allows.
Which client, which setup
| Client | Connects to the MCP server | How |
|---|---|---|
| Claude Code | Yes, over HTTP with your key | One command |
| Claude Desktop | Yes, through the mcp-remote bridge | Config file |
| Cursor and other remote-HTTP clients | Yes, over HTTP with your key | mcp.json |
| VS Code (GitHub Copilot agent mode) | Yes, over HTTP, key asked for once | .vscode/mcp.json |
| ChatGPT | Not yet | Use the docs instead |
| Your own agent | Yes: any MCP client, or the Claude API's MCP connector | Custom agents |
Give your assistant the docs
| URL | What it is |
|---|---|
| https://anytime-capital.com/docs/llms-full.txt | Every docs page in one Markdown file. The best single link to hand an assistant. |
| https://anytime-capital.com/docs.md | The docs overview, with links to every page. |
https://anytime-capital.com/docs/<page>.md | Any page on its own: add .md to its URL, e.g. payment-links.md. |
| https://anytime-capital.com/api/v1/openapi.json | The API as OpenAPI 3.1, for exact request and response shapes. See OpenAPI. |
| https://anytime-capital.com/llms.txt | The map of the whole Anytime Capital site for AI tools. |
Every docs page also has Copy page (its Markdown), View as Markdown, Copy prompt for AI (a prompt for that page's task, pointing at its Markdown) and Open in Claude (the same prompt in a new Claude conversation).
The integration prompt
Paste this into Claude Code, Cursor or any coding assistant, in your project. It works with any language or framework.
Integrate Anytime Capital Payments into this app so it can take payments.
First read the documentation: https://anytime-capital.com/docs/llms-full.txt
(Each page is also available on its own as Markdown, for example https://anytime-capital.com/docs/payment-links.md and https://anytime-capital.com/docs/webhooks.md.)
Requirements:
1. Work out the stack from this repository (language, framework, where server code runs, how secrets and environment variables are handled) and follow its existing patterns.
2. Read the secret API key from a server-side environment variable named ANYTIME_API_KEY (it starts with ak_live_). Never send it to the browser or a mobile app, never log it, never commit it.
3. Call the REST API at https://anytime-capital.com/api/v1 from server code only, with the header "Authorization: Bearer <key>". Amounts are integer cents in USD.
4. To take a payment for an order, create a payment link (POST /api/v1/payment-links) with "singleUse": true and the order id in "metadata", save the link id on the order, and send the customer to the link's "url". To bill a known customer with line items and a due date, create an invoice (POST /api/v1/invoices) instead.
5. Send an Idempotency-Key header on every POST: generate it once per operation (a UUID), store it with the order, and reuse it on retries so a retry never creates a second link or invoice.
6. Add a webhook endpoint that reads the raw request body and verifies the Anytime-Signature header: v1 is the hex HMAC-SHA256 of "<t>.<raw body>" keyed with the whsec_ signing secret from ANYTIME_WEBHOOK_SECRET; compare in constant time and reject timestamps more than 300 seconds old. Skip event ids it has already processed. On payment.succeeded, mark the order in data.metadata paid; also handle payment.failed, payment.refunded and dispute.opened.
7. Handle API errors by error.code (never by message text), show error.message where a person can fix it, and wait for Retry-After on 429.
8. Use only endpoints and fields the docs describe. If something I need isn't in the docs, tell me instead of guessing.
When you're done, list the environment variables I must set, the webhook URL to register in https://anytime-capital.com/dashboard/business/settings/developers (Settings → Developers → Add endpoint, event payment.succeeded and the others you handle), and how to test the flow end to end in test mode (an ak_test_ key, a test card, and the event simulator at POST /api/v1/test-helpers/events) before switching to a live key.Connect the MCP server
The MCP server at https://anytime-capital.com/api/mcp lets an assistant call the Payments API as tools. It speaks MCP over Streamable HTTP and takes the same API key as the REST API, in the same Authorization header, so the assistant has exactly the access the key gives: same validation, same rate limit, same idempotency, same activity log.
Claude Code
claude mcp add --transport http anytime-capital https://anytime-capital.com/api/mcp --header "Authorization: Bearer ak_live_..."Add --scope user to use it in every project. Run claude mcp list to check it's connected, or /mcp inside a session. To share the server with a team without sharing a key, commit a .mcp.json that reads the key from each person's environment:
{
"mcpServers": {
"anytime-capital": {
"type": "http",
"url": "https://anytime-capital.com/api/mcp",
"headers": {
"Authorization": "Bearer ${ANYTIME_API_KEY}"
}
}
}
}Claude Desktop
Claude Desktop's custom connectors don't send an API key header, which this server needs, so connect it through the open-source mcp-remote bridge, which needs Node.js. Open Settings → Developer → Edit Config, add the server, and restart Claude Desktop:
{
"mcpServers": {
"anytime-capital": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://anytime-capital.com/api/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer ak_live_..."
}
}
}
}Cursor and other clients with remote HTTP servers
Clients that connect to remote MCP servers over HTTP with custom headers take a config like this (in Cursor, ~/.cursor/mcp.json, or .cursor/mcp.json in a project):
{
"mcpServers": {
"anytime-capital": {
"url": "https://anytime-capital.com/api/mcp",
"headers": {
"Authorization": "Bearer ak_live_..."
}
}
}
}VS Code
In VS Code with GitHub Copilot, add the server to .vscode/mcp.json in your project. VS Code asks for the key the first time and stores it securely, so the file holds no secret and can be committed. Use the tools from Copilot Chat in Agent mode.
{
"inputs": [
{
"type": "promptString",
"id": "anytime-api-key",
"description": "Anytime Capital API key (ak_live_…)",
"password": true
}
],
"servers": {
"anytime-capital": {
"type": "http",
"url": "https://anytime-capital.com/api/mcp",
"headers": {
"Authorization": "Bearer ${input:anytime-api-key}"
}
}
}
}ChatGPT
As of October 2026, ChatGPT can't connect to this MCP server. Its developer mode (a beta) adds custom MCP servers, but signs in to them with OAuth or not at all, and has no way to send the API key this server needs. We don't list an app in ChatGPT's app directory either: OpenAI's app guidelines don't allow apps that move money, so a listed app would be limited to reading and drafting.
- Write code with it: give ChatGPT llms-full.txt and the integration prompt above.
- Draft invoices with it: ask it to draft line items, tax and due dates, then create them in the dashboard or with a connected agent. The prompt library has prompts for this.
- Act on your account: use Claude Code, Claude Desktop, Cursor, VS Code or your own agent.
Tools
48 tools, one per REST endpoint except usage billing's (meters and usage events, which your own code sends over REST) and the OpenAPI document, generated from the server's own tool table. send_test_event is the test-mode event simulator: it works only with an ak_test_ key, and a live key gets 403 TEST_MODE_ONLY. Each tool's arguments are the endpoint's fields (see the API reference), plus id for one object and idempotencyKey on tools that change something. Results are the API's JSON objects; errors come back as { status, error: { code, message } } with isError: true, so the assistant can read the message and fix the call.
| Tool | What it does | REST endpoint | Key permission | Effect |
|---|---|---|---|---|
list_payments | List the business's payments (cards, card wallets and bank debits on payment links, invoices and subscriptions), newest first. Filter by status and by creation time. | GET /api/v1/payments | payments:read | Reads |
get_payment | Retrieve one payment by its id (pay_…): status, amounts in cents, net after fees, customer, payment method, metadata and any dispute. | GET /api/v1/payments/{id} | payments:read | Reads |
list_payment_links | List the business's payment links, newest first, each with its pay page url and the choices it offers buyers. Links behind invoices and subscription plans are not listed. | GET /api/v1/payment-links | payment_links:read | Reads |
create_payment_link | Create a hosted payment page for a single price and get back its url to share by text, email, DM or QR code. Customers pay by card, Apple Pay or Google Pay where available. | POST /api/v1/payment-links | payment_links:write | Changes |
get_payment_link | Retrieve one payment link by its id (pl_…), with its url, price, settings and buyer choices. | GET /api/v1/payment-links/{id} | payment_links:read | Reads |
update_payment_link | Change a payment link's title, description, what customers see after paying, terms consent, metadata, checkout questions, tips, quantity or shipping address. Send only what changes. The price can't change: create a new link instead. | POST /api/v1/payment-links/{id} | payment_links:write | Changes |
deactivate_payment_link | Stop a payment link taking payments. Anyone who opens it sees that it's closed; payments already made are kept. There is no API to reactivate it. Deactivating a link that is already off returns it unchanged. | POST /api/v1/payment-links/{id}/deactivate | payment_links:write | Changes, can't be undone |
list_invoices | List the business's invoices, newest first, with totals, what is paid and still owed, due date and pay page url. | GET /api/v1/invoices | invoices:read | Reads |
create_invoice | Create an invoice from line items; totals are calculated for you. By default it is emailed to the customer straight away (send: false to hold it). The customer pays by card at the invoice's url. | POST /api/v1/invoices | invoices:write | Changes; reaches people outside your business |
get_invoice | Retrieve one invoice by its id (inv_…): status, overdue, line items, totals, amount paid, balance and pay page url. | GET /api/v1/invoices/{id} | invoices:read | Reads |
send_invoice | Email an invoice to its customer: the invoice itself the first time, a reminder after that. At most once every 24 hours per invoice, and only while something is still owed. | POST /api/v1/invoices/{id}/send | invoices:write | Changes; reaches people outside your business |
list_customers | List the business's saved customers, newest first, or find one by email address. | GET /api/v1/customers | customers:read | Reads |
create_customer | Add a customer: name, and optionally email, phone, company, notes, billing address and tax ID. One customer per email. | POST /api/v1/customers | customers:write | Changes |
get_customer | Retrieve one saved customer by id (cus_…). | GET /api/v1/customers/{id} | customers:read | Reads |
update_customer | Change a customer's details. Send only what changes; null clears an optional field. | PATCH /api/v1/customers/{id} | customers:write | Changes |
list_refunds | List refunds, newest first, optionally for one payment or by status. status=pending_approval lists refunds waiting for an owner's approval. | GET /api/v1/refunds | refunds:read | Reads |
get_refund | Retrieve one refund (re_…) or one that needed an owner's approval (re_appr_…). | GET /api/v1/refunds/{id} | refunds:read | Reads |
create_refund | Refund all or part of a payment (leave amountCents out to refund everything left). The money goes back to the customer's card and can't be taken back. Over the business's approval limit nothing is refunded: the result has status pending_approval until an owner approves it in the dashboard. | POST /api/v1/refunds | refunds:write | Changes, can't be undone; reaches people outside your business |
list_products | List the product catalog, newest first; active=false for archived products. | GET /api/v1/products | products:read | Reads |
create_product | Add a product to the catalog: name and price in cents, optionally description, SKU and whether it ships. | POST /api/v1/products | products:write | Changes |
get_product | Retrieve one product by id (prod_…). | GET /api/v1/products/{id} | products:read | Reads |
update_product | Change a product's name, description, price, SKU or physical flag. Links already selling it keep their price. | PATCH /api/v1/products/{id} | products:write | Changes |
archive_product | Archive a product: it leaves the catalog. Nothing is deleted; it can be restored in the dashboard. | POST /api/v1/products/{id}/archive | products:write | Changes, can't be undone |
list_subscription_plans | List subscription plans, newest first; active=false for archived plans. | GET /api/v1/subscription-plans | subscriptions:read | Reads |
create_subscription_plan | Create a subscription plan: title, price in cents and interval (week, month, quarter, year), optionally a free trial. Customers subscribe at its url. | POST /api/v1/subscription-plans | subscriptions:write | Changes |
get_subscription_plan | Retrieve one subscription plan by id (sp_…). | GET /api/v1/subscription-plans/{id} | subscriptions:read | Reads |
list_subscriptions | List subscribers, newest first, by status, plan or customer email. | GET /api/v1/subscriptions | subscriptions:read | Reads |
get_subscription | Retrieve one subscription by id (sub_…). | GET /api/v1/subscriptions/{id} | subscriptions:read | Reads |
cancel_subscription | Cancel a subscription at the end of the period paid for (default) or now (atPeriodEnd: false). The subscriber is emailed. | POST /api/v1/subscriptions/{id}/cancel | subscriptions:write | Changes, can't be undone; reaches people outside your business |
pause_subscription | Pause payments on an active or trialing subscription until it is resumed. | POST /api/v1/subscriptions/{id}/pause | subscriptions:write | Changes, can't be undone |
resume_subscription | Resume a paused subscription, or undo a cancellation set for the period's end. | POST /api/v1/subscriptions/{id}/resume | subscriptions:write | Changes |
list_discount_codes | List discount codes, newest first, with whether each is active, expired or used up. | GET /api/v1/discount-codes | discount_codes:read | Reads |
create_discount_code | Create a discount code: a percentage (basis points) or a fixed amount in cents off, optionally with a use limit and an expiry. | POST /api/v1/discount-codes | discount_codes:write | Changes |
get_discount_code | Retrieve one discount code by id (dc_…). | GET /api/v1/discount-codes/{id} | discount_codes:read | Reads |
deactivate_discount_code | Stop a discount code being accepted at checkout. It can be brought back in the dashboard. | POST /api/v1/discount-codes/{id}/deactivate | discount_codes:write | Changes, can't be undone |
list_payouts | List payouts to the business's bank, newest first. | GET /api/v1/payouts | payouts:read | Reads |
get_payout | Retrieve one payout by id (wdrl_…). | GET /api/v1/payouts/{id} | payouts:read | Reads |
get_balance | The business's balance in cents: available to pay out, pending and in reserve. | GET /api/v1/balance | payouts:read | Reads |
list_disputes | List disputes on the business's payments, newest first, optionally by status. Each carries its evidence pack as evidence (status, strength, whether we advise accepting, whether the PDF is attached, when it was or will be submitted), or null. Responding happens in the dashboard. | GET /api/v1/disputes | disputes:read | Reads |
get_dispute | Retrieve one dispute by id (dspt_…), with its evidence pack's status as evidence (null when there is none). | GET /api/v1/disputes/{id} | disputes:read | Reads |
list_webhook_endpoints | List the business's webhook endpoints. | GET /api/v1/webhook-endpoints | webhook_endpoints:read | Reads |
create_webhook_endpoint | Send events (payment.succeeded, refund.created…) to an https URL. Returns the signing secret once. | POST /api/v1/webhook-endpoints | webhook_endpoints:write | Changes; reaches people outside your business |
get_webhook_endpoint | Retrieve one webhook endpoint by id (we_…). | GET /api/v1/webhook-endpoints/{id} | webhook_endpoints:read | Reads |
update_webhook_endpoint | Change a webhook endpoint's url, events or description, or switch it off and on. | PATCH /api/v1/webhook-endpoints/{id} | webhook_endpoints:write | Changes; reaches people outside your business |
delete_webhook_endpoint | Delete a webhook endpoint and its delivery log. Events stop at once. | DELETE /api/v1/webhook-endpoints/{id} | webhook_endpoints:write | Changes, can't be undone |
list_events | List the business's events from the last 30 days (payment.succeeded, refund.created, invoice.paid…), newest first: by type (payment.* for a family), time window or the object they're about (objectId). Use it to reconcile, or to catch up on events a webhook endpoint missed. | GET /api/v1/events | events:read | Reads |
get_event | Retrieve one event by id (evt_…), the id webhook deliveries carry. | GET /api/v1/events/{id} | events:read | Reads |
send_test_event | Test mode only: with a test-mode key (ak_test_…), send the business's test webhook endpoints one event (payment.succeeded, payment.failed, refund.created, dispute.opened, invoice.paid or subscription.updated) marked livemode: false, built from one of its test objects (objectId, or the newest that fits). Nothing else changes and no money moves. A live key gets 403 TEST_MODE_ONLY. | POST /api/v1/test-helpers/events | webhook_endpoints:write | Changes; reaches people outside your business |
Protocol details
| Detail | Value |
|---|---|
| Endpoint | POST https://anytime-capital.com/api/mcp |
| Transport | Streamable HTTP, stateless: each POST carries one JSON-RPC 2.0 message or a batch, and the answer is application/json. No sessions and no server-sent events; GET and DELETE answer 405. |
| Protocol versions | 2025-06-18, 2025-03-26, 2024-11-05. initialize answers with your version when it's one of these, otherwise 2025-06-18. |
| Server name | anytime-capital-payments |
| Methods | initialize, ping, tools/list, tools/call. Notifications are accepted with 202 and no body. |
| Authentication | Authorization: Bearer ak_live_… on every request. initialize and tools/list work without a key so clients can discover the tools; tools/call without a valid key returns the API's 401 as a tool error. OAuth isn't offered. |
| Permissions | tools/list names each tool's permission in its description and in _meta["anytime-capital.com/permission"]; a key without it gets 403 PERMISSION_DENIED as a tool error. |
curl https://anytime-capital.com/api/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer $ANYTIME_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_payment_link",
"arguments": { "title": "Website audit", "amountCents": 25000, "idempotencyKey": "audit-2026-10" }
}
}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"object\": \"payment_link\",\n \"id\": \"pl_…\",\n \"url\": \"https://anytime-capital.com/pay/business/pl_…\",\n …\n}"
}
],
"structuredContent": {
"object": "payment_link",
"id": "pl_…",
"url": "https://anytime-capital.com/pay/business/pl_…",
"…": "…"
},
"isError": false
}
}