# Quaderno MCP

> Quaderno brings global tax compliance and invoicing directly into your AI workflow. Calculate sales tax, VAT, or GST for any region, issue professional invoices, and manage customer contact data using a single API connection. Stop leaving money on the table; automate your entire billing cycle with confidence.

## Overview
- **Category:** finance-accounting
- **Price:** Free
- **Tags:** tax-compliance, invoicing, vat-gst, billing, sales-tax

## Description

Your AI client connects directly to Quaderno's **Quaderno** server to handle global tax compliance, invoicing, and customer records right in your workflow. This single API connection lets you automate complex financial logic that used to require multiple systems.

### Global Tax Calculation

The `calculate_taxes` tool calculates the applicable tax rate—whether it's VAT, GST, or something else—and figures out the total amount for any sale price and location. You input a cost and a customer's region, and the server instantly returns the correct tax breakdown. This means you know exactly what your final billed price needs to be before sending anything out.

### Managing Customer Data (CRM)

The system manages all your client information through several specific functions. To add someone new, use `create_contact`; you just provide their email, first name, and last name, and the record gets registered immediately. If you already have a customer, `get_contact` pulls up all their stored details using their unique ID. Need to change something—like an outdated phone number or address—you run `update_contact`, providing a structured JSON payload to modify existing fields.

When a contact is no longer needed in your system, you use `delete_contact`. Be careful with this one; that action permanently removes the customer record and can't be undone. To see who you've got on file, run `list_contacts`, which gives you an exhaustive list of every current customer profile stored in the account.

### Invoicing and Transactions

The core function for billing is handled by `create_transaction`. When a sale happens, you use this tool to record the full transaction history. You pass it a structured JSON array detailing all product items and their prices, along with the customer's contact ID; the server handles recording that sale and issuing the official invoice simultaneously.

To check on an existing bill, `get_invoice` fetches the complete details of any specific invoice you point it toward using its unique identifier. If you need to audit a past billing cycle or review a previous sale, running `list_invoices` retrieves a paginated list of every single invoice that's ever been issued through the system. For a deep dive into historical sales activity, use `list_transactions`; this generates a complete history log covering all recorded transactions in the account.

### Comprehensive Auditing and Reporting

To keep your books clean, you can pull reports on every part of your data set. You run `list_contacts` to see every customer profile. For invoices, `list_invoices` gives you a paginated list of everything billed. Similarly, running `list_transactions` provides the full historical record of all recorded sales and payments. The system also lets you pull specific details using `get_contact` or `get_invoice`, ensuring you have the exact data point you need for any audit or report.

## Tools

### calculate_taxes
Calculates the applicable tax rate (VAT, GST, etc.) and total amount for a given sale price and location.

### create_contact
Registers a new customer contact by providing their email, first name, and last name.

### create_transaction
Records a new sale transaction and issues an invoice using the provided contact ID and item details array.

### delete_contact
Permanently removes a specified customer contact record from the account. This action cannot be undone.

### get_contact
Retrieves all stored details for a specific customer by their unique ID.

### get_invoice
Fetches the full details of an existing invoice record using its identifier.

### list_contacts
Generates a list containing all current customer contacts stored in the Quaderno account.

### list_invoices
Retrieves a paginated list of every invoice that has been issued through the system.

### list_transactions
Generates a complete history log of all recorded transactions in the account.

### update_contact
Modifies existing information for a customer contact using a structured JSON payload.

## Prompt Examples

**Prompt:** 
```
Calculate the taxes for a $150 plan sold to a user in Berlin, Germany (Postal Code 10115).
```

**Response:** 
```
Based on Quaderno's calculation (`calculate_taxes` tool), applying the standard DE tax rate (19% VAT) to the $150 amount adds $28.50 in taxes. The final user total will be $178.50. Would you like to create a transaction with these exact amounts?
```

**Prompt:** 
```
Fetch the billing details and history for contact ID #9822.
```

**Response:** 
```
Contact #9822 is Acorn Corp (acorn-billing@example.com). They are located in NY, USA. Their VAT profile is clean. Would you like me to use `list_invoices` to find all recent transactions associated with their profile?
```

**Prompt:** 
```
Update contact #9822 to change its first name to 'Acorn Group Inc'.
```

**Response:** 
```
I've processed the `update_contact` request. The first_name field on contact #9822 has been successfully patched to 'Acorn Group Inc'. Their records are fully refreshed.
```

## Capabilities

### Calculate Global Taxes
The server calculates applicable sales tax rates (VAT, GST, etc.) instantly by inputting a price amount and a customer's location.

