# MCP server

URL: https://docs.ablyft.com/developers/reference/mcp-server/

> Connect AI assistants such as Claude, ChatGPT or Cursor to ABlyft with the Model Context Protocol.



The ABlyft MCP server lets an AI assistant work with your ABlyft account on your behalf. Through the
Model Context Protocol (MCP), an open standard for connecting assistants to tools, you can ask the assistant to list
experiments, create an experiment with a variation, change its status, or explain its results.

## What you need

* An ABlyft user with access to at least one team.
* An MCP-compatible assistant, for example Claude Desktop, Cursor or Windsurf (the app lists these as examples), or ChatGPT.

The assistant can do what **your role** allows. For example, a viewer cannot create experiments. See
[Roles & permissions](https://docs.ablyft.com/guides/projects-and-teams/roles-and-permissions/).

## Connect an assistant

1. In ABlyft, open your personal settings and go to **MCP Connections**.

2. Copy the **MCP Server URL** shown there. For the hosted app it is:

   ```text
   https://app.ablyft.com/mcp
   ```

3. Add this URL as a custom connector or MCP server in your assistant.

4. When the assistant asks, sign in to ABlyft and authorize the connection (OAuth).

5. The client now appears in the table under **MCP Connections**.

Typical menus in the assistants:

| Assistant | Where                                                                                                                       |
| --------- | --------------------------------------------------------------------------------------------------------------------------- |
| Claude    | Settings → Connectors → Add custom connector. Name it `ABlyft`, enter the URL and press **Connect**.                        |
| ChatGPT   | Settings → Plugins → MCPs tab. Name it `ABlyft`, choose type **Streamable HTTP**, enter the URL and press **Authenticate**. |

The menu names depend on the version of the assistant and may change. Refer to the documentation of your assistant for
details, and use other clients the same way: they only need the server URL.

### Manage and revoke connections

The table under **MCP Connections** shows the **Client**, its **Scopes**, when it was **Connected** and when it **Expires**.
Use **Revoke** (or select several rows to revoke them at once) to cut access. The assistant then has to be authorized again.

> **The assistant acts as you:** Everything the assistant does is done with your user and is visible like your own changes. Check what it plans to do,
> especially before starting or pausing an experiment. Revoke connections you no longer use.

## Available tools

The server is called "Ablyft Server". It offers these tools (shown with the names your assistant sees):

| Area               | Tools                                                                                                                                                                                                                    | Purpose                                                                                                                                                    |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Teams and projects | `list-teams-tool`, `list-projects-tool`                                                                                                                                                                                  | Teams you can access, and projects (optionally filtered by team)                                                                                           |
| Experiments        | `list-experiments-tool`, `show-experiment-tool`, `create-experiment-tool`, `clone-experiment-tool`                                                                                                                       | List (filter by project and status), show details, create a draft experiment, clone an experiment as a draft                                               |
| Status             | `update-experiment-status-tool`, `archive-experiment-tool`, `un-archive-experiment-tool`                                                                                                                                 | Move an experiment between draft, preview, running and paused; archive and restore                                                                         |
| Variations         | `create-variation-tool`, `edit-variation-tool`                                                                                                                                                                           | Create or edit variations, including CSS and JavaScript. For new variations, the assistant can describe the change and have an AI agent generate the code. |
| Pages              | `list-pages-tool`, `create-page-tool`, `edit-page-tool`, `clone-page-tool`                                                                                                                                               | Pages with their URL targeting rules                                                                                                                       |
| Audiences          | `list-audiences-tool`, `create-audience-tool`, `edit-audience-tool`, `clone-audience-tool`                                                                                                                               | Visitor segments and their rules                                                                                                                           |
| Goals              | `list-goals-tool`, `create-goal-tool`, `edit-goal-tool`, `clone-goal-tool`                                                                                                                                               | What you measure                                                                                                                                           |
| Attach and detach  | `attach-page-to-experiment-tool`, `detach-page-from-experiment-tool`, `attach-audience-to-experiment-tool`, `detach-audience-from-experiment-tool`, `attach-goal-to-experiment-tool`, `detach-goal-from-experiment-tool` | Connect pages, audiences and goals with experiments                                                                                                        |
| Schedules          | `list-schedules-tool`, `create-schedule-tool`, `edit-schedule-tool`, `delete-schedule-tool`                                                                                                                              | Start and end times and end conditions of experiments                                                                                                      |
| Results            | `show-experiment-results-tool`, `interpret-experiment-results-tool`                                                                                                                                                      | Per-goal statistics, and an AI interpretation                                                                                                              |

The assistant picks the tools it needs. You describe what you want in plain language, for example "Create an experiment on
the product page that makes the buy button green, with a click goal".

> **AI credits:** The interpretation of results (`interpret-experiment-results-tool`) uses an AI agent and consumes AI credits. The server's
> instructions tell the assistant to ask you first.

## Limits to know

* Status changes follow the same rules as in the app: for example, an experiment needs at least one variation, page and goal
  before it can start ([details](https://docs.ablyft.com/guides/experiments/start-pause-stop/#before-you-can-preview-or-start)). If a change is not possible, the tool returns the reason.
* Lists contain up to 50 entries per page.
* If you have access to several projects, the assistant has to tell the tool which project to use.

## Next steps

- [REST API](https://docs.ablyft.com/developers/reference/rest-api/): For scripts and integrations without an AI assistant.
- [Security](https://docs.ablyft.com/developers/consent-and-security/security/): Tokens, connections and access.

