> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# Let your agent set it up

> How your coding agent sets nextanalytica up inside an app: it makes the project, adds the tag, checks it and goes live, while you only sign in once.

Updated: 2026-11-18

Your coding agent can set nextanalytica up for an app it builds, from an empty folder to the first visit seen. You sign in once in the browser; your agent does the rest with five tools, and the server tells it what to do next.

## What is the path?

1. Your agent connects to `https://mcp.nextanalytica.app/mcp`, and you sign in once in the browser.
2. It calls `create_project` with the app's name. No address is needed yet.
3. It calls `get_tag`, which returns the line to add and where it goes for the app's framework, then adds the tag to the app's layout.
4. If the app has a server, it calls `make_server_key` and puts the key in an environment variable.
5. It runs the app and calls `check_setup` to see what has arrived.
6. When the app is deployed, it calls `add_domain` with the address. The first page view from that address makes the project live.

## Which tools does it use?

| Tool | What it does |
| --- | --- |
| `create_project` | Makes a project with a name, and optionally a domain and a time zone. Asking again with the same name, or the same domain and name, returns the same project. |
| `add_domain` | Gives the project the address the app is served from. Not for development addresses. |
| `make_server_key` | Makes the key the app's server uses to send events. Shown once. If the project has one, it refuses unless your agent passes `replace: true`, which it does only when you ask for a new key. The old one stops working at once. |
| `go_live` | Says the app is in real use. Needs `confirm: true`, which your agent passes only after you say so. |
| `check_setup` | Shows each host that sent something, what sent it, the project's domains, whether it is live and the next step. |

`create_project`, `add_domain` and `go_live` return the project with its public tag key as `tag_key`. `get_tag` returns the line to add. Only `make_server_key` returns a secret, as `key`, and only once. Your agent can't delete a project, hand it over or change who has access. Those stay with you in the dashboard.

> **Note:** You can own **20** projects. Past that, `create_project` says "You own 20 projects. Delete one you no longer use first."

## What happens to events from my own computer?

They are noted, never stored. While you build, the tag runs on `localhost`, in a cloud editor or behind a tunnel, and none of that belongs in your numbers. nextanalytica notes that the host was seen, and when, so `check_setup` can say so, and drops the event.

These hosts count as development:

- `localhost`, `127.0.0.1` and `[::1]`
- `*.localhost` and `*.test`
- `*.app.github.dev`, `*.stackblitz.io`, `*.webcontainer.io` and `*.gitpod.io`
- `*.ngrok-free.app`, `*.ngrok.io` and `*.ngrok.app`
- `10.*`, `192.168.*` and `172.16.* to 172.31.*`, the addresses of your own network

A port, as in `localhost:3000`, is ignored. A preview address such as `shop-git-fix.vercel.app` is a real domain, so the server tells your agent to ask you before it adds one.

## When is a project live?

A project is live once its first domain is verified, or once your agent calls `go_live` after you say the app is in real use. Until then:

- A page view from a real domain follows the usual rule: the first one proves the site is yours and is not stored.
- Events your server sends are noted, not stored.

A project with no website, such as a backend for a mobile app, goes live with `go_live`.

## How does my agent check the tag without a browser?

It can't: the tag runs only in a browser. Your agent opens the local page if it has a browser tool, or asks you to open it once. Until a page view arrives, `check_setup` reports what it has seen. If only your server's events have arrived, its next step is "Installed, not yet seen in a browser: open the local page, or ask the person to."

## Where does the server key go?

In an environment variable, never in a file you commit. Your agent checks that the env file is in `.gitignore` before it writes the key. Your agent's own key for a server or script with no browser is a different thing: make it with **Key for a server** in **Access**, as [agent keys](/docs/model-context-protocol/agent-keys) explains.

## How does each agent find this?

Every agent ends in the same place: the server's instructions. What differs is the short way in.

| Agent | Its way in |
| --- | --- |
| Claude Code | The one-line command, or the plugin: [Claude Code](/docs/model-context-protocol/claude-code) |
| Cursor | The install link and a project rule: [Cursor](/docs/model-context-protocol/cursor) |
| Codex | The one-line command and a block in `AGENTS.md`: [Codex](/docs/model-context-protocol/codex) |
| Any other agent | [setup.md](https://nextanalytica.app/setup.md), the same steps in one page an agent reads |

## What's next

- [Agent keys and OAuth](/docs/model-context-protocol/agent-keys): sign in, or use a key on a server.
- [MCP tools](/docs/model-context-protocol/tools): every tool your agent can call.
- [What the tag collects](/docs/tracking): what the tag does once it is in.

Canonical address: https://nextanalytica.app/docs/model-context-protocol/agent-setup