### Manage Customer Records
You can create new contacts, retrieve existing user details using `get_contact`, or modify specific fields with `update_contact`.

### Generate Invoices and Transactions
The server records a complete transaction and issues an invoice by accepting a structured JSON array of product items and prices.

### Audit Billing History
You retrieve lists of all contacts (`list_contacts`), invoices (`list_invoices`), or recorded transactions (`list_transactions`) in the account.

## Use Cases

### A new product launch requires global tax validation.
The E-commerce Founder wants to test pricing for a sale in Brazil. Instead of opening a separate calculator, they ask their agent: 'What are the taxes on $100 sold to São Paulo?' The agent runs `calculate_taxes`, returns the precise Brazilian rate, and allows the founder to confirm the final price instantly.

### A client changes address mid-billing cycle.
The Client Success Manager notices a typo in a client's billing zip code. First, they run `get_contact` to verify the ID. They then use `update_contact` to fix the record. Finally, they call `create_transaction`, guaranteeing the new invoice uses the correct address.

### Auditing a high-value account.
The Finance Engineer needs to check all billing history for Account #12345. They use `list_invoices` and then follow up with `list_transactions`. This gives them a complete, chronological audit trail of every payment and credit.

### Needing a full list of active clients.
The Sales team needs to pull contact data for an annual review. They use the agent to run `list_contacts`, receiving a machine-readable JSON array that they can immediately feed into another system or analysis tool.

## Benefits

- Tax compliance becomes immediate. Instead of manually checking tax rates for every country, the `calculate_taxes` tool runs in seconds, giving you the precise VAT/GST rate needed to complete a sale.
- Keep your data clean with full CRM control. You can use `get_contact`, `list_contacts`, and `update_contact` to ensure client billing addresses are current before running any transaction.
- Invoice generation is one step, not three. By calling `create_transaction`, you pass itemized goods and let the server handle both recording the sale and generating the official invoice.
- Audit trails are always available. Never hunt through separate dashboards; use `list_invoices` or `list_transactions` to pull a clean history of every financial event, all in one prompt.
- Cross-functional workflow: You can find an old client's details with `get_contact`, verify their billing status by running `get_invoice`, and then update them all before issuing the next bill.

## How It Works

The bottom line is that you manage complex global financial logic by passing structured instructions—not just natural language—to the system.

1. Subscribe to the Quaderno server and authorize it using your dedicated API Key.
2. Instruct your AI agent (e.g., 'Calculate tax for $50 sold to France'). The agent runs `calculate_taxes` and returns the VAT rate and total due.
3. Use the returned data to issue a final invoice, calling `create_transaction` with the required contact ID and itemized JSON payload.

## Frequently Asked Questions

**Where do I find my Quaderno API Key and URL?**
Log in to your Quaderno account. Your **API URL** is simply your domain up top in the browser bar (e.g., `https://mycompany.quadernoapp.com`). To get the **API Key**, navigate to **Settings** > **API Keys** (or Developers), and copy your private key. Do not share this key as it carries full access. Paste both credentials below.

**Can it calculate exact taxes dynamically before a sale?**
Yes! Use the `calculate_taxes` tool and just provide the AI with a country code, postal code, and base amount. Quaderno's world-class engine evaluates real-time location-based tax nuances (VAT, GST) and returns the exact fraction needed.

**Can I draft custom test invoices natively in chat?**
Absolutely. You can use `create_transaction`. Instruct your agent to format a JSON array with products and amounts, linking to a specific `contact_id`. The server submits this array to Quaderno and records the fully realized transaction safely.

**Will deleting a contact via the AI remove them permanently?**
Yes. The `delete_contact` operation relies heavily on standard destructive API instructions. Running this means the contact is gone entirely from the Quaderno dashboard. Always review deletion queries cautiously before approving execution.

**When I use `list_invoices`, can I filter results by date range or customer name?**
Yes. You pass filtering parameters directly to the `list_invoices` tool in your prompt. This lets you narrow down records—for example, showing only invoices from Q2 of this year—before needing a specific invoice ID.

**If I use `create_transaction`, what should I watch out for if the required product details are missing?**
The system returns a structured payload detailing the validation failure. It specifies exactly which required fields—like contact ID or itemized prices—are missing or malformed, helping you fix the input immediately.

**When running `update_contact`, do I have to provide every single piece of customer information?**
No. You only need to pass a JSON payload containing the specific fields you want changed. The server ignores any contact details that are not included in your update request.

**When I use `calculate_taxes`, does it handle complex cross-border tax rules, like digital services or exemptions?**
Yes. Quaderno handles global tax compliance by checking the destination region against current law. It calculates VAT, GST, and other localized requirements specific to international sales.