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

# Client setup

> Configure Memory MCP in Cursor, Claude Code, VS Code, scripts, ChatGPT, Claude web, and Perplexity.

<CardGroup cols={2}>
  <Card title="Desktop agents" icon="laptop" href="#desktop-agents">
    Cursor, Claude Code, scripts, VS Code — use a `pam_mkey` API key.
  </Card>

  <Card title="Browser LLM" icon="globe" href="#browser-llm-connectors">
    ChatGPT, Claude web, Perplexity — OAuth via MCP URL.
  </Card>
</CardGroup>

<Note>
  **Endpoint:** `https://api.pam.harmix.ai/v1/mcp/memory`

  Copy your account MCP URL from [Setup](https://pam.harmix.ai/setup). Generate or rotate a desktop key on [Setup](https://pam.harmix.ai/setup) or [Access](https://pam.harmix.ai/access-management). Auth details: [Setup and keys](/docs/setup-and-keys).
</Note>

<h2 id="browser-llm-connectors">
  Browser LLM connectors
</h2>

Use OAuth 2.1 + PKCE. **The MCP URL alone is enough** for clients that support OAuth discovery — they register via dynamic client registration (DCR) automatically.

<Tabs>
  <Tab title="ChatGPT">
    [Open ChatGPT](https://chatgpt.com) and follow these steps:

    <Steps>
      <Step title="Open Apps settings">
        Open **Settings** → **Apps**.
      </Step>

      <Step title="Enable Developer mode">
        Open **Advanced settings** and turn on **Developer mode** (accept the elevated-risk notice if shown).
      </Step>

      <Step title="Create app">
        Click **Create app** (from Advanced settings or the Enabled apps section).
      </Step>

      <Step title="Name the app">
        **Name:** anything you like (e.g. PAM Memory).
      </Step>

      <Step title="Paste MCP URL">
        Under **Connection**, choose **Server URL** and paste your MCP URL from [Setup](https://pam.harmix.ai/setup). Leave **Authentication** as **OAuth** — no client ID is required when discovery is enabled.
      </Step>

      <Step title="Create connector">
        Check **I understand and want to continue**, then click **Create**.
      </Step>

      <Step title="Sign in">
        Click **Sign in with** \[your app name]. ChatGPT opens PAM in your browser to sign in if needed.
      </Step>

      <Step title="Approve access">
        On the PAM approval screen, click **Approve** to grant `memory:read` access. You will be redirected back to ChatGPT.
      </Step>
    </Steps>

    <Tip>
      ChatGPT uses per-connector redirect URLs such as `https://chatgpt.com/connector/oauth/{id}`. PAM accepts trusted `chatgpt.com` callback paths automatically.
    </Tip>
  </Tab>

  <Tab title="Claude web">
    [Open Claude](https://claude.ai) and follow these steps:

    <Steps>
      <Step title="Add connector">
        In Claude, open **Settings** → **Connectors** → **Add custom connector**.
      </Step>

      <Step title="Name the connector">
        **Name:** anything you like (e.g. PAM Memory).
      </Step>

      <Step title="Paste MCP URL">
        **Remote MCP server URL:** paste your MCP URL from [Setup](https://pam.harmix.ai/setup).
      </Step>

      <Step title="Add">
        Click **Add**. Claude opens PAM in your browser if you are not signed in yet.
      </Step>

      <Step title="Approve access">
        On the approval screen, click **Approve** to grant `memory:read` access.
      </Step>
    </Steps>

    <Note>
      Claude web may show the connector as added before you approve in PAM. Access starts only after you click **Approve** on the PAM consent screen.
    </Note>
  </Tab>

  <Tab title="Perplexity">
    [Open Perplexity](https://www.perplexity.ai) and follow these steps:

    <Steps>
      <Step title="Open Customize">
        In Perplexity, open **Customize** in the left sidebar.
      </Step>

      <Step title="Open Connectors">
        Click **Connectors**.
      </Step>

      <Step title="Add custom connector">
        Choose **Custom connector**.
      </Step>

      <Step title="Name the connector">
        Enter a connector name (e.g. PAM Memory).
      </Step>

      <Step title="Paste description">
        Paste the description below into the **Description** field.
      </Step>

      <Step title="Paste MCP URL">
        Paste your MCP server URL from [Setup](https://pam.harmix.ai/setup) into the **MCP URL** field.
      </Step>

      <Step title="Save and approve">
        Save the connector, then sign in to PAM and approve `memory:read` when prompted.
      </Step>
    </Steps>

    ```text Connector description (paste into Perplexity) theme={null}
    Read-only access to your company's internal context — people, projects, decisions, and processes — when your questions need organizational memory.
    ```
  </Tab>

  <Tab title="Other">
    <Steps>
      <Step title="Open connector settings">
        Open your browser LLM connector or MCP settings.
      </Step>

      <Step title="Add MCP URL">
        Add the MCP server URL from [Setup](https://pam.harmix.ai/setup) and choose **OAuth** if available.
      </Step>

      <Step title="Approve access">
        Complete PAM login and approve `memory:read` when prompted.
      </Step>
    </Steps>
  </Tab>
</Tabs>

<AccordionGroup>
  <Accordion title="Advanced OAuth details">
    Browser clients resolve OAuth from:

    | Endpoint                                      | Purpose                                |
    | --------------------------------------------- | -------------------------------------- |
    | `GET /.well-known/oauth-protected-resource`   | Protected resource metadata (RFC 9728) |
    | `GET /.well-known/oauth-authorization-server` | Authorization server metadata          |
    | `POST /v1/oauth/register`                     | Dynamic client registration (DCR)      |

    Scope: `memory:read` (read-only company memory retrieval).

    **Token refresh:** After the initial OAuth approval, compliant clients call `POST /v1/oauth/token` with `grant_type=refresh_token` to obtain a new access token without asking you to sign in again. Access tokens last about 1 hour; refresh tokens last about 30 days. PAM rotates the refresh token on every refresh (OAuth 2.1 best practice). If a refresh token is reused, the entire connection family is revoked and you must reconnect.

    **Claude web — optional OAuth Client ID:** For ChatGPT and other clients that support OAuth discovery, the MCP URL alone is enough. If Claude asks for credentials under **Advanced settings**, expand **Advanced settings**, paste the **OAuth Client ID** from [Setup](https://pam.harmix.ai/setup) (or `oauth_client_id` from `GET /v1/dev/mcp-config`), and leave **OAuth Client Secret** blank (public client + PKCE).
  </Accordion>

  <Accordion title="Manage browser connections">
    View and revoke browser LLM connections from [Access](https://pam.harmix.ai/access-management), or use the Developer REST API:

    | Method | Path                                    | Purpose                                               |
    | ------ | --------------------------------------- | ----------------------------------------------------- |
    | `GET`  | `/v1/dev/oauth-connections`             | List active, expired, and revoked browser connections |
    | `POST` | `/v1/dev/oauth-connections/{id}/revoke` | Revoke one connection (entire refresh-token family)   |
  </Accordion>
</AccordionGroup>

<h2 id="desktop-agents">
  Desktop agents
</h2>

Desktop and script clients use a static `pam_mkey` in the `Authorization` header. See [Setup and keys](/docs/setup-and-keys) for key format and rotation.

<Tabs>
  <Tab title="Cursor">
    <Steps>
      <Step title="Open MCP settings">
        Open Cursor and go to **Settings** → **MCP** (or run `Ctrl+Shift+P` → **Open MCP settings**).
      </Step>

      <Step title="Add server">
        Click **Add new global MCP server** (or project MCP server).
      </Step>

      <Step title="Configure auth">
        Paste the MCP server URL and `Authorization: pam_mkey_<key>` header. Generate a key on [Setup](https://pam.harmix.ai/setup) if you do not have one yet.
      </Step>

      <Step title="Paste config (optional)">
        If your client asks for a full config block, paste the JSON below.
      </Step>

      <Step title="Test">
        Run the [hello world prompt](#test-your-connection) from Cursor to verify `retrieve_memory` works.
      </Step>
    </Steps>

    ```json theme={null}
    {
      "mcpServers": {
        "pam_memory": {
          "url": "https://api.pam.harmix.ai/v1/mcp/memory",
          "headers": {
            "Authorization": "pam_mkey_<key>"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code">
    <Steps>
      <Step title="Open MCP config">
        Open your Claude Code MCP config file (typically `~/.claude/claude_desktop_config.json` or project MCP settings).
      </Step>

      <Step title="Paste config">
        Paste the config JSON below under `mcpServers.pam_memory`, or use the CLI command.
      </Step>

      <Step title="Test">
        Run the [hello world prompt](#test-your-connection) to verify `retrieve_memory` works.
      </Step>
    </Steps>

    ```bash theme={null}
    claude mcp add --transport http pam_memory https://api.pam.harmix.ai/v1/mcp/memory \
      --header "Authorization: pam_mkey_<key>"
    ```

    ```json theme={null}
    {
      "mcpServers": {
        "pam_memory": {
          "type": "http",
          "url": "https://api.pam.harmix.ai/v1/mcp/memory",
          "headers": {
            "Authorization": "pam_mkey_<key>"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Script / terminal">
    <Steps>
      <Step title="Generate a key">
        Generate a static API key on [Setup](https://pam.harmix.ai/setup) or [Access](https://pam.harmix.ai/access-management) if you do not have one yet.
      </Step>

      <Step title="Set Authorization header">
        Send requests to the MCP URL with `Authorization: pam_mkey_<key>` (no `Bearer` prefix).
      </Step>

      <Step title="Call retrieve_memory">
        Use JSON-RPC `tools/call` with `retrieve_memory` and your prompt.
      </Step>
    </Steps>

    <Expandable title="Example tools/call payload">
      Minimal JSON-RPC example for server-side agents and scripts:

      ```json theme={null}
      {
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/call",
        "params": {
          "name": "retrieve_memory",
          "arguments": {
            "prompt": "What do we know about our current project priorities, and who is responsible for follow-up on each?"
          }
        }
      }
      ```
    </Expandable>
  </Tab>

  <Tab title="VS Code">
    Create or update `.vscode/mcp.json` in your workspace:

    ```json theme={null}
    {
      "servers": {
        "pam_memory": {
          "type": "http",
          "url": "https://api.pam.harmix.ai/v1/mcp/memory",
          "headers": {
            "Authorization": "pam_mkey_<key>"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

<h2 id="test-your-connection">
  Test your connection
</h2>

Run this hello world prompt in your agent:

```text theme={null}
What do we know about our current project priorities, and who is responsible for follow-up on each?
```

<Check>
  Confirm the call in [Request Log](https://pam.harmix.ai/request-log). A successful `retrieve_memory` marks your setup as **MCP verified** on [Setup](https://pam.harmix.ai/setup).
</Check>

## Server metadata

After connection, the MCP handshake returns:

| Field               | Value                  |
| ------------------- | ---------------------- |
| Server name         | `pam_memory_mcp`       |
| Protocol version    | `2024-11-05`           |
| Tools (v1)          | `retrieve_memory` only |
| Resources / prompts | Empty lists in v1      |

The response may include an `Mcp-Session-Id` header for session continuity.

The `retrieve_memory` tool includes MCP annotations for connector directories: `readOnlyHint: true`, `destructiveHint: false`.

<Tip>
  Prefer live values from [Setup](https://pam.harmix.ai/setup) for your MCP URL and config snippets. For automation, `GET /v1/dev/mcp-config` returns account-specific connection details (requires a PAM access JWT).
</Tip>
