> For the complete documentation index, see [llms.txt](https://docs.plock.io/plock-overview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plock.io/plock-overview/guides/ai-tools/mcp.md). Agents can also search and read this documentation through its [MCP server](https://docs.plock.io/plock-overview/~gitbook/mcp).

# MCP — connect AI assistants to Plock

Plock runs an [MCP](https://modelcontextprotocol.io/) (Model Context Protocol) server, which lets AI assistants such as Claude, Cursor and VS Code work with your Plock data directly from the tools your team already uses. They can read your accounts, products, subscriptions, invoices, usage and reporting figures. If your Plock user has edit access, they can also make changes: create and update accounts, products, price plans, subscriptions and invoices, tag accounts and products, and send invoices to your ERP.

The server URL is:

```
https://api.plock.io/mcp
```

{% hint style="info" %}
Access over MCP is limited to your own organisation's data and always follows your Plock user's access level. A read-only Plock user can only read. Nothing can be deleted through this connection.
{% endhint %}

## Before you start

* You need a Plock user account with a verified email address.
* Authorisation happens in your browser. If you are not signed in to Plock you will be asked to sign in first — email and password, Google, and Microsoft sign-in all work.

## Claude (web and desktop)

1. Go to **Settings → Connectors → Add custom connector**.
2. Enter the server URL `https://api.plock.io/mcp`.
3. Click **Connect**. Your browser opens Plock's authorisation screen — check that the account and email shown are yours, then click **Approve**.

## Claude Code

```bash
claude mcp add --transport http plock https://api.plock.io/mcp
```

Then run `/mcp` inside Claude Code and follow the authentication prompt.

## Cursor, VS Code and other MCP clients

Add an MCP server of type HTTP (streamable) with the URL `https://api.plock.io/mcp`, then complete the browser authorisation when prompted.

## What happens when you connect

* The authorisation screen shows:
  * the application name;
  * what it will be able to read and, if your Plock user has edit access, change;
  * which Plock account and user it connects to;
  * where you will be redirected afterwards.
* A connection gets edit access when it is made, based on your Plock user's access level at that moment. Connections made before changes were supported can only read. To give one edit access, remove the connector in your AI client and add it again. Signing out of Plock and back in doesn't change an existing connection.
* The application name is self-reported and not verified by Plock, so only approve connections you started yourself.
* The connection renews itself automatically while it is in use. If it stops being used it expires on its own within 30 days.
* Re-connecting from the same tool replaces the previous connection.
* To revoke a connection immediately, contact Plock support.

## What the assistant can read

| Area                  | What it covers                                                               |
| --------------------- | ---------------------------------------------------------------------------- |
| **Documentation**     | How Plock works, including the guides you are reading now                    |
| **Accounts**          | Your end customers, with filtering, including by their ID in your CRM or ERP |
| **Products**          | Products and their pricing                                                   |
| **Subscriptions**     | Subscriptions, their items and states                                        |
| **Invoices**          | Invoices and their line items                                                |
| **Product usage**     | Collected usage per account and product                                      |
| **Reporting metrics** | MRR, ARR, CARR, movements, retention and other report figures                |

## What the assistant can change

Making changes requires edit access on your Plock user. A read-only user gets a permission error and nothing is changed.

| Area                         | What it can do                                                                                                                                                                                                                                                                                                      |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Accounts**                 | Create an account. Give an organisation number and the registered name, address and VAT number are filled in from the official company registry (Sweden, Norway, Denmark and Finland). Update an existing account's details; only the fields you give are changed.                                                  |
| **Tags**                     | Add, remove or replace tags on accounts and products, one at a time or in bulk, for example from a list your customer sent. Rows can be matched by Plock ID, name, organisation number, ERP ID, CRM ID or primary key. If any row can't be matched, nothing is changed and the assistant is told which rows failed. |
| **Products and price plans** | Create a product, and price plans for an existing product.                                                                                                                                                                                                                                                          |
| **Subscriptions**            | Create a subscription (always as a draft) and activate it to start billing. Schedule changes on a date: plan swaps, quantity changes, and adding or removing items. Set or lift an end date.                                                                                                                        |
| **Invoices**                 | Generate the invoice for a billing period. Create a one-off invoice right away, or add a one-off charge to the next invoice. Send an invoice to your accounting system.                                                                                                                                             |

{% hint style="warning" %}
Changes happen as soon as the assistant calls the tool. There is no extra confirmation step inside Plock, so keep your AI client's tool-approval prompts switched on.
{% endhint %}

## Try asking

* "What was our MRR movement last quarter?"
* "Which accounts had a usage drop last month?"
* "Show me unpaid invoices for account X."
* "Which Plock account has HubSpot company ID 123456?"
* "Create a draft subscription for Acme AB on the Pro plan from 1 January, billed yearly in advance."
* "Tag these 40 accounts as Enterprise" (with the list pasted in)
* "How does group billing work in Plock?"

## Plocky vs. MCP

Both surfaces are built on the same tools, so the answers agree with each other.

* Use [**Plocky**](https://docs.plock.io/plock-overview/guides/ai-tools/plocky.md) inside Plock when you want changes such as new accounts, subscriptions and invoices shown as a card you confirm first, to work from an attached spreadsheet or agreement PDF, or to build a table, report or deck.
* Use **MCP** when you want your Plock data and actions available in the AI tool where you already work, alongside your other context.

## Troubleshooting

**The assistant has no tools for making changes, or says the connection can only read.** Remove the Plock connector in your AI client and add it again. If it still can only read, your Plock user has read-only access: ask your Plock administrator for edit access, then reconnect.

**Changes fail with a permission error.** Your Plock user has read-only access. Ask your Plock administrator for edit access.

**Tool calls fail even though the connection succeeded.** Make sure your Plock user's email address is verified.

**The connection stalls after signing in.** Start the connection again from the AI client — the original authorisation request may have expired.
