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

# MCP Setup Guide

This guide walks you through connecting any MCP-compatible client (Cursor, Claude Desktop, and others) to Elementary's remote MCP server.

The server is available at:

```
https://prod.api.elementary-data.com/mcp/
```

## Authentication

<Tabs>
  <Tab title="OAuth 2.1 (recommended)">
    Elementary's MCP server supports the **Streamable HTTP** transport with **OAuth 2.1** and dynamic client registration.

    When you start the MCP server for the first time, your client opens a browser window so you can log in with your Elementary account. The MCP server uses your authenticated user's permissions directly (user-scoped).

    Use the following config in the client setup steps below:

    ```json filename="mcp.json" theme={null}
    {
      "mcpServers": {
        "Elementary": {
          "url": "https://prod.api.elementary-data.com/mcp/"
        }
      }
    }
    ```

    <Note>
      Re-authentication is only required when your session expires or you explicitly sign out.
    </Note>
  </Tab>

  <Tab title="Access token">
    Use this method for headless setups, CI environments, or any client that doesn't support browser-based OAuth.

    #### Prerequisites

    | Requirement                 | Why it's needed                                          |
    | --------------------------- | -------------------------------------------------------- |
    | **Node.js 18 LTS or newer** | `mcp-remote` runs on Node. Verify with `node --version`. |
    | **npm / npx**               | `npx` fetches `mcp-remote` on demand. Bundled with Node. |

    <Tip>
      If you don't have Node.js installed, use [nvm](https://github.com/nvm-sh/nvm) for easy installation:

      ```bash theme={null}
      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
      # Restart your terminal, then:
      nvm install --lts && nvm use --lts
      ```
    </Tip>

    #### Generate an access token

    Go to [User → Personal Tokens](https://app.elementary-data.com/settings/user-tokens) or [Account → Account Tokens](https://app.elementary-data.com/settings/account-tokens) and click **Generate token**. Copy the token and store it securely — it is shown only once.

    * **Personal tokens** are user-scoped and inherit your workspace permissions.
    * **Account tokens** are account-scoped with "Can View" permissions.

    Treat tokens like passwords: do not share or commit them, rotate regularly, and revoke immediately if compromised.

    #### Install `mcp-remote` (optional)

    Our configs use `npx` to fetch `mcp-remote` automatically — no global install required. If you prefer a global install:

    ```bash theme={null}
    npm install -g mcp-remote@latest
    ```

    Use the following config in the client setup steps below:

    ```jsonc filename="mcp.json" theme={null}
    {
      "mcpServers": {
        "elementary-remote": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote@latest",
            "https://prod.api.elementary-data.com/mcp/",
            "--header",
            "Authorization:${AUTH_HEADER}"
          ],
          "env": {
            "AUTH_HEADER": "Bearer <AUTH_TOKEN>"
          }
        }
      }
    }
    ```

    Replace `<AUTH_TOKEN>` with the token you generated above.
  </Tab>
</Tabs>

***

## Configure your client

<Tabs>
  <Tab title="Claude Connector">
    <Steps>
      <Step title="Add Elementary as a custom connector">
        Click the link below to open Claude with the Elementary connector pre-filled:

        [Add Elementary connector →](https://claude.ai/customize/connectors?modal=add-custom-connector\&connectorName=Elementary\&connectorUrl=https%3A%2F%2Fprod.api.elementary-data.com%2Fmcp)

        <Frame>
          <img src="https://mintcdn.com/elementary/q3hCMl2_P87i_AbG/pics/cloud/mcp/claude-add-custom-connector.png?fit=max&auto=format&n=q3hCMl2_P87i_AbG&q=85&s=94c9d2abbe752db944af76da3bebbae9" width="950" height="1024" data-path="pics/cloud/mcp/claude-add-custom-connector.png" />
        </Frame>

        Click **Add**. The Elementary connector will appear in your connectors list.
      </Step>

      <Step title="Connect and authenticate">
        Click **Connect**. A browser window opens for you to log in with your Elementary account.

        <Frame caption="Elementary connector added — click Connect to authenticate">
          <img src="https://mintcdn.com/elementary/q3hCMl2_P87i_AbG/pics/cloud/mcp/claude-connector-connect.png?fit=max&auto=format&n=q3hCMl2_P87i_AbG&q=85&s=bface4604140f9d2e6935185ff708dbf" alt="Elementary connector added — click Connect to authenticate" width="1024" height="514" data-path="pics/cloud/mcp/claude-connector-connect.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Claude MCP config">
    <Steps>
      <Step title="Open Developer settings">
        In the menu bar, choose **Claude → Settings → Developer** and click **Edit** under **Local MCP Servers**.
      </Step>

      <Step title="Add the server">
        Paste the JSON block from the authentication tab above and save.
      </Step>

      <Step title="Restart Claude">
        Quit and reopen Claude Desktop. If using OAuth, a browser window opens on first launch for authentication.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Cursor">
    <Steps>
      <Step title="Open MCP settings">
        Go to **Settings → Model Context Protocol → Add Custom Server**, or edit `~/.cursor/mcp.json` (global) / `<project>/.cursor/mcp.json` (workspace).
      </Step>

      <Step title="Add the server">
        Paste the JSON block from the authentication tab above and save. Cursor restarts its MCP agent automatically.
      </Step>

      <Step title="Authenticate">
        If using OAuth, a browser window opens on first launch. Log in with your Elementary account to complete authentication.
      </Step>
    </Steps>
  </Tab>
</Tabs>
