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

# Connect your AI client

> Paste the Mesh Pilot MCP endpoint and your key into Claude, Cursor, Gemini CLI, or any MCP client.

Once you've [minted a key](/developers/mcp-keys), point any MCP-aware client at the Mesh Pilot server. Every client uses the **same** endpoint and bearer key.

```
Endpoint:  https://mcp.meshpilot.app/mcp
Auth:      Authorization: Bearer mp_mcp_…your key…
Transport: streamable HTTP
```

<Note>
  Connect your platforms (Meta, Amazon, etc.) under Settings → Integrations <b>before</b> connecting a client. The MCP server acts on those cockpit connections; your AI client never sees platform credentials.
</Note>

## Claude Code

```bash theme={null}
claude mcp add --transport http mesh-pilot https://mcp.meshpilot.app/mcp \
  --header "Authorization: Bearer mp_mcp_your_key_here"
```

## Claude Desktop / Cursor / generic MCP config

Most clients accept a JSON server entry:

```json theme={null}
{
  "mcpServers": {
    "mesh-pilot": {
      "type": "http",
      "url": "https://mcp.meshpilot.app/mcp",
      "headers": {
        "Authorization": "Bearer mp_mcp_your_key_here"
      }
    }
  }
}
```

## Gemini CLI, ChatGPT, and others

Any client that supports a remote/streamable-HTTP MCP server works: give it the URL `https://mcp.meshpilot.app/mcp` and the `Authorization: Bearer` header with your key.

## Verify the connection

Ask your client to list what it can do, or call the `whoami` tool — it returns the brands, platforms, access mode, and limits your key resolves to. If `whoami` shows the expected ceiling, you're connected.

## Try it

* "Audit my Ayurpet Meta account."
* "Show me approval-pending actions."
* "Approve the scale on campaign 9234 and reject the rest."

Write actions land in your [Inbox](/cockpit/inbox) as proposals (unless an autonomy threshold lets them auto-run), and everything is recorded in the [audit log](/developers/audit-log).

## Troubleshooting

* **401 / unauthorized** — the key is wrong, revoked, or expired. Mint a fresh one in Settings → MCP.
* **"No credentials for brand …"** — the platform isn't connected for that brand, or needs reconnect. Fix it under Settings → Integrations.
* **Calls refused (denied)** — the key's scope excludes that brand/platform, it's read-only attempting a write, or it hit its daily rate limit. Check [scopes & roles](/developers/scopes-and-roles).

<Card title="Manage your keys" icon="arrow-right" href="/developers/mcp-keys">
  Settings → MCP.
</Card>
