> ## 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.

# Connect your MCP client

> Chat with Omni and operate xpander from Claude, ChatGPT, Cursor, and other MCP clients

Omni is the agent built into every xpander organization: it can answer directly, task your other agents, build and edit agents, manage schedules, and search your organization's knowledge. The Omni MCP endpoint puts all of that behind a single URL you connect to Claude, ChatGPT, Cursor, or any MCP-compatible client, so you work with Omni without leaving Xpander Chat you're already in.

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

Once connected, you can:

* Chat with Omni straight from your MCP client, and keep the conversation going across turns
* Kick off long-running work asynchronously and poll for the result
* Ask Omni to task your other agents, build or edit agents, and search your organization's knowledge - all through the conversation
* Authenticate once with OAuth 2.1 - you sign in with your xpander credentials, and every call runs with your permissions, where systems allow

<Note>
  This is a different endpoint from the [API's MCP endpoint](/api-reference/mcp) (`api.xpander.ai/mcp/`, also OAuth 2.1), which is the xpander API, control plane and data plane, exposed over MCP and is not an agent. Omni is the agent: one endpoint for everything you can do through Xpander Chat. The Omni endpoint is scoped to **you**: your OAuth sign-in resolves your own conversations with Omni and applies your access.
</Note>

## Calls

| Call | What it does |
| - | - |
| `ask_omni` | Send Omni a message and wait for its answer. Returns Omni's Markdown reply plus a `conversation_id`. |
| `ask_omni_async` | Send Omni a message without waiting. Returns the `conversation_id` immediately; poll with `get_omni_task`. |
| `get_omni_task` | Check the status and result of a conversation started with `ask_omni` / `ask_omni_async`. |

These calls are deliberately the whole surface: everything else - discovering agents, building them, managing tasks, searching knowledge - happens by asking Omni for it in the conversation. Omni runs under your xpander identity, so which agents and data a request can touch is always bounded, where systems allow, by what your own account may reach inside xpander. If you want a direct surface for one specific agent instead, use the [API's MCP endpoint](/api-reference/mcp).

### Multi-turn conversations

Every answer includes a `conversation_id`. Pass it back into `ask_omni` (or `ask_omni_async`) to continue the same conversation - Omni keeps the full thread, exactly like a chat.

```text theme={"dark"}
You:  ask_omni("What did the support agent handle this week?")
Omni: Conversation ID: task_abc123
      This week the support agent closed 42 tickets...

You:  ask_omni("Draft a summary email to the team", conversation_id="task_abc123")
Omni: Conversation ID: task_abc123
      Here's a draft: ...
```

### Long-running work

Omni runs can take from seconds to minutes (skill calls, multi-step reasoning, tasking other agents). For work that might exceed your client's call timeout, start it with `ask_omni_async` and poll `get_omni_task` with the returned `conversation_id` until it's done.

## Authentication

The Omni endpoint signs in with **OAuth 2.1 only**. There is no API key to copy into a config file. ChatGPT, Claude Code, Claude Desktop, Cursor and most current MCP clients discover the sign-in from the URL and open it in the browser. You sign in once with your xpander account, the client stores the token, and every call is recorded under your name and runs with your permissions, where systems allow.

<Note>
  Because the sign-in is personal, the connection is too: the endpoint resolves to **your** Omni, sees your conversations, and acts with your access, where systems allow - nothing to configure.
</Note>

## Connect from a client

<Tabs>
  <Tab title="Claude Code">
    Add the endpoint once from the terminal, then sign in from inside a session:

    ```bash theme={"dark"}
    claude mcp add --transport http omni https://omni.xpander.ai/mcp
    ```

    In Claude Code, run `/mcp`, pick **omni** and complete the browser sign-in. From then on ask in plain words: *"Ask Omni what my agents did today"* or *"Deploy this agent to xpander as a scheduled task."* On a self-hosted install replace the address with your installation's MCP origin.
  </Tab>

  <Tab title="Claude Desktop">
    Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) and add the Omni endpoint. With OAuth, `mcp-remote` runs the sign-in flow the first time you start Claude:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "xpander-omni": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote@latest",
            "https://omni.xpander.ai/mcp"
          ]
        }
      }
    }
    ```

    Restart Claude Desktop after saving; `mcp-remote` opens the browser sign-in the first time. Then ask: *"Ask Omni what my agents did today."*
  </Tab>

  <Tab title="ChatGPT">
    In ChatGPT, add `https://omni.xpander.ai/mcp` as a remote MCP endpoint. ChatGPT runs the OAuth flow; sign in with your xpander credentials to authorize it. Once connected, the `ask_omni` calls appear in its list.
  </Tab>

  <Tab title="Cursor / Windsurf">
    Add the endpoint to your client's MCP config with the URL `https://omni.xpander.ai/mcp`. The client discovers the OAuth flow from the URL and opens the sign-in on first use.
  </Tab>
</Tabs>

## How Omni responds over MCP

Runs that arrive through the MCP endpoint are marked as MCP-sourced, and Omni adapts to the channel: because MCP clients render plain Markdown (no interactive xpander cards), Omni answers in clean, self-contained Markdown and never raises a card that would stall the run. If a task needs something it can't get non-interactively - a credential that has not been added yet, or a skill that needs authorization - Omni does as much as it can and tells you in its reply what's missing and how to resolve it in Xpander Chat.

In Xpander Chat, these conversations show up in Task Manager tagged with their origin - for example "MCP - ChatGPT" or "MCP - Claude" - so you can always tell which client a run came from.

If Omni needs you to authorize a skill mid-run, `ask_omni` returns the authorization link right away along with the `conversation_id`. Complete the authorization, then fetch the result with `get_omni_task` - the run resumes on its own.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Calls fail with 401 / unauthorized">
    The endpoint is OAuth-only - an `x-api-key` header (or any static key) is not accepted. Remove any key-based config, re-add the endpoint, and complete the browser sign-in with your xpander credentials.
  </Accordion>

  <Accordion title="OAuth sign-in loops or fails">
    * Make sure the URL is exactly `https://omni.xpander.ai/mcp`.
    * Complete the sign-in in the browser window the client opens; some clients cache a stale token - remove and re-add the endpoint to restart the flow.
  </Accordion>

  <Accordion title="Omni asks me to authorize a skill">
    Open the link from Omni's reply, complete the authorization in Xpander Chat, then call `get_omni_task` with the same `conversation_id` to get the finished result.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="MCP API endpoint" icon="bridge" href="/api-reference/mcp">
    List and invoke your agents over MCP with an API key
  </Card>

  <Card title="What is Omni" icon="sparkles" href="/use/app#omni-the-built-in-agent">
    Learn what Omni can do across xpander
  </Card>
</CardGroup>


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