Skip to content

Personal Access Token

A Personal Access Token (PAT) is a long-lived secret scoped to your Cohearence account. Any client holding it can read and write your data — treat it like a password.

1. Generate a token

  1. Open Settings → Connect AI.
  2. Tap Generate token.
  3. Choose an expiry — 30 days, 90 days, 1 year, or Never — and confirm.
  4. Copy the token, and/or the ready-made Cursor snippet, right away. The full token is shown once; if you lose it, revoke it and generate a new one.

Your token screen also shows the exact MCP URL for your account — copy it directly rather than retyping it into the examples below.

2. Add it to your client

Every client below connects to the same URL over Streamable HTTP, sending your token as a Bearer header. Swap in your own URL and token from the Connect AI screen.

Add an entry to .cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (global), then fully restart Cursor.

{
  "mcpServers": {
    "cohearence": {
      "url": "https://YOUR_COHEARENCE_HOST/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}

Cursor should show cohearence as connected under Settings → MCP. Prefer to keep the token out of a committed file? Export it as an environment variable and reference it with Cursor's ${env:VAR_NAME} syntax instead of pasting it directly:

"Authorization": "Bearer ${env:COHEARENCE_MCP_TOKEN}"

Claude Code reads the same mcpServers shape from .mcp.json (project root, checked into git — keep the token itself in your environment) or ~/.claude.json (personal, across all projects).

{
  "mcpServers": {
    "cohearence": {
      "type": "http",
      "url": "https://YOUR_COHEARENCE_HOST/mcp/",
      "headers": {
        "Authorization": "Bearer ${COHEARENCE_MCP_TOKEN}"
      }
    }
  }
}

Export the token in your shell first: export COHEARENCE_MCP_TOKEN="cohere_mcp_...". Start a new Claude Code session after editing the file — it's read at startup. You can also add it entirely from the CLI:

claude mcp add --scope project --transport http cohearence \
  https://YOUR_COHEARENCE_HOST/mcp/ \
  --header "Authorization: Bearer ${COHEARENCE_MCP_TOKEN}"

Add an entry under mcp_servers in ~/.hermes/config.yaml:

mcp_servers:
  cohearence:
    url: "https://YOUR_COHEARENCE_HOST/mcp/"
    headers:
      Authorization: "Bearer YOUR_TOKEN_HERE"

Run /reload-mcp in a Hermes session after saving, or restart Hermes.

Register the server with the OpenClaw CLI, which writes into mcp.servers in your OpenClaw config:

openclaw mcp set cohearence '{
  "url": "https://YOUR_COHEARENCE_HOST/mcp/",
  "transport": "streamable-http",
  "headers": { "Authorization": "Bearer ${COHEARENCE_MCP_TOKEN}" }
}'

OpenClaw expands ${VAR_NAME} references from your environment, so the token itself never needs to sit in the config file. Verify with openclaw mcp list or openclaw mcp doctor cohearence --probe.

Rotating or revoking

Tokens don't auto-renew — if one expires, generate a new one from Connect AI and update your client's config manually. To cut off a client immediately, tap Revoke next to that token; it stops working right away.