# Connect over MCP

> One endpoint, OAuth, no API key - how to point any MCP client at Advibly.

Source: https://advibly.com/docs/agents/mcp



Advibly's MCP server is at:

```
https://advibly.com/mcp
```

Transport is **Streamable HTTP**. Authentication is **OAuth 2.1** with dynamic
client registration and PKCE. There is no API key to create, copy or leak - you
sign in in a browser once and the client holds the token.

This page is the client-independent setup. If the client has its own page under
[Clients](/agents/clients/claude), follow that page first and return here for
the connection contract and first calls.

## Adding it [#adding-it]

<Tabs items="[&#x22;Claude Code&#x22;, &#x22;Cursor / Claude Desktop&#x22;, &#x22;VS Code&#x22;, &#x22;Codex&#x22;, &#x22;OpenClaw&#x22;]">
  <Tab value="Claude Code">
    ```bash
    claude mcp add --transport http advibly https://advibly.com/mcp
    ```

    Then run `/mcp` inside Claude Code and sign in when prompted.
  </Tab>

  <Tab value="Cursor / Claude Desktop">
    ```json
    {
      "mcpServers": {
        "advibly": {
          "url": "https://advibly.com/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab value="VS Code">
    ```json
    {
      "servers": {
        "advibly": {
          "type": "http",
          "url": "https://advibly.com/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab value="Codex">
    ```toml
    [mcp_servers.advibly]
    url = "https://advibly.com/mcp"
    ```

    Then:

    ```bash
    codex mcp login advibly
    ```
  </Tab>

  <Tab value="OpenClaw">
    ```bash
    openclaw mcp set advibly '{"url":"https://advibly.com/mcp","transport":"streamable-http","auth":"oauth"}'
    openclaw mcp login advibly
    ```
  </Tab>
</Tabs>

For ChatGPT, add it as a connector rather than a config file - see
[ChatGPT](/agents/clients/chatgpt). The Clients section contains the complete
setup for every supported client.

## How the auth works [#how-the-auth-works]

You do not need to know this to use it, but it helps when something goes wrong:

1. The client calls the endpoint unauthenticated and gets a `401`.
2. The `401` points at `/.well-known/oauth-protected-resource/mcp`.
3. That points at Advibly's authorization server metadata, which registers the
   client dynamically and then hands off to the sign-in flow.
4. The client gets a token and uses it as a bearer on every call.

Every tool call acts as the signed-in Advibly account, and generation tools
spend that account's credits.

## First calls [#first-calls]

Verify the connection with `advibly_list_brands`. It proves that tool discovery,
OAuth, and account access all work without spending credits:

```json
{
  "name": "advibly_list_brands",
  "arguments": {
    "context": "Finding the available brand contexts and identifiers before starting the user's requested creative production workflow through Advibly."
  }
}
```

which gives you the `brand_id` every generation tool needs.

The setup is complete when the call returns the user's brands—or an empty list
for a new account—without an authentication error. Then call
`advibly_check_credits` before planning billable work.

## Onboarding a brand without the app [#onboarding-a-brand-without-the-app]

If the account has no brand yet, a new user still never has to open a browser
tab. `advibly_onboard_brand` runs the real onboarding from a URL and returns a
brand that behaves exactly like one created in the app.

```
advibly_onboard_brand {
  url: "acme.com",
  context: "Creating the account's primary brand context from its public website before producing the requested campaign assets."
}
```

It is idempotent: re-running it with a URL the account already has returns the
existing brand rather than creating a second one. On the account's *first*
brand it also returns plan options, because that is the point at which the
[brand limit](/reference/limits) starts to matter.

After onboarding, keep the returned `brand_id`; do not guess it from the brand
name or URL.

## Connection failures [#connection-failures]

| Symptom                                         | Next action                                                                                                        |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `401` or sign-in loop                           | Remove the stale connection in the client, add the endpoint again, and complete OAuth in the same browser session. |
| Server cannot be reached                        | Confirm the URL is exactly `https://advibly.com/mcp` and the transport is Streamable HTTP.                         |
| Tools appear but calls reject `context`         | Send a 15–25 word, third-person reason for the call; see [Tool reference](/agents/tools#the-call-contract).        |
| Tool names or arguments differ from this manual | Refresh `tools/list`; the live schema is authoritative.                                                            |

## Discovery endpoints [#discovery-endpoints]

| Path                    | What it is                             |
| ----------------------- | -------------------------------------- |
| `/.well-known/mcp.json` | Endpoint, transport and authentication |
| `/agents.md`            | When to use Advibly, in markdown       |
| `/llms.txt`             | Product overview                       |
| `/docs/llms.txt`        | This manual, indexed                   |
