# MoonClerk MCP

> MoonClerk MCP Server connects your AI agent directly to your payment records. Use it to check customer statuses, track payments (both one-time and recurring), list active forms, and monitor coupon usage—all without logging into a dashboard.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** recurring-payments, checkout-pages, subscription-management, payment-records, customer-billing

## Description

This server connects your AI agent straight into MoonClerk, giving it direct access to all your payment records, customer details, and checkout forms. You don't have to log into any dashboard; you just tell your agent what data you need.

**Managing Customers:**
You can list every single account that’s paid through the service using `list_customers`. Need deep background on one specific user? Use `get_customer` and give it an ID; that pulls up all their detailed profile info. 

**Handling Transactions:**
To see everything that's happened with money, you use `list_payments`. This gives you a full list of transactions, letting you filter down by date or status. When you know the exact payment record you want to check—say, a successful charge last Tuesday—`get_payment` pulls all those specific data points for you, including the status and the amount.

**Tracking Forms & Coupons:**
If you need an overview of your checkout setup, `list_forms` shows you every payment form you’ve built, giving you their names and public URLs. For granular details on a single form—like its current settings or if it needs an update—you use `get_form` with the ID.

For promotions, run `list_coupons` to grab a complete list of every active coupon code available right now. This lets you check what discounts are running and their rules.

**Putting It Together:**
Your agent can pull together these pieces: it'll get a comprehensive transaction history using `list_payments`, then use that data point to figure out which customer made the payment, calling `get_customer` for status checks. You can also cross-reference payments with coupons by running `list_coupons` and checking if those codes were applied in the records pulled via `list_payments`. If you want to know what forms are available alongside your payments, it'll use `list_forms` before querying specific form settings with `get_form`. This gives your agent a full operational view of both who paid and how they paid for their service.

## Tools

### get_customer
Retrieves detailed information for a single customer account.

### get_form
Gets the specific settings and details for one payment form by its ID.

### get_payment
Fetches all the data points for a single transaction record, including status and date.

### list_coupons
Pulls a complete list of every active coupon code available in your system.

### list_customers
Returns an array listing all customer accounts that have used the service.

### list_forms
Lists every payment form you've set up, giving you their names and URLs.

### list_payments
Provides a comprehensive list of all transactions that have occurred, allowing for filtering by date or status.

## Prompt Examples

**Prompt:** 
```
List all active customers in my MoonClerk account.
```

**Response:** 
```
I've retrieved your customer list. You have 50 active customers (plans), including 'John Doe' and 'Maria Garcia'. Would you like to see the payment history for any of them?
```

**Prompt:** 
```
Show the last 5 payments received today.
```

**Response:** 
```
I've fetched today's payments. You have 5 new transactions totaling $450.00 USD, with all transactions marked as 'Successful'.
```

**Prompt:** 
```
List all my active payment forms.
```

**Response:** 
```
I've retrieved your payment forms. You have 3 active forms: 'Basic Subscription', 'Premium Monthly', and 'Annual Pass'. Which URL would you like to retrieve?
```

## Capabilities

### Identify and detail specific customer profiles
Retrieves detailed information for a single customer using their ID.

### Pull the configuration details for checkout forms
Gets specifics about a payment form, including its current settings and status.

### Fetch transaction records
Retrieves full data on individual payments to check statuses and amounts.

### List all active coupon codes
Grabs a list of every coupon code currently available in your system.

### Get the complete roster of paying customers
Lists all customer accounts connected to MoonClerk.

### List and retrieve payment forms
Gets a list of every configured checkout form, giving you their URLs.

## Use Cases

### Debugging a failing recurring charge
A user notices a subscription failed. Instead of emailing support, they ask their agent to run 'get_payment' for the specific transaction ID. The agent pulls the failure reason and status instantly, letting them fix it without delay.

### Quickly checking promotion limits
Marketing needs to know if a new coupon code is valid before launching. They ask the agent to use 'list_coupons', which immediately shows every active coupon and its associated rules, preventing bad launches.

### Onboarding a new finance hire
The new hire wants an overview of quarterly revenue sources. They prompt the agent with 'Show me all payments from this month,' triggering 'list_payments' and providing a data summary that replaces hours of spreadsheet work.

### Validating checkout links
A developer needs to confirm which forms are live. They run 'list_forms', confirming the active URLs, then use 'get_form' on a specific URL to verify that all necessary fields and configurations are present.

## Benefits

- Check transaction statuses instantly. Instead of running multiple reports, just ask the agent to 'list all payments' or 'get_payment' details for a specific ID. You get immediate answers.
- Monitor customer accounts without jumping through tabs. Use 'list_customers' followed by 'get_customer' to pull comprehensive profiles and plan types directly in your chat window.
- Audit promotions easily. Running 'list_coupons' gives you a clear view of all active coupon codes, letting you confirm rules or expiration dates instantly.
- Verify form functionality quickly. Use 'list_forms' first to get the URLs, then use 'get_form' to check its live configuration—great for QA testing.
- Reduce manual data compilation. By combining 'list_customers', 'list_payments', and 'list_forms', your agent builds a full picture of revenue activity in one go.

## How It Works

The bottom line is, you feed the API key once, and then your AI client handles all the complex querying for you.

1. Enter your MoonClerk API Key into the server settings.
2. Direct your AI client to perform an action (e.g., 'What were my payments yesterday?').
3. The agent runs the necessary tool calls and returns structured data about the transactions or customers.

## Frequently Asked Questions

**How do I list all my customers using the MoonClerk MCP Server?**
Run the 'list_customers' tool. This gives you a roster of every customer account connected to your service, which is the starting point for any audit or check.

**Which tool should I use to see payment failures?**
Use 'list_payments'. You can then filter the results by status (e.g., 'Failed' or 'Declined') and get a full history of those transactions.

**What is the difference between list_forms and get_form?**
'list_forms' only gives you names and URLs for all your active payment forms. Use 'get_form' when you need to know specific details about one form, like its internal configuration or required fields.

**Can I check a customer’s plan status?**
Yes. First, use 'list_customers' to get the ID, then pass that ID to the 'get_customer' tool. This returns their current plan type and detailed metadata.

**How do I check my active promotions using the `list_coupons` tool?**
`list_coupons` shows all currently active coupons. You get the coupon code, its expiration date, and whether it has usage limits remaining for your account.

**What information does `get_payment` give me about a single transaction?**
`get_payment` retrieves the full record for one specific payment. You get the dollar amount, the exact date processed, the customer ID linked to it, and its final status.

**If I use `list_forms`, how do I find a checkout page's public URL?**
`list_forms` gives you all form metadata. To get the actual working link, you must pass the specific Form ID into the `get_form` function.

**What specific billing metadata can I pull for a customer using the `get_customer` tool?**
`get_customer` pulls more than just the plan type. It provides the account's creation date, their current billing cycle details, and associated internal IDs.

**How do I get my MoonClerk API Key?**
Log in to your MoonClerk account, navigate to the **Settings** > **API** section, and generate a new API token.

**Is the API read-only?**
Yes, currently the MoonClerk API is primarily for retrieving data (customers, payments, forms). For creating records, please use the MoonClerk dashboard.

**Can I track recurring payments?**
Absolutely. The `list_payments` tool retrieves both one-time and recurring payments, allowing you to monitor your subscription health.