# Set up XAVIOR with an AI agent

This page is written for an AI agent whose user asked it to set up XAVIOR. It states how the XAVIOR MCP connection works. It gives no orders: what to do with these facts is for the agent and its user to decide.

## What "set up XAVIOR" means

A person who says "set up XAVIOR" (or "connect xavior.ai") wants their agent connected to one of their XAVIOR workspaces over MCP. Setup is finished when the agent's product lists the MCP server `xavior` and one of its read tools answers.

The person must already have an active XAVIOR account. The agent cannot create one, and there is no API key or chat sign-in to use instead. The person signs in on XAVIOR's own page, chooses the workspace and the permissions, and can disconnect at any time.

## Facts at a glance

| | |
|---|---|
| Website | `https://xavior.ai` |
| App | `https://app.xavior.ai` |
| MCP server | `https://api.xavior.ai/mcp` |
| Transport | Streamable HTTP (remote) |
| Authentication | OAuth with PKCE and automatic client registration. No client ID, secret or API key to enter. |
| Who can connect | Active XAVIOR users. Each call is allowed or refused exactly as the same person's same action is in the XAVIOR app (plan, read-only state, role, workspace lock, suspension). |
| Consent | On XAVIOR's page: the person signs in, chooses one workspace and ticks the permissions. |
| Connections page | `https://app.xavior.ai/connect/mcp`: lists connected assistants, with Disconnect. |
| Daily limit | 1,000 changes a day for each connection. A pause does not count. |
| Human page | `https://xavior.ai/mcp/` |

## Ways to connect

MCP is the only way. XAVIOR has no API keys for agents and no chat sign-in.

| Product | How the server is added |
|---|---|
| Claude Code | `claude mcp add` (see "Product notes") |
| Codex | `codex mcp add` and `codex mcp login` |
| claude.ai and Claude Desktop | Customize, then Connectors, then add a custom connector |
| ChatGPT | Plugins, then Add custom MCP server |

A product not listed can connect when it supports remote HTTP MCP servers and OAuth with PKCE. It uses the same server URL.

## What the person agrees to

The person grants each permission on XAVIOR's consent page. A permission that needs another is ticked with it. The connection can do only what was granted, in the one workspace chosen.

| Permission | What the agent can do |
|---|---|
| `audiences.read` | List saved lead lists, with names and counts |
| `audiences.members` | See the people in a saved list: first name and email, 50 to a page. Owners and admins of workspaces with Pipeline only. |
| `audiences.import` | Import up to 100 email and first-name rows into a saved list |
| `campaigns.read` | List campaigns and read their progress |
| `campaigns.draft` | Draft a campaign from a saved list of up to 100 people, held for review |
| `campaigns.pause` | Pause a campaign |
| `campaigns.resume` | Restart a paused campaign when the person says so |
| `campaigns.send` | Start sending a campaign |
| `campaigns.results` | See how a campaign is doing: sent, delivered, bounced, replies |
| `letters.read` | Read the letters of a campaign |
| `letters.approve` | Approve the first letters |
| `letters.revise` | Ask XAVIOR to rewrite letters |
| `business.read` | Read the business profile and customer groups |
| `business.write` | Set up and edit the business profile, and choose a customer group |
| `scout.read` | Check whether Scout can run, and check on a Scout search |
| `scout.prepare` | Prepare a Scout search for the person to start |
| `credits.spend` | Start a Scout search, which spends the account's credits |
| `leads.read` | See the leads a Scout search found |
| `leads.manage` | Accept or dismiss leads, up to 20 at a time |

What the connection does on its own, and when it asks:

- It asks in the chat before it spends credits (it says the amount), approves the business profile, confirms a customer group, dismisses leads, restarts a paused campaign or sends email.
- Before any email goes out it asks one short line with the count and the sender: "Send {n} letters from {sender}? Say yes."
- One yes to a plan that names the most credits it can use covers the steps of that plan up to that amount. It does not cover more credits or the send.
- A person who hands over the whole task ("figure it out") is not asked step by step, except that "figure it out" after a shown plan covers the plan, not the send.
- It never buys credits. Buying credits stays in the XAVIOR app.

