# Connect Alya Books to Claude or ChatGPT

> Let an AI assistant work with your invoices through a sign-in: choose the organisation, test or live, and what it may do, and revoke it any time.

Source: /help/en/api/connect-ai-assistants

Claude, ChatGPT and other assistants can use Alya Books as a **connector**: you ask in plain words ("list unpaid invoices from September", "check this CargoWise message and tell me what fails") and the assistant does it through Alya Books's MCP server, with the same checks as the app.

You need permission to manage API keys in the organisation (owners and admins have it).

## Add the connector

1. In **Claude**: Settings → Connectors → **Add custom connector**. In **ChatGPT**: Settings → Connectors (developer mode) → **Create**.
2. Enter the MCP URL shown on the **API access** page in Alya Books (it ends in `/mcp`).
3. The assistant opens Alya Books's sign-in. Sign in as usual, with your second factor if you use one.

## Approve it

Alya Books shows which app is asking and which address it will send you back to. Check that it is the app you just added. Then choose:

| | |
|---|---|
| **Organisation** | The one the assistant works in. Only organisations where you may manage API keys are listed. |
| **Environment** | **Test** creates test documents only; nothing reaches the FTA. **Live** works on real invoices: submitting reports them to the FTA and cannot be undone. Start with Test. |
| **Permissions** | What the assistant may do, from reading invoices to changing settings. Leave out what it does not need. |

Click **Allow** to go back to the assistant, connected; **Deny** cancels.

## What the assistant may do

It can do what the permissions you chose allow, and no more: read and create invoices, validate and submit them, download them as PDF or PINT AE XML, work with supplier invoices, customers and products, check and send ERP messages, read reports. It cannot manage API keys, team members, the e-invoicing connection or your company profile, and it cannot sign off an ERP charge map.

When you ask for an invoice PDF, the assistant gets a download link from Alya Books that works for 15 minutes. Anyone with the link can open the file until then, so share it only with people who may see the invoice.

Actions that cannot be undone (submitting to the FTA, sending to a buyer, reopening a VAT return) are marked so that the assistant asks you before it runs them. With a **Live** connection you remain responsible for what it submits.

## See and revoke connections

**API access → API keys → Connected apps** lists every connected assistant for the organisation: the app, test or live, its permissions, when it was connected and last used. **Revoke** stops it at once; it must be connected again to continue. A connection that is not used for 60 days ends on its own.

## Troubleshooting

- **"This connection request cannot be used"**: the request was changed or the app's registration is unknown. Remove the connector in the assistant and add it again.
- **No organisation to choose**: you do not have permission to manage API keys. Ask an owner or admin.
- **The assistant says access was revoked or expired**: reconnect it from the assistant's connector settings.
