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

# Setup

> Connect the Mavel MCP server to Claude Desktop, Cursor, VS Code, or Windsurf.

All clients use the same server URL and the same browser-based OAuth consent
flow: no API keys, no manual token handling.

```
https://mcp.mavel.ai/api/mcp
```

<Tabs>
  <Tab title="Claude Desktop">
    1. Open Claude Desktop → **Settings → Developer → Edit Config**.
    2. Add the Mavel server:

    ```json theme={null}
    {
      "mcpServers": {
        "mavel": {
          "transport": {
            "type": "streamable-http",
            "url": "https://mcp.mavel.ai/api/mcp"
          }
        }
      }
    }
    ```

    3. Restart Claude Desktop. The first tool call triggers the OAuth flow.
    4. Approve in the popup. Tokens are stored in Claude Desktop's keychain.

    Slash commands (`/weekly_pulse`, `/competitor_radar`, …) are available in
    the prompt picker; each takes `project_id` as its first argument.
  </Tab>

  <Tab title="Cursor">
    1. Cursor → **Settings (⌘,) → Features → MCP**.
    2. Add a new server: set Name to `mavel`, URL to
       `https://mcp.mavel.ai/api/mcp`, and Type to streamable-http.
    3. Save, then click **Authorize**, which opens the OAuth consent flow in
       your browser.
    4. Approve. Cursor stores the access token and refreshes it automatically.

    Use `@mavel` in chat to invoke tools; slash prompts appear in the prompt
    picker.
  </Tab>

  <Tab title="VS Code">
    Requires an MCP-capable extension.

    1. `Cmd+Shift+P` → **MCP: Add Server**.
    2. Choose **Streamable HTTP**, URL `https://mcp.mavel.ai/api/mcp`.
    3. The extension handles the OAuth flow and persists the token in VS
       Code's secret storage.
    4. Tools and prompts appear in the MCP panel.
  </Tab>

  <Tab title="Windsurf">
    1. **Settings → MCP Servers → Add**.
    2. Type: HTTP. URL: `https://mcp.mavel.ai/api/mcp`.
    3. Approve in the OAuth popup that opens.
    4. Tools and prompts are immediately available in the agent panel.
  </Tab>
</Tabs>

<Tip>
  On the consent page you choose whether to grant `mcp:write`. Read-only
  access (`mcp:read`) is enough for reports and analyses; grant write access
  only if you want your assistant to create or edit prompts, brands, topics,
  and tags on your behalf.
</Tip>

## Managing connected agents

Every agent you connect appears in the dashboard under
**[Settings → Connected agents](https://app.mavel.ai/connected-agents)**. Each
row is one client, showing the access it was granted and when it connected.

* **Revoke** disconnects an agent right away. Its next tool call gets a `401`
  and it stops working. Nothing is deleted, so you can reconnect any time by
  running the setup flow again (for example, re-add the server, or run `/mcp` in
  Claude Code) and approving on the consent page.
* An agent you have not used for 90 days drops off the list automatically once
  its refresh token expires. No action is needed.

<Note>
  Revoking here is the recommended way to disconnect a lost or untrusted client.
  If you are building a custom client, you can also revoke a single token
  programmatically with [`POST /api/mcp/oauth/revoke`](/mcp/authentication) (RFC
  7009\).
</Note>
