# Polar

Let Lyna AI query and act on your Polar organization while it builds, on products, orders, subscriptions and customers.

Connect your Polar organization so Lyna AI can read your catalog, orders and metrics, and use them to build your pricing and checkout screens.

## What it lets you do

- Catalog and sales: organizations, products, benefits, subscriptions, orders, refunds, payments, checkouts and discounts.
- Customers: customers, members, seats and license keys.
- Usage and reporting: metrics, events and meters.
- Configuration: webhooks, files and custom fields.
- Search and read the Polar documentation.

| Item                         | Detail                                                                                                                                              |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| What it asks for             | A sign-in on Polar's page.                                                                                                                          |
| Who pays the provider        | You, through your own Polar account.                                                                                                                |
| Do actions change real data? | Yes. This connector reaches your live organization. Deleting a customer cannot be undone.                                                           |
| Where it runs                | On Polar's servers.                                                                                                                                 |
| Who uses it                  | Lyna AI while it builds, in Build mode. Your published app can use it too: [Use a connector in your app](/integrations/connectors/use-in-your-app). |

## What you need before you start

- A Polar account and an organization. You sign in and authorize access to that organization, with no key to copy.
- To test without real customers, the Polar sandbox (see Ways to connect).
- Edit access to your Lyna project.

### Permissions in Polar

You authorize access to your organization when you sign in. Polar's MCP docs list no fine-grained scopes, and offer two choices instead: read-only or full access, and the sandbox or your live organization. Both are set by the address.

| Task                                                 | What you need                                      |
| ---------------------------------------------------- | -------------------------------------------------- |
| Read products, orders and metrics                    | Any of the addresses                               |
| Create or change a product, a discount or a checkout | The address with no `readonly=true`                |
| Read only, and ask only for read access at sign-in   | `https://mcp.polar.sh/mcp/polar-mcp?readonly=true` |
| Build and test away from live data                   | `https://mcp.polar.sh/mcp/polar-sandbox`           |

## Ways to connect

**On the connector's page.** A sign-in on Polar's own page. Lyna stores it encrypted. Only the owner can sign in again.

**Who owns the account?** The person who signed in. Every call goes out as that person's Polar account, whoever typed the request.

**Who can use it?** Only you, in the projects you link it to, until you change it. On the connector's page, **Who can use it** also offers **Only this project** and **The whole workspace**. See [Who can use a connection](/integrations/connectors#who-can-use-a-connection).

**A read-only address.** In **Connectors**, choose **Add custom**, then **Custom server**. Give it a name, paste `https://mcp.polar.sh/mcp/polar-mcp?readonly=true` in **Server address**, keep **Sign in** under **How it signs in**, and choose **Add and test**. Only read operations are then available.

**The sandbox.** To build and test away from live data, do the same with `https://mcp.polar.sh/mcp/polar-sandbox`. Give it a separate name such as `polar-sandbox`.

## Set it up

1. ### Open the connector

   Open the **+** menu of the chat and choose **Connectors**. Find **Polar** with the search field or under **Payments**, then open its page.
2. ### Connect

   Choose **Connect**. The **New connection** page opens and reads "Sign in with your Polar account to connect." Choose **Connect** at the bottom of the page. **Sharing**, just above, sets who can use it.
3. ### Sign in

   A new window opens on Polar's own page. If your browser blocks the window, the page goes to the sign-in in the same tab and brings you back after. Sign in and approve the access.
4. ### Read the result

   The page tests the connection and shows the result. **Connected** means Lyna can use it.

This connector shows no field to fill in: everything you give, you give on Polar's own page.

> [!WARNING]
>
> **What never to share**
>
> Lyna never asks for your Polar password. Type it only on Polar's own page, and never paste a password, a token or a key in the chat.

### Check it works

After you choose **Connect**, the page tests the connection and shows the result. Run it again at any time with **Test connection**. **Connected** proves that Polar's server answered, accepted your sign-in and listed its tools. A pass does not prove access to every piece of data. It uses the access you granted when you signed in.

To check for real, ask for something you know exists:

- "List 3 products of my Polar organization."

## What to ask Lyna AI

Type these in the chat, in Build mode, and adjust the names to yours. Once it is connected, **Use Polar** on its page starts a message for you.

