# Moonclerk — how to use (mcp.ai)

Connect your Moonclerk account and use 5 tools for payment processing straight from your AI agent. Connect with your own API key. MoonClerk is a platform that enables businesses to accept recurring and one-time online payments.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_moonclerk?ms=1787293500000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `moonclerk_list_customers`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/moonclerk`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/moonclerk/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/moonclerk/list/customers` — Tool to list customers (plans) from MoonClerk. Use when you need to retrieve customer data with optional filters. Use after authenticating API credentials.
  - body: { status?: string, form_id?: integer, checkout_to?: string, checkout_from?: string, next_payment_to?: string, next_payment_from?: string }
- `POST https://api.mcp.ai/api/moonclerk/list/discounts` — Tool to retrieve a list of all discounts applied to customers. Use after authenticating API credentials.
  - body: { status?: string, form_id?: integer, checkout_to?: string, checkout_from?: string, next_payment_to?: string, next_payment_from?: string }
- `POST https://api.mcp.ai/api/moonclerk/list/forms` — Tool to retrieve a list of all payment forms. Use after authenticating to inspect available payment forms.
  - body: { page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/moonclerk/list/payments` — Tool to list payments. Use when you need to retrieve all payments or filter by form, customer, date range, or status after authenticating.
  - body: { status?: string, date_to?: string, form_id?: integer, date_from?: string, customer_id?: integer }
- `POST https://api.mcp.ai/api/moonclerk/list/subscriptions` — Tool to list subscriptions. Use when you need to retrieve all subscriptions after authenticating.
  - body: { status?: string, form_id?: string, next_payment_to?: string, next_payment_from?: string }

## Example prompts
- "What can I do in Moonclerk?"
- "Show me a summary of my Moonclerk account"

## More
- Page: https://mcp.ai/moonclerk
- Agent spec (llms.txt): https://mcp.ai/moonclerk/llms.txt
- Postman collection: https://mcp.ai/moonclerk/postman.json
