> For the complete documentation index, see [llms.txt](https://docs.adnuntius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adnuntius.com/other-useful-information/mcp-server/book-a-campaign-with-an-ai-agent.md).

# Book a campaign with an AI agent

Let an AI agent draft campaigns for your buyer team.

An AI agent can draft campaigns for your buyer team. The agent finds a product, estimates the reach, and creates an order with a line item in Adnuntius. It can also submit the line item for review but a person must add the creatives and approve the submission before it will run. It works with the agents that the [MCP Server](/other-useful-information/mcp-server.md) supports.

## Requirements

* **Adnuntius has switched on agent booking for your network.** Ask Adnuntius support for the "agent booking address" for your network.
* **A network admin has switched on agent booking for your buyer team.** In Adnuntius, open the team under `Users -> Teams`, tick `Agent Booking` and save.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-3434987cde0cc26d579a759a38d5b30cc76cb86f%2Fmcp-booking-team-agent-booking.png?alt=media" alt="The Agent Booking setting on a buyer team"><figcaption></figcaption></figure>

* **You buy for that team.** Your user must have a marketplace buyer role on the team. A network admin cannot have a buyer role on the same network, so a network admin needs a separate buyer login.
* **You sign in with two-factor authentication or a passkey.**
* **The advertiser exists on the team.** The agent cannot create an advertiser entity, it books for one or more of your team's existing advertisers.

### 1. Add the booking connector

The address to use here is the one you receive from Adnuntius support when you request this feature, it looks like

```
https://api.adnuntius.com/api/mcp/<network id>/booking
```

Add this address to your agent as a new MCP server, the same way as for the [MCP Server](/other-useful-information/mcp-server.md) but with the booking address. Keep the MCP server you already have: the booking connector is separate from it.

**In Claude:** when Claude asks how to sign in, choose `Sign in now`, and for the OAuth client choose `Register automatically`.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-1ecb5c697bf7f7614c1c87a4953851fc2afb256d%2Fmcp-booking-claude-add-connector.png?alt=media" alt="Adding the booking connector in Claude"><figcaption></figcaption></figure>

### 2. Connect and choose the teams

Start the sign-in from your agent, as for the MCP server. Adnuntius opens in your browser; sign in if it asks you to. Choose the teams that the agent can book for. You can also limit the agent to some products. Then click `Authorise`.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-a345d8a35a81595bb0ec68c82853c173db069845%2Fmcp-booking-consent.png?alt=media" alt="Choosing the teams that the agent can book for"><figcaption></figcaption></figure>

The access lasts 24 hours. After that, sign in again from your agent.

### 3. Ask the agent for a campaign

Tell the agent what you want to book, for example:

> Book a two-week display campaign for Nordic Coffee on the Premium Display product, starting next Monday, with a budget of 10,000 NOK. Estimate the reach first.

The agent lists the products that your team can buy, estimates the reach, and creates the order and the line item. It gives you a link to the line item in Adnuntius.

### 4. Check the campaign and add the creative

Open the order in Adnuntius. The order shows that an AI agent booked it.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-838b8bfbdd5f23e64d06c4c0db63b10bed570718%2Fmcp-booking-order.png?alt=media" alt="An order that an AI agent booked"><figcaption></figcaption></figure>

The line item is `Proposed`. While it is proposed, either you or the agent can change it. You will have to add the creative to the line item as the agent cannot upload ads.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-ef1edebd4a1203ed05f3cfccb3d36edcf89b98d8%2Fmcp-booking-line-item-proposed.png?alt=media" alt="The proposed line item"><figcaption></figcaption></figure>

### 5. Submit and approve the line item

Ask the agent to submit the campaign. After it is submitted, the agent cannot change it.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-d761d060008ab872110f980d18315aa2000ddb93%2Fmcp-booking-line-item-submitted.png?alt=media" alt="The submitted line item"><figcaption></figcaption></figure>

The buyers on your team get a notification. They can click on the `i` icon at the top of Adnuntius to see it and set the state to `Approved`.

<figure><img src="https://307313184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHmwQqapxqiNrAwTABM%2Fuploads%2Fgit-blob-2c0a17a0929cdc9a7598c3e3fdff5dba0206aca8%2Fmcp-booking-notification.png?alt=media" alt="The notification that the line item was submitted"><figcaption></figcaption></figure>

The line item serves from its start date once it is approved.

## Troubleshooting

* **The consent page asks only for query access and does not list teams.** The agent connected to the MCP server address, not the booking address. Add the booking address as its own MCP server.
* **The agent says that the connector has a sign-in configuration problem.** The connector was saved with `No sign-in`. Remove it and add it again with `Sign in now`.
* **The consent page says "This network does not allow agent booking".** Ask Adnuntius support to switch it on.
* **The consent page says "The agent cannot book for team ...".** Agent booking is off for that team, or the login you signed in with has no buyer role on it. A network admin login never has one, so sign in with a buyer login.
* **The agent cannot submit the line item.** The line item has no creative yet, or it has another validation error. Open it in Adnuntius to see what is missing.
* **The agent stops working after a day.** The access has expired. Sign in again from your agent.
