> For the complete documentation index, see [llms.txt](https://opally.gitbook.io/opally-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://opally.gitbook.io/opally-docs/developers/mcp.md).

# AI Assistant Access (MCP)

Connect the AI assistant you already use, such as Claude or ChatGPT, to Opally and let it read and maintain your Opally setup for you: the description, policies and email instructions, the personality of each mailbox, rules, knowledge and attachments, and how your drafts are performing.

Opally does this through an [MCP](https://modelcontextprotocol.io) server. You connect once, and the assistant works in every company you belong to.

## What It Is Good For

Ask your assistant things like:

* "List my companies." (a good first request)
* "What does the policy say about late check-out at Hotel A?"
* "Find every mention of 'breakfast' across all my properties' setups."
* "Add a rule that drafts never promise a sea view."
* "Change the opening hours in the description to 7–10 on weekdays and 8–11 at weekends."
* "Which open knowledge gaps do we have, and answer the one about parking with: …"
* "What did staff change most in last month's drafts at Hotel B, and what should we adjust?"
* "Undo the change you made to the policy an hour ago."
* "How did each of our hotels do in October: emails, chats, leads, forms and hours saved, against September?"

The assistant can make the same change in several companies in one request, which is useful for groups that share policies.

## How Access Works

* **Access is personal.** An assistant acts as *you*, with your role: members can read their own mailbox's setup. Admins can read everything in the company and make changes. When you leave a company, the assistant's access to it ends too.
* **Every change is logged and can be undone**, by you in the dashboard or by asking the assistant. If a colleague has edited the same text since, the undo is refused so their work is not lost.
* **The assistant never touches guests.** It cannot send mail, reply to guests, change bookings, manage users, integrations or billing, or change webchat, call or form settings.
* **Two-factor sign-in is respected.** If you use MFA, write access asks for your authenticator app.

## Connecting Your Assistant

Opally is listed in the Claude directory and submitted to the ChatGPT directory, so you connect by name. The server address below is only needed for Claude Code, scripts and other MCP clients, or if your organisation does not allow directory connectors.

```
https://app.opally.com/api/mcp
```

### Claude (desktop app and claude.ai)

Opally is an approved connector in the [Claude directory](https://claude.ai/directory/connectors/opally).

1. Open the [Opally connector page](https://claude.ai/directory/connectors/opally) and choose **Connect**, or in Claude open **Settings → Connectors → Browse connectors** and search for *Opally*.
2. Sign in with your Opally account and choose what the assistant may do: **read only** or **read and write**, and all your companies or only some.
3. In a chat, make sure Opally is enabled under the tools menu, and ask: **"List my companies."**

Works in the Claude apps for web, desktop and mobile. If your organisation's admin has to approve connectors first, point them at the same page.

### ChatGPT

The Opally plugin is submitted to the ChatGPT plugin directory and is in OpenAI's review. Until it is listed, connect Opally as a custom connector (next section). The connection and what it can do are the same.

Once listed:

1. Open the Opally plugin page in the ChatGPT directory and choose **Add**, or in ChatGPT open **Settings → Apps & Connectors** and search for *Opally*.
2. Sign in with your Opally account and choose what the assistant may do.
3. In a chat, pick Opally from the plugins menu and ask: **"List my companies."**

### Custom connector (if needed)

Use this if the directory listing is not available to you, for example when an organisation only allows connectors added by its admin, or when you test a pre-release of Opally.

* **Claude:** **Settings → Connectors → Add custom connector**, paste the server address, choose **Connect** and sign in with your Opally account.
* **ChatGPT:** needs developer mode. **Settings → Apps & Connectors → Create**, paste the server address, choose **OAuth**, then sign in with your Opally account.

The result is the same as connecting from the directory: the connection is listed under **Connected apps** on your Opally page, and you can disconnect it there.

### Claude Code and scripts (token)

Claude Code and your own scripts use a personal token instead of a sign-in. Open **Integrations → Developer → AI assistant access** (or go to **Integrations → Developer** and choose **Manage** on the *AI assistant access* card).

1. Under **Your tokens**, choose **Create token**. Give it a name you will recognise later (for example "Claude Code on my laptop"), pick **Read only** or **Read and write**, and choose all your companies or only some.
2. Copy the token when it is shown. For your security it is shown only this once.
3. In a terminal, run the command shown on the page, with your token in place of `YOUR_TOKEN`:

```bash
claude mcp add --transport http opally https://app.opally.com/api/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"
```

A token expires after 90 days, and you can have up to 5 active tokens at a time. The page shows each token's access level, companies, expiry and last use.

Then ask the assistant: **"List my companies."** It starts from there.

## Managing Access

Everything is on the same page:

| Section            | What it shows                                                                                                            |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| **Your tokens**    | Tokens you created, with **Revoke** on each. Any assistant using a revoked token stops working immediately               |
| **Connected apps** | Assistants that signed in with your Opally account, with **Disconnect** on each. A disconnected app has to sign in again |
| **See all tools**  | The full list of what an assistant can read and change                                                                   |

## What the Assistant Can Do

| Area                          | Reads                                                                                                                                                                                                                          | Changes                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| **Companies**                 | Your companies, your role and their mailboxes. Search a word or phrase across one or all setups                                                                                                                                | none                                                                                  |
| **Setup texts**               | Description, policies, opening hours, email instructions, review guidance, workflow instructions                                                                                                                               | Edit a passage, append a paragraph or replace a text, with a preview first            |
| **Personality**               | How a mailbox writes: role, tone, writing style, avoidances, language, excluded words                                                                                                                                          | Edit the texts and set tone, reply language and excluded words                        |
| **Knowledge**                 | Search knowledge. List open knowledge gaps                                                                                                                                                                                     | Add, update or delete a knowledge item. Answer or dismiss a gap                       |
| **Attachments**               | The PDFs and images Opally can attach to replies                                                                                                                                                                               | Add a file (upload, URL or the drop page), change its name and description, remove it |
| **Rules**                     | Team rules and learned rules per mailbox                                                                                                                                                                                       | Add a team rule, remove a rule, bring back a removed learned rule                     |
| **Suggestions and templates** | Opally's suggestions from recent conversations. A mailbox's reply templates                                                                                                                                                    | Approve or reject a suggestion, optionally applying it                                |
| **Results**                   | Drafts created, replies sent and how much staff edited them. One draft next to the reply that was sent. A summary of a mailbox's recurring edits with suggested setup changes. What the booking step did or proposed           | none                                                                                  |
| **History**                   | Every change made through an assistant, with before and after                                                                                                                                                                  | Undo a change, or everything one request changed                                      |
| **Reports**                   | The dashboard's numbers per hotel for a period (emails, drafts used, hours saved, chats, leads and their value, booking clicks, forms, calls), with the period before and a day-by-day series; how the request forms performed | none                                                                                  |

## Tips for Good Results

* **Start with "List my companies."** Every request concerns a specific company, and the assistant needs to know which.
* **Edit passages, not whole texts.** The setup texts are long and colleagues edit them in the dashboard at the same time. Ask for a specific passage to be changed. The assistant quotes it exactly and replaces only that. If the passage is not found, or found more than once, nothing is written.
* **Ask for a preview** ("show me the change before saving") when you want to see the result first.
* **Give the assistant files through the drop page** when it cannot upload them itself (desktop apps and ChatGPT). The assistant gives you a link. You drop the PDFs or images there while signed in, and the assistant then names and describes them. Drafts choose attachments by name and description, so say what is in the file and when to send it.
* **Add a note to changes** ("because the restaurant now closes on Mondays"). The note is kept in the change log and makes the history easier to read.

## Limits

To keep the dashboard responsive for everyone, an assistant's calls are rate-limited per token and per company. An assistant that goes over a limit is told how long to wait and continues afterwards. Nothing is lost. The size limits of the dashboard apply to texts written through an assistant too.

## For Developers

The same operations are available as REST endpoints with the same personal tokens, alongside the existing company API. Endpoint details are in the [Opally API docs](https://opally.gitbook.io/opally-api-docs).

Any MCP client that supports streamable HTTP with a bearer token can connect to the server address above. Clients that support OAuth are taken through Opally's sign-in and consent page automatically. Client-side details (transport, OAuth discovery, tool list) are on the [MCP Server](https://opally.gitbook.io/opally-api-docs/mcp/overview) page there.
