> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beaconrevenue.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Build on Beacon with Cursor

> Use Cursor as the builder and Beacon as the source of your company's figures: dashboards in a chat, an agent with its own key, and apps Cursor writes for you on the Data API.

Beacon holds your company's figures and works them out: revenue, retention, forecasts, module scores, targets. Cursor can build on top of them. It can draw a dashboard beside a chat, read Beacon as an agent with its own key, or write the code for an app that reads Beacon on its own.

Cursor is built for writing code, so the third way is where it does the most for you.

Whatever Cursor builds, the figures stay Beacon's. Cursor reads what Beacon stored, with each figure's date, and never sees more than one person's Beacon access allows.

## Pick your way in

| You want | Use | Cursor reads with | Read more |
| - | - | - | - |
| A dashboard or answer in a chat, for yourself | Beacon added to Cursor | Your own Beacon sign-in | [Dashboards in a chat](#dashboards-in-a-chat) |
| An agent in Cursor that reads Beacon under its own name | A second Beacon entry with an agent key | A `bcn_agt_` key, kept outside the settings file | [An agent key in Cursor](#an-agent-key-in-cursor) |
| An app, dashboard or script that runs without Cursor | Cursor writes the code, the app reads the Data API | Nothing: the app key stays in your app | [Have Cursor write an app](#have-cursor-write-an-app-on-the-data-api) |
| A spreadsheet or BI tool | Files | Nothing: the app key stays in your tool | [Data files](https://docs.beaconrevenue.io/build/files.md) |

## Dashboards in a chat

You need Beacon added to your Cursor app and signed in. [Use Beacon in Cursor](https://docs.beaconrevenue.io/ai-tools/cursor.md) covers it.

**1. Start a new chat**

Open a new chat in Cursor. You don't need a project open.

**2. Name the figures and the rules**

Ask, for example: "From Beacon, build a revenue dashboard: closing MRR and ARR for the last three closed months, the movements in each, and this month so far kept separate. Show each figure's month. Show only what Beacon served. Don't work anything out yourself."

**3. Look beside the chat**

Cursor may draw the dashboard as a **Canvas** that opens beside the chat, with tables and charts. It also writes the figures in the chat.

**4. Refresh by asking again**

Ask Cursor to read the same figures again. Every read is fresh.

On Beacon's demo company on 15 November 2026, Cursor read the company page, the revenue series and the active target, then drew a Canvas without being asked: closing MRR and ARR for August to October, the movements in each, the \$52M target beside each ARR figure, and November so far in its own block. Every figure matched what Beacon served to the cent, including October 2026 closing ARR of \$35,025,703.08.

> [!TIP]
>
> Cursor may run small commands while it works. In Beacon's test it ran one to pick the revenue section out of an answer it had saved, without changing any figure. A number Cursor works out itself would be Cursor's, not Beacon's, so keep "Show only what Beacon served" in the request.

The rules on [Build a dashboard in Claude](https://docs.beaconrevenue.io/build/claude-dashboard.md#keep-it-honest) apply here too: keep each figure's date beside it, show what isn't ready rather than a zero, put your strategy's target beside the figure it frames, and check who may see the figures before you share them.

## An agent key in Cursor

An [agent key](https://docs.beaconrevenue.io/build/agent-keys.md) lets Cursor read Beacon under the key's name rather than your own sign-in. The key acts for one accountable person and reads only what they see in Beacon. Use it when you want an agent's reads kept apart from your own, with their own off switch.

**1. Make the key in Beacon**

Go to **Build → Agent keys** and choose **Make an agent key**. Name it after the agent, choose who it acts for and untick anything it doesn't need to read. Copy the key: it is shown once.

**2. Put the key where Cursor can read it, not in the file**

Store the key in an environment variable named, for example, `BEACON_AGENT_KEY`. Cursor reads environment variables in a server's address and headers, from your system environment.

On a Mac, the Cursor app sees a variable set with `launchctl setenv BEACON_AGENT_KEY` followed by the key, provided Cursor is opened after it is set. Such a variable lasts until the Mac restarts.

**3. Quit Cursor, then add a second Beacon entry**

With Cursor closed, open `~/.cursor/mcp.json` and add an entry next to your signed-in `beacon` entry:

```json mcp.json theme={null}
{
  "mcpServers": {
    "beacon": {
      "url": "https://api.beaconrevenue.io/mcp"
    },
    "beacon-agent": {
      "url": "https://api.beaconrevenue.io/mcp?via=cursor-agent-key",
      "headers": {
        "Authorization": "Bearer ${env:BEACON_AGENT_KEY}"
      }
    }
  }
}
```

The `?via=cursor-agent-key` ending matters: Cursor merges two entries that share an address into one, and the agent entry disappears. Beacon accepts the ending.

**4. Open Cursor and check the entry**

Under **Customize → MCPs**, **beacon-agent** shows as connected. Cursor uses the key and doesn't ask you to sign in. In Beacon's test it listed 13 tools: eleven read tools, plus **Who is working this account?** and **Note what I did**, which only agent keys get. The setup tools aren't listed for an agent key.

**5. Ask**

In a new chat, ask, for example: "Use only the beacon-agent tools. Which company am I connected to, and what is our ARR? Show only what Beacon served, with its month."

On Beacon's demo company on 15 November 2026, Cursor answered through an agent key with Beacon Demo, October 2026 ARR of \$35,025,703.08, and the \$52M target for December 2027 beside it. **Data > Dashboards > Revenue** showed the same figure.

> [!WARNING]
>
> **Edit `mcp.json` with Cursor closed**, or through Cursor's own settings. In Beacon's test, Cursor wrote its own copy of the settings back over a change made while it was open.

## Have Cursor write an app on the Data API

Cursor can write the code for an app that reads Beacon on its own: a dashboard on Vercel, an internal tool, a scheduled script. The app reads Beacon's [Data API](https://docs.beaconrevenue.io/build/app-on-the-api.md) with an app key.

> [!WARNING]
>
> **Never paste an app key into Cursor's chat.** Ask Cursor to read the key from a `.env` file, then paste the key into that file yourself.

**1. Make an app key in Beacon**

Go to **Build → App keys** and choose **Make a key**. [App keys](https://docs.beaconrevenue.io/app-keys.md) covers every option. Copy the key and keep it out of the chat.

**2. Point Cursor at the docs, and have it stop before the key**

In a new chat, ask, for example:

> Create a folder `beacon-app-test` in my home folder and work there. First read [https://docs.beaconrevenue.io/app-keys](https://docs.beaconrevenue.io/app-keys.md) and the Data API reference at [https://docs.beaconrevenue.io/api-reference](https://docs.beaconrevenue.io/api-reference.md). Then write a small web page that reads `https://api.beaconrevenue.io/data/v1/accounts` with `Authorization: Bearer` and the key from the environment variable `BEACON_APP_KEY`, loaded from a `.env` file in that folder. Follow `page.next` until there are no more pages. Show each account's lifecycle stage and health score with that row's `as_of`, and the total number of rows. If Beacon refuses a request or a value, show the reason it gives on the page, never a zero. Create the `.env` file with the line `BEACON_APP_KEY=` and stop there: tell me when it's ready for my key. Never ask me to paste the key into this chat.

**3. Paste the key into the file**

When Cursor says it's ready, open `.env` in that folder and paste the key straight after `BEACON_APP_KEY=`, with no space. Save it. On a Mac, files that start with a dot are hidden in Finder: press **Cmd + Shift + .** to show them.

**4. Run it**

Tell Cursor: "The key is in .env, run it."

**5. Move the key to where the app lives**

When the app goes somewhere other people use it, add `BEACON_APP_KEY` to that place's settings, such as an environment variable on Vercel, and keep `.env` off every shared copy.

**6. Keep it current**

Ask Cursor to add a check on `/changes` so the app re-reads only what Beacon has re-worked. [Stay current](https://docs.beaconrevenue.io/build/stay-current.md) shows how.

In Beacon's test on 15 November 2026, Cursor on the free plan read both pages and wrote the whole app: a small web page that reads the key from `.env`, keeps `.env` out of version control, follows `page.next` to the last page, and shows Beacon's reason in place of any refused value. The free plan reached its usage limit before Cursor could run it. The key itself read the customers on Beacon's demo company with HTTP 200, and Beacon recorded the read.

> [!NOTE]
>
> **Check how the page shows a refusal.** A value Beacon doesn't hold comes back with a `reason` in its place. A request refused because of the key comes back differently: with no key, Beacon answered HTTP 401 with `"status": "no_key"` and a `detail` sentence saying what to do. The code Cursor wrote in Beacon's test looked only for `reason`, so it would have shown a refused key without Beacon's sentence. Ask Cursor to show `status` and `detail` too, so a refused read never looks like an empty list. [Build an app on the Data API](https://docs.beaconrevenue.io/build/app-on-the-api.md#answers-that-arent-data) lists every answer.

The Data API serves customers, deals, months and quarters, segments, cohorts, the chart of accounts, the billing and contract tables, and changes today. Ledger entries answers that it isn't served yet, never with an empty list, so tell Cursor to build only on what [the Data API serves today](https://docs.beaconrevenue.io/build/app-on-the-api.md#what-is-served-today).

## What Beacon records

Every read appears on **Settings → Who read what**, under the person it acts for:

| Way in | Shown as |
| - | - |
| Your own sign-in | **Other AI tools (says it is Cursor)** |
| Agent key | **AI tool connected to Beacon**, with the key's name and **Agent key** |
| App key | **Beacon Data API**, with the key's name, **App key**, what was read and how many rows |

Filter by **Key** to see only one key's reads. A request that never reaches Beacon isn't recorded, because nothing was read.

## Keep it safe

* **Keys stay out of files you share.** An agent key lives in an environment variable, an app key in `.env` or your host's settings. Neither belongs in `mcp.json`, in code, or in the chat.
* **Anyone holding a key reads as its person.** Give it only to people who may see what that person sees.
* **Switch a key off to stop it.** On **Build → App keys** or **Build → Agent keys**, choose **Switch off**. From then on Cursor is refused with `key_switched_off`, and told to ask the person who made the key, or an admin, for a new one. A switched-off key can't be switched back on; make a new one.
* **Replace a key that may have been seen.** **Replace key** makes a new one with the same settings and stops the old one at once.
* **Turning off Cursor for the company.** Sign-ins from Cursor's desktop app count as **Other AI tools**; see [Turn Cursor off for your company](https://docs.beaconrevenue.io/ai-tools/cursor.md#turn-cursor-off-for-your-company). Agent keys and app keys each have their own off switch.

## Not tested yet

* **Cursor running the app it wrote and showing the page.** Beacon's test reached the free plan's usage limit first. The key's read itself was tested.
* **Cursor's cloud agents.** They need a paid Cursor plan and haven't been tested with Beacon.
* **Setting the agent key's variable on Windows.** Beacon's test was on a Mac.

## Related

> [card] [Use Beacon in Cursor](https://docs.beaconrevenue.io/ai-tools/cursor.md)
>
> Add Beacon and sign in.

> [card] [Build an app on the Data API](https://docs.beaconrevenue.io/build/app-on-the-api.md)
>
> Keys, paging and every answer.

> [card] [Agent keys](https://docs.beaconrevenue.io/build/agent-keys.md)
>
> The accountable person, what it may read, refusals.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.