> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add xpander to your agent

> One command adds xpander to Claude Code, Codex, Claude, ChatGPT, Cursor or VS Code. Then your agent can run Claude Code or Codex in the background in the cloud.

Add xpander to the agent you already use with one address. Your agent can then start Claude Code or Codex sessions that run in the cloud, check on them, send them follow-ups and stop them. Your own machine stays free.

```
https://omni.xpander.ai/mcp
```

The transport is streamable HTTP. Sign-in is OAuth 2.1. Your client registers itself, so there is no key to copy.

## What you get when you sign in

The first time your client connects, a browser window opens. Click **Continue with Google**. If you are new to xpander, this creates your own organization on a free trial:

* \$10 of credits.
* 2 background sessions at a time.

You sign in once. The client keeps the token.

## Install

> [tab] Claude Code
>
> ```bash theme={"dark"}
> claude mcp add --transport http xpander https://omni.xpander.ai/mcp --scope user
> ```
>
> Then run `/mcp` in a Claude Code session, pick **xpander** and sign in. You can also sign in from the terminal with `claude mcp login xpander`. `--scope user` makes the server available in every project. Leave it out to add it to the current project only.

> [tab] Codex
>
> ```bash theme={"dark"}
> codex mcp add xpander --url https://omni.xpander.ai/mcp
> ```
>
> Codex finds the sign-in and opens the browser. If you close it, run `codex mcp login xpander`. The command writes this to `~/.codex/config.toml`:
>
> ```toml theme={"dark"}
> [mcp_servers.xpander]
> url = "https://omni.xpander.ai/mcp"
> ```

> [tab] Claude and Claude Desktop
>
> 1. Go to **Customize > Connectors**.
> 2. Click **+ Add**, then **Add custom connector**.
> 3. Name it `xpander` and paste `https://omni.xpander.ai/mcp`. Click **Continue**.
> 4. Keep the detected sign-in settings and click **Continue**, then **Add**.
> 5. Sign in with Google when Claude asks.
>
> xpander then works on claude.ai and in Claude Desktop. The Free plan allows one of these. On Team and Enterprise, an owner adds it first under **Organization settings > Connectors > Add > Custom > Web**. Members then click **Connect** on it under **Customize > Connectors**.

> [tab] ChatGPT
>
> 1. Open [chatgpt.com/plugins](https://chatgpt.com/plugins).
> 2. Select **+**, then **Add custom MCP server**.
> 3. Enter the name `xpander` and a short description.
> 4. Under **Connection**, enter `https://omni.xpander.ai/mcp`.
> 5. Set authentication to OAuth, review the warning and select **I understand and want to continue**.
> 6. Select **Create as a plugin** and sign in with Google.
>
> Your ChatGPT plan and workspace settings decide whether you can add xpander this way.

> [tab] Cursor
>
> [Add xpander to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=xpander\&config=eyJ1cmwiOiJodHRwczovL29tbmkueHBhbmRlci5haS9tY3AifQ==). The link opens Cursor and asks you to install the server.
>
> Or add this to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
>
> ```json theme={"dark"}
> {
>   "mcpServers": {
>     "xpander": {
>       "url": "https://omni.xpander.ai/mcp"
>     }
>   }
> }
> ```
>
> Cursor opens the browser sign-in the first time it connects.

> [tab] VS Code
>
> ```bash theme={"dark"}
> code --add-mcp '{"name":"xpander","type":"http","url":"https://omni.xpander.ai/mcp"}'
> ```
>
> Or add this to `.vscode/mcp.json`:
>
> ```json theme={"dark"}
> {
>   "servers": {
>     "xpander": {
>       "type": "http",
>       "url": "https://omni.xpander.ai/mcp"
>     }
>   }
> }
> ```
>
> VS Code opens the browser sign-in the first time it connects.

## Calls your agent can make

| Call | What it does |
| - | - |
| `start_background_session` | Starts a Claude Code or Codex session in the cloud with your prompt. Pass a public git repository URL to work on that code. Returns a session ID at once. |
| `get_session` | Status and latest output of a session. |
| `send_to_session` | Sends a follow-up message to a running session. |
| `list_sessions` | Your sessions and their status. |
| `stop_session` | Stops a session. |
| `ask_omni` | Asks Omni, the agent built into your organization, and waits for the answer. |
| `ask_omni_async` | Asks Omni without waiting. Returns a conversation ID. |
| `get_omni_task` | Status and result of a conversation with Omni. |

`start_background_session` also takes small text files. The session finds them in `shared/mcp/`.

A trial runs 2 sessions at a time. Stop one with `stop_session` to start another.

## Try it

Ask your agent in plain words:

* *"Start a Codex session in the background on [https://github.com/owner/repo](https://github.com/owner/repo) and fix the failing tests."*
* *"Run Claude Code in the cloud to write a README for [https://github.com/owner/repo](https://github.com/owner/repo). Check on it in 10 minutes."*
* *"List my background sessions and stop the ones that are done."*

## Troubleshooting

> [accordion] The client says it needs authentication
>
> Sign in again. Claude Code: `/mcp` or `claude mcp login xpander`. Codex: `codex mcp login xpander`. Claude and ChatGPT: remove xpander and add it again.

> [accordion] Calls fail with 401
>
> The server accepts OAuth tokens only. Remove any API key or header from the client config and sign in in the browser.

> [accordion] A new session does not start
>
> A trial runs 2 sessions at a time. Call `list_sessions`, then `stop_session` on one you no longer need.

## Related

* [Connect your MCP client to Omni](https://docs.xpander.ai/guides/deploy/omni-mcp.md): the same endpoint, with more about Omni and the admin calls.
* [Model Context Protocol](https://docs.xpander.ai/api-reference/mcp.md): how the sign-in works and the self-hosted addresses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.