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

# Connect coding agents over MCP

> Use Genesis from Claude Code, Claude Desktop, Cursor or Snowflake Cortex Code through the Genesis MCP server.

## Overview

Genesis runs an MCP server, so a coding agent on your laptop can list Genesis agents, open threads and ask them to do work. This page covers **Claude Code**, **Claude Desktop**, **Cursor** and **Snowflake Cortex Code** on the two ways Genesis is deployed:

* **[Snowflake Native App (SPCS)](#snowflake-native-app-spcs)**: you sign in with your own Snowflake credentials.
* **[Hosted with browser sign-in (Auth0 or another OIDC provider)](#hosted-genesis-with-browser-sign-in)**: you sign in through the browser, the same way you sign in to Genesis.

<Tip>
  Your Genesis already has these commands with your address filled in. Open **Config → MCP Gateway**, or click **MCP** in the top bar, or choose **Connect your coding agent** on the Launchpad. Pick your client's tab and copy each step. The commands below use placeholders such as `<genesis-url>` and `<snow_cli_profile>` in the same places.
</Tip>

Every client adds the server under the name `genesis`.

To connect a coding client to Genesis Desktop over MCP, open **Settings →
Configuration → MCP Gateway → Use Genesis from your coding tools → Connect**
in the Desktop app for pre-filled setup instructions.

## Snowflake Native App (SPCS)

**Before you start**

* `<genesis-url>` is the address you open Genesis at in the browser, for example `https://<endpoint>.snowflakecomputing.app`, with no trailing slash.
* Your Snowflake role needs the Genesis app's `APP_PUBLIC` application role. Without it the Snowflake ingress refuses the request.
* You need one way to sign in to Snowflake: a Snow CLI connection in `~/.snowflake/connections.toml` (`<snow_cli_profile>` is its name), or a key pair your administrator gave you (account, user, role and a private key file).
* Claude Code, Claude Desktop and Cursor run a small bridge on your machine with `npx`, so you need Node.js 20 or later. The bridge signs each request with your Snowflake credentials, so Genesis sees you as that Snowflake user. Cortex Code needs no bridge.

<Tabs>
  <Tab title="Claude Code">
    **1. Add.** Run this in your project directory, with your Snow CLI profile name:

    ```bash theme={null}
    claude mcp add genesis -- \
      npx -y @genesiscomputing/genesis-spcs-mcp@0.2.2 \
      --spcs-url <genesis-url> \
      --snow-connection <snow_cli_profile>
    ```

    Or, with the key pair your administrator gave you:

    ```bash theme={null}
    claude mcp add genesis -- \
      npx -y @genesiscomputing/genesis-spcs-mcp@0.2.2 \
      --spcs-url <genesis-url> \
      --auth private-key \
      --account <org-account> \
      --user <snowflake-user> \
      --role <snowflake-role> \
      --private-key-file /path/to/rsa_key.p8
    ```

    The key file stays on your machine; never paste it into a chat.

    **2. Check.** Run the [connection check](#check-the-bridge-connection) in a terminal.

    **3. Confirm.** Start Claude Code and run `/mcp`: `genesis` shows as connected.

    **4. Try it.** Send this prompt:

    ```text theme={null}
    Use Genesis MCP to check status and report whether the backend is reachable.
    ```
  </Tab>

  <Tab title="Claude Desktop">
    **1. Add.** Add this to `mcpServers` in `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows), with your Snow CLI profile name. **Settings > Developer > Edit Config** opens the file.

    ```json theme={null}
    {
      "mcpServers": {
        "genesis": {
          "command": "npx",
          "args": [
            "-y",
            "@genesiscomputing/genesis-spcs-mcp@0.2.2",
            "--spcs-url",
            "<genesis-url>",
            "--snow-connection",
            "<snow_cli_profile>"
          ]
        }
      }
    }
    ```

    For a key pair, replace the last two `args` with `"--auth", "private-key", "--account", "<org-account>", "--user", "<snowflake-user>", "--role", "<snowflake-role>", "--private-key-file", "/path/to/rsa_key.p8"`, using the full path to the key file.

    **2. Check.** Run the [connection check](#check-the-bridge-connection) in a terminal.

    **3. Confirm.** Restart Claude Desktop: `genesis` is listed in a new chat's tools.

    **4. Try it.** Send this prompt:

    ```text theme={null}
    Use Genesis MCP to check status and report whether the backend is reachable.
    ```
  </Tab>

  <Tab title="Cursor">
    **1. Add.** Add this to `mcpServers` in `~/.cursor/mcp.json` (or a project's `.cursor/mcp.json`), with your Snow CLI profile name, keeping any servers already there:

    ```json theme={null}
    {
      "mcpServers": {
        "genesis": {
          "command": "npx",
          "args": [
            "-y",
            "@genesiscomputing/genesis-spcs-mcp@0.2.2",
            "--spcs-url",
            "<genesis-url>",
            "--snow-connection",
            "<snow_cli_profile>"
          ]
        }
      }
    }
    ```

    For a key pair, replace the last two `args` with `"--auth", "private-key", "--account", "<org-account>", "--user", "<snowflake-user>", "--role", "<snowflake-role>", "--private-key-file", "/path/to/rsa_key.p8"`, using the full path to the key file.

    **2. Check.** Run the [connection check](#check-the-bridge-connection) in a terminal.

    **3. Confirm.** In **Cursor Settings > Tools & MCP**, `genesis` shows as connected.

    **4. Try it.** Send this prompt:

    ```text theme={null}
    Use Genesis MCP to check status and report whether the backend is reachable.
    ```
  </Tab>

  <Tab title="Cortex Code">
    **1. Add.** Run this with the name of your Snow CLI connection in `~/.snowflake/connections.toml`. Cortex Code signs each request with that connection's Snowflake session; no bridge is needed.

    ```bash theme={null}
    cortex mcp add genesis \
      <genesis-url>/mcp \
      --type http \
      --snowflake-connection <snow_cli_profile>
    ```

    A key-pair profile (`authenticator = SNOWFLAKE_JWT` with a `private_key_file`) works here too.

    **2. Confirm.** Start Cortex Code (`cortex`) and run `/mcp`: `genesis` shows as Connected.

    **3. Try it.** In Cortex Code, send this prompt:

    ```text theme={null}
    Use Genesis MCP to check status and report whether the backend is reachable.
    ```

    **The Genesis skill for Cortex Code.** Genesis also has a Cortex Code skill named `genesis`. It finds the Genesis app in your Snowflake account, helps install and activate it with your consent at each step, runs the `cortex mcp add` registration above for you, and then hands off to the skills that ship with your Genesis for proving or planning data-engineering work. Download it from **Config → MCP Gateway → Cortex Code** (**Download the Genesis skill**). Cortex Code loads user skills from `~/.snowflake/cortex/skills/`; unzip the download there (`unzip genesis-cortex-code-skill.zip -d ~/.snowflake/cortex/skills/`), or run `cortex skill add <path-to>/genesis`, then check it with `cortex skill list`.
  </Tab>
</Tabs>

### Check the bridge connection

Claude Code, Claude Desktop and Cursor all run the same bridge, so one terminal check covers them. It signs in to Snowflake the same way your client will and reports Health and MCP status as OK when the connection works:

```bash theme={null}
npx -y @genesiscomputing/genesis-spcs-mcp@0.2.2 test \
  --spcs-url <genesis-url> \
  --snow-connection <snow_cli_profile>
```

With a key pair, pass the same flags you used in the Add step:

```bash theme={null}
npx -y @genesiscomputing/genesis-spcs-mcp@0.2.2 test \
  --spcs-url <genesis-url> \
  --auth private-key \
  --account <org-account> \
  --user <snowflake-user> \
  --role <snowflake-role> \
  --private-key-file /path/to/rsa_key.p8
```

## Hosted Genesis with browser sign-in

On a Genesis deployment that signs users in with Auth0 or another OpenID Connect provider, the MCP server is at:

```text theme={null}
https://<your-genesis-host>/mcp/
```

You sign in once through the browser. How each client is added depends on how your admin set up sign-in, which is why **Config → MCP Gateway** is the place to copy from: it shows only the variant your deployment needs, with the client ID filled in when one is needed. If a client cannot sign in yet, the page says so and what to fix.

<Tabs>
  <Tab title="Claude Code">
    **1. Add.** Run this in your project directory:

    ```bash theme={null}
    claude mcp add --transport http genesis https://<your-genesis-host>/mcp -s local
    ```

    When the page shows an OAuth client ID, it gives you this form instead:

    ```bash theme={null}
    claude mcp add --transport http \
      --client-id <client_id> \
      --callback-port 31318 \
      genesis \
      https://<your-genesis-host>/mcp \
      -s local
    ```

    **2. Sign in once.** Start Claude Code (`claude`), type `/mcp`, pick `genesis`, choose **Authenticate** and finish in the browser tab that opens, then exit.

    **3. Try it.** Run this smoke test. It works only after step 2: `claude -p` runs without a window, so it cannot open a browser to sign you in.

    ```bash theme={null}
    claude -p "Use only the MCP server named genesis. Call list_agents through its call_tool tool and report the agents you get back. If that server is not authenticated or not available, say that clearly." < /dev/null
    ```

    For scripts or CI, create a personal access token under **API Keys** (profile menu) and send it as `Authorization: Bearer <token>` instead of signing in through the browser. See [Personal Access Tokens](/docs/User-Guide/Personal-Access-Tokens).
  </Tab>

  <Tab title="Claude Desktop">
    **1. Add.** In Claude Desktop, open **Settings > Connectors > Add custom connector** and paste this URL:

    ```text theme={null}
    https://<your-genesis-host>/mcp
    ```

    **2. Sign in once.** Click **Connect** and sign in in the browser tab that opens. If the MCP Gateway page shows a Client ID for this step, paste it under **Advanced settings** first.

    **3. Try it.** In a new chat, send this prompt:

    ```text theme={null}
    Use the genesis MCP server: call list_agents through its call_tool tool and report the agents you get back.
    ```
  </Tab>

  <Tab title="Cursor">
    **1. Add.** Add this to `mcpServers` in `~/.cursor/mcp.json` (or a project's `.cursor/mcp.json`), keeping any servers already there:

    ```json theme={null}
    {
      "mcpServers": {
        "genesis": {
          "url": "https://<your-genesis-host>/mcp"
        }
      }
    }
    ```

    When the page shows an OAuth client ID, the entry also carries it: `"auth": { "CLIENT_ID": "<client_id>" }` next to `"url"`.

    **2. Sign in once.** In **Cursor Settings > Tools & MCP**, enable `genesis`, click **Connect** and sign in in the browser tab that opens.

    **3. Try it.** In Cursor chat, send this prompt:

    ```text theme={null}
    Use the genesis MCP server: call list_agents through its call_tool tool and report the agents you get back.
    ```
  </Tab>

  <Tab title="Cortex Code">
    Cortex Code signs in through the browser only when your deployment lets clients register themselves (the OAuth proxy with dynamic client registration). Otherwise it connects with a personal access token. The MCP Gateway page shows the one that applies.

    **With browser sign-in:**

    ```bash theme={null}
    cortex mcp add genesis https://<your-genesis-host>/mcp --type http
    ```

    Start Cortex Code (`cortex`) and run `/mcp`. When `genesis` says OAuth is required, select it, press `c` to authenticate and finish in the browser tab that opens: `genesis` then shows as Connected.

    **With a personal access token:** create one under **API Keys** (profile menu), then run this with it in place of `<gp_...>`:

    ```bash theme={null}
    cortex mcp add genesis \
      https://<your-genesis-host>/mcp \
      --type http \
      -H "Authorization: Bearer <gp_...>"
    ```

    Start Cortex Code and run `/mcp`: `genesis` shows as Connected.

    **Try it.** In Cortex Code, send this prompt:

    ```text theme={null}
    Use the genesis MCP server: call list_agents through its call_tool tool and report the agents you get back.
    ```
  </Tab>
</Tabs>

Admins: the identity-provider settings and the one OAuth redirect URI to register are in [Hosted MCP for Claude Code](/docs/deployments/Hosted-MCP-For-Claude-Code#turn-on-sign-in). The MCP Gateway page also shows them in its collapsed **Admin setup (once per deployment)** section.

## Related pages

* [Agent Gateways](/docs/Setup/Agent-Gateways): the MCP Gateway page, its readiness checks and admin defaults.
* [Hosted MCP for Claude Code](/docs/deployments/Hosted-MCP-For-Claude-Code): enabling sign-in and the MCP endpoint on a hosted deployment.
* [MCP Rooms for Coding Agents](/docs/deployments/MCP-Rooms-For-Coding-Agents): letting coding agents on different laptops message each other.
* [Personal Access Tokens](/docs/User-Guide/Personal-Access-Tokens): tokens for scripts, CI and clients that cannot sign in through a browser.