| What you build or do | What to type                                                               | What happens                                                   |
| -------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------- |
| Build a pricing page | "List my Polar products and build a pricing page from them."               | Lyna AI reads your products and builds the page.               |
| Read your revenue    | "How much revenue did my Polar organization make last month, per product?" | It reads your metrics and answers in the chat.                 |
| Add a Buy button     | "Create a checkout link for the Pro product and add it to the Buy button." | After your approval, the link exists and your code uses it.    |
| Help a customer      | "Find the customer with this email and list their subscriptions."          | It reads the customer and answers in the chat.                 |
| Launch a promotion   | "Create a 20 percent discount for the Pro product that ends on Friday."    | After your approval, the discount exists in your organization. |
| Watch usage          | "Show the events of the api\_calls meter for this week."                   | It reads the meter and sums it up.                             |
| Connect a webhook    | "List my webhooks and tell me which ones point at this app."               | It reads them and compares with your project.                  |

### Approvals and tool switches

Before a call, Lyna AI shows the tool and what it asks. You choose **Deny**, **Allow once**, **Always allow this tool** or **Always allow this connector**. A tool its server marks as read-only does not ask. A changed or new tool asks again, and **Ask again** on the connector's page takes a choice back.

Under **What Lyna AI can use**, each tool has a switch. Lyna AI stops using a tool you turn off, in your chats in this project.

### Stay safe

What a connector answers reaches the AI as data, never as instructions. Read each approval before you accept it.

- The code the server runs can only call Polar operations, with the access you granted, and cannot reach any other host.
- Polar records a usage event for each call, with the tool name, duration and result size. To opt out, add `?telemetry=false` to the address.

> [!WARNING]
>
> **Deleting has real effects**
>
> Deleting a customer cannot be undone. It cancels active subscriptions and revokes benefits at once.

## Limits

- A product can only be deleted when it has no orders, subscriptions, trials or discounts.
- See [Polar MCP](https://polar.sh/docs/integrate/mcp).
- Connector tools run in Build mode. Plan and Ask do not run them.

## Troubleshooting

| What you see                                                           | What it means and what to do                                                                                                                                                       |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Needs sign-in**                                                      | Your sign-in ended, or you revoked it at Polar. Choose **Connect** and sign in again.                                                                                              |
| The sign-in window does not open                                       | Your browser blocked it, so the page goes to the sign-in in the same tab. If nothing happens, allow pop-ups for Lyna and choose **Connect** again.                                 |
| No answer from the sign-in window yet                                  | If the window is still open, finish there. If you closed it, choose **Connect** again.                                                                                             |
| **The sign-in was cancelled.**                                         | You closed or declined Polar's page. Choose **Connect** and approve the access.                                                                                                    |
| **The service refused the sign-in.**                                   | Check that you used the right account and that your organization allows this access, then choose **Connect**.                                                                      |
| **The sign-in took too long. Start it again.**                         | Choose **Connect** and sign in again.                                                                                                                                              |
| **The sign-in worked, but the server did not answer.**                 | Choose **Test connection**.                                                                                                                                                        |
| **Not tested yet**                                                     | No test has answered. Choose **Test connection**.                                                                                                                                  |
| **Connection failed**                                                  | The page says why next to it. If the server did not answer, choose **Test connection**.                                                                                            |
| A call fails with a permission error                                   | **Connected** does not prove access to every piece of data. Polar refused the call with the rights of the account you connected. Check Permissions in Polar above, then try again. |
| **New tools to review**                                                | The server changed its list of tools, so Lyna stops using it until you decide. Read the list, then choose **Approve new tools**.                                                   |
| **Turned off**                                                         | Lyna AI does not use it. Choose **Turn on**.                                                                                                                                       |
| It needs a new sign-in. Only the person who connected it can give one. | Someone else connected it, and that sign-in ended. Ask that person to choose **Connect**.                                                                                          |
| The person who connected it left the workspace                         | The connection holds no key or sign-in. Choose **Connect** to use it again.                                                                                                        |
| You see live data while testing                                        | This connector reaches your live organization. Add the sandbox address as a second server.                                                                                         |

### Disconnect

**Turn off** stops Lyna from using the connector and keeps your settings. **Remove from this project**, under **More options**, takes it out of this project only, and shows when another project uses it. **Delete connection**, in the same menu, removes it from every project, with what it stored, and says first how many projects lose it. If Polar lists Lyna among the authorized applications of your organization, you can remove it there too.

## Related

- [Connectors](/integrations/connectors): What connectors are and how the chat uses them.
- [Stripe payments](/integrations/stripe): Take payments in your app.
- [Chat modes](/features/ai/chat-modes): Build, Plan and Ask.
