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

# Setup

> Generate an MCP token and connect Claude, Cursor, or Claude Desktop

# Setup

The Gomry MCP server is a hosted **remote MCP** endpoint. You don't install anything locally — you generate a token, paste a URL into your AI client, and you're done.

## 1. Generate a token

<Steps>
  <Step title="Open the MCP settings page">
    In your Gomry dashboard, go to **Organization Settings → MCP**.

    <Note>
      The MCP tab is only visible to **admins and owners** of an organization.
    </Note>
  </Step>

  <Step title="Click Generate Token">
    A new token is created and the full MCP URL is shown once:

    ```
    https://www.gomry.com/api/mcp?token=YOUR_TOKEN_HERE
    ```

    Copy this URL immediately — the raw token is never shown again.
  </Step>

  <Step title="(Optional) Revoke previous tokens">
    Generating a new token automatically revokes any prior token for the same user + org. You'll always have at most one active token at a time per organization you belong to.
  </Step>
</Steps>

<Warning>
  Treat the token like a password. Anyone with this URL can read your organization's data through MCP. Don't paste it in shared docs, screenshots, or chat. Revoke it from the same page if it leaks.
</Warning>

## 2. Connect your AI client

<Tabs>
  <Tab title="Claude">
    1. Open **Settings → Connectors** (or **Tools**, depending on the version).
    2. Click **Add a connector** → **Custom MCP server**.
    3. Paste the URL you copied:
       ```
       https://www.gomry.com/api/mcp?token=YOUR_TOKEN_HERE
       ```
    4. Save. Claude will call `tools/list` and show the available Gomry tools in the picker.
  </Tab>

  <Tab title="Cursor">
    Add this entry to your `~/.cursor/mcp.json` (create the file if it doesn't exist):

    ```json theme={null}
    {
      "mcpServers": {
        "gomry": {
          "url": "https://www.gomry.com/api/mcp?token=YOUR_TOKEN_HERE"
        }
      }
    }
    ```

    Restart Cursor. The Gomry tools appear in the agent's tool picker.
  </Tab>

  <Tab title="Claude Desktop">
    Edit your Claude Desktop config file:

    * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

    Add the Gomry server:

    ```json theme={null}
    {
      "mcpServers": {
        "gomry": {
          "url": "https://www.gomry.com/api/mcp?token=YOUR_TOKEN_HERE"
        }
      }
    }
    ```

    Restart Claude Desktop.
  </Tab>
</Tabs>

## 3. Verify it works

In your client, ask:

> "List my events."

The assistant should invoke the `list_events` tool and return your organization's events. If you see a 401 error, the token is missing or revoked. If you see "tool not found," your privileges don't include the required scope (see [Available tools](/mcp/tools)).

## Authentication details

The MCP endpoint accepts the token in any of these forms — clients vary in which they use:

| Source                 | Example                                 |
| ---------------------- | --------------------------------------- |
| Query parameter        | `?token=YOUR_TOKEN_HERE`                |
| Authorization header   | `Authorization: Bearer YOUR_TOKEN_HERE` |
| Legacy query parameter | `?api_key=YOUR_TOKEN_HERE`              |

Claude typically uses the URL `?token=` for the initial handshake and switches to `Authorization: Bearer` for subsequent tool calls. Both refer to the same token.

## Revoking a token

Open **Organization Settings → MCP** and click **Revoke**. Within five minutes (server-side cache TTL), the token stops working everywhere. Generate a fresh one any time — revocation is the safe path when in doubt.

## Errors you might hit

| Status              | Body                           | Meaning                                                                          |
| ------------------- | ------------------------------ | -------------------------------------------------------------------------------- |
| `401`               | `Missing authentication.`      | No token sent. Check the URL or header.                                          |
| `401`               | `Invalid or revoked MCP token` | Token doesn't match an active record. Regenerate.                                |
| `429`               | `Rate limit exceeded.`         | More than 120 requests/minute for this token. Slow down.                         |
| `-32001` (JSON-RPC) | `Tool not found: …`            | The tool exists but your privileges don't include it, OR the tool name is wrong. |