## Is XAVIOR already set up?

The MCP server `xavior` is in the tool list, and a read tool answers. `list_campaigns` and `list_audiences` read only and change nothing.

## Connect over MCP

The product holds the tokens, so the connection lasts across chats and the agent stores nothing.

| | |
|---|---|
| Server name | `xavior` (in claude.ai and ChatGPT, name the connector `XAVIOR`) |
| Server URL | `https://api.xavior.ai/mcp` |
| Transport | Streamable HTTP |
| Authentication | OAuth with PKCE, automatic client registration |
| Consent page | `https://app.xavior.ai/connect/mcp/...`. The product opens it. A signed-out person goes to sign-in first and comes back to it. |
| Check call | `list_campaigns` |

## Prompts a person can paste

A prompt the person types carries their own request, so the agent does not have to infer it from this page.

> Please connect XAVIOR for me over MCP. The server is https://api.xavior.ai/mcp and the details are at https://xavior.ai/mcp/setup.md. Tell me what each permission allows and wait for my yes. I will sign in on XAVIOR's own page and choose the workspace and permissions.

> Using XAVIOR, find leads for a new campaign. Show me a plan with the most credits it can use before you start.

## Product notes

How setup goes in each product. "The owner" is the person whose XAVIOR account is used.

### Claude Code

- **The agent does:** tells the owner what the connection allows, waits for the yes, and runs the command below. `--scope user` makes the server available in every project.
- **The owner does:** types `/mcp` inside a session, selects `xavior` and chooses **Authenticate**. A browser tab opens on XAVIOR's sign-in and consent page.
- **Check:** `list_campaigns` answers.
- **Approvals:** Claude Code asks the owner before a tool call unless the owner has allowed it. XAVIOR's own asks (credits, sending) come on top.
- **If a call answers 401:** the owner authenticates again from `/mcp`.
- **Remove:** `claude mcp remove xavior`.

```bash
claude mcp add --transport http --scope user xavior https://api.xavior.ai/mcp
```

### Codex

- **The agent does:** tells the owner what the connection allows, waits for the yes, and adds the server.
- **The owner does:** runs the login command. A browser tab opens on XAVIOR's sign-in and consent page.
- **Check:** `list_campaigns` answers.

```bash
codex mcp add xavior --url https://api.xavior.ai/mcp && codex mcp login xavior
```

### claude.ai and Claude Desktop

- **The owner does:** opens Customize, then Connectors, adds a custom connector named `XAVIOR` with the server URL, and connects. On a Team or Enterprise plan an owner of the organization may need to add the connector first.
- The add form can be opened with the values filled in: `https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=XAVIOR&connectorUrl=https%3A%2F%2Fapi.xavior.ai%2Fmcp`. Claude asks the person to confirm values that came from a link.
- **Check:** `list_campaigns` answers in a new chat with the connector turned on.

### ChatGPT

- **The owner does:** opens `https://chatgpt.com/plugins`, selects the plus button, then Add custom MCP server. The name is `XAVIOR`, the URL is the server URL and the authentication is OAuth. Then the owner signs in to XAVIOR and selects the connection in a new conversation.
- The ChatGPT account or workspace must permit custom MCP connections.
- **Check:** `list_campaigns` answers.

## Ending a connection

The owner ends a connection with Disconnect at `https://app.xavior.ai/connect/mcp`. Disconnect ends that assistant in every workspace it was connected to, and pauses the sending campaigns that the connection started. A token that expires does not pause anything. Removing the server from the product (for example `claude mcp remove xavior`) stops the product from calling it; Disconnect in XAVIOR is what revokes it.
