# Connect your agent

> Add Advent Funnel to Claude Code, the Claude apps or Codex, so your agent can build in your account as you.

Advent Funnel runs an **MCP server**, the open standard AI agents use to work with apps. Once you connect it, your agent can read your products and funnels, build page drafts, write copy, generate images and set up offers, all in your account and under your rules.

The server's address is:

```
https://app.adventfunnel.com/mcp
```

Your agent works **as you**: it sees what you can see, and everything it changes is a draft you can open in the builder. It can't take a page live unless you ask it to, and some things stay with people only. See [What agents can do](https://docs.adventfunnel.com/what-agents-can-do).

## Claude Code

Run this in your terminal:

```
claude mcp add --transport http advent-funnel https://app.adventfunnel.com/mcp
```

Then, in Claude Code, type `/mcp`, choose **advent-funnel** and **Authenticate**. Your browser opens Advent Funnel's sign-in, then a page that shows the app asking for access. Choose **Allow**, and you're connected.

## Claude desktop and claude.ai

1. Open **Settings → Connectors** and choose **Add custom connector**.
2. Paste the server's address, `https://app.adventfunnel.com/mcp`.
3. Choose **Connect**, then sign in to Advent Funnel and allow it.

Nobody copies a password or a secret key into a chat: Claude signs in with your Advent Funnel account and gets its own access, which it renews by itself.

## Codex and other MCP clients

A client that can't sign in by itself uses a **token** instead.

1. In Ops, open **AI / MCP → Connect** and expand **Tokens for other tools** (owners and admins see this page).
2. Name the token after what uses it, such as "Codex on my laptop", and choose **Make a token**. It's shown once: copy it now.
3. Put it in an environment variable, such as `ADVENT_FUNNEL_MCP_TOKEN`, and point your client at the server. For Codex, add this to `~/.codex/config.toml`:

```toml
[mcp_servers.advent_funnel]
url = "https://app.adventfunnel.com/mcp"
bearer_token_env_var = "ADVENT_FUNNEL_MCP_TOKEN"
```

Anyone with the token can change drafts as you, so keep it out of chats and shared files. A token doesn't expire: revoke it when it's no longer used.

## Try it

Ask for something you'd ask a colleague, for example:

- "List my funnels and tell me which pages are still drafts."
- "Build an advertorial for my product from its facts and reviews."
- "Make a funnel from a template for my product, with 1, 2 and 4 bottle bundles."

For bigger jobs, **AI / MCP → Prompts** in Ops has ready-made prompts to copy, such as building a funnel from a template, a product page from competitors' pages, or a check before a page goes live. Pick your product at the top and each prompt names it for the agent.

The agent finds the tools by itself. When it's done, it gives you links to the drafts and their previews, and you publish from the builder, or ask it to publish.

## Disconnect an agent

**AI / MCP → Connect** lists the connected apps with when each was last used. **Disconnect** stops one at once; it has to sign in again to come back. Tokens are listed under **Tokens for other tools**, each with **Revoke**.
