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

# Connect via MCP

> Give Claude, Cursor, or any MCP client eyes and hands on your Windows PC — no integration code.

Glasswarp ships a **remote MCP server** so MCP-enabled assistants and IDEs get
eyes and hands on a paired Windows PC without writing project code. You bring
the brain (the model and the prompts); Glasswarp provides vision, native input,
and a safe session.

Marketing overview: [glasswarp.com/mcp](https://www.glasswarp.com/mcp).

<Note>
  MCP sessions are ordinary metered Platform API sessions — same concurrency,
  active minutes, consent, indicator, kill switch, and audit as REST / SDK.
</Note>

## Prerequisites

<Steps>
  <Step title="Install and pair a Windows host">
    [Install the host](/get-started/install-host), [pair the rig](/get-started/pair-rig),
    and turn on **API access** for that rig in the console.
  </Step>

  <Step title="Create an API key">
    [Console → API Keys](https://www.glasswarp.com/console/keys). Same `gw_*`
    key authenticates REST and MCP. Copy it once when created.
  </Step>

  <Step title="Host online">
    `list_rigs` only marks a rig **USABLE** when it is online **and**
    API-enabled. Start the Windows host agent before asking the assistant to act.
  </Step>
</Steps>

## Endpoint

|              |                                                           |
| ------------ | --------------------------------------------------------- |
| URL          | `https://mcp.glasswarp.com/mcp`                           |
| Transport    | Streamable HTTP                                           |
| Auth         | `Authorization: Bearer <glasswarp_api_key>`               |
| Platform API | `https://signal.glasswarp.com` (same sessions / metering) |

## Client config

Use your **real** API key from the console — not placeholder text.

### Cursor (recommended)

Current Cursor builds often fail remote Streamable HTTP with `fetch failed`.
Bridge with [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) over stdio,
and use an **absolute** `npx` path for your OS (bare `npx` often breaks inside
Cursor.app).

<AccordionGroup>
  <Accordion title="macOS (Apple Silicon)">
    ```json theme={null}
    {
      "mcpServers": {
        "glasswarp": {
          "command": "/opt/homebrew/bin/npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.glasswarp.com/mcp",
            "--header",
            "Authorization:${GLASSWARP_AUTH}"
          ],
          "env": {
            "PATH": "/opt/homebrew/bin:/usr/bin:/bin",
            "GLASSWARP_AUTH": "Bearer gw_live_sk_REPLACE_WITH_YOUR_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="macOS (Intel)">
    ```json theme={null}
    {
      "mcpServers": {
        "glasswarp": {
          "command": "/usr/local/bin/npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.glasswarp.com/mcp",
            "--header",
            "Authorization:${GLASSWARP_AUTH}"
          ],
          "env": {
            "PATH": "/usr/local/bin:/usr/bin:/bin",
            "GLASSWARP_AUTH": "Bearer gw_live_sk_REPLACE_WITH_YOUR_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Windows">
    ```json theme={null}
    {
      "mcpServers": {
        "glasswarp": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.glasswarp.com/mcp",
            "--header",
            "Authorization:${GLASSWARP_AUTH}"
          ],
          "env": {
            "GLASSWARP_AUTH": "Bearer gw_live_sk_REPLACE_WITH_YOUR_KEY"
          }
        }
      }
    }
    ```

    If Cursor cannot find `npx`, use the full path from Node.js (often
    `C:\\Program Files\\nodejs\\npx.cmd`).
  </Accordion>

  <Accordion title="Linux">
    ```json theme={null}
    {
      "mcpServers": {
        "glasswarp": {
          "command": "/usr/bin/npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.glasswarp.com/mcp",
            "--header",
            "Authorization:${GLASSWARP_AUTH}"
          ],
          "env": {
            "PATH": "/usr/bin:/bin",
            "GLASSWARP_AUTH": "Bearer gw_live_sk_REPLACE_WITH_YOUR_KEY"
          }
        }
      }
    }
    ```

    If `npx` lives elsewhere (nvm, fnm), point `command` at that absolute path.
  </Accordion>
</AccordionGroup>

Toggle the server off/on after saving.

### Direct remote URL

```json theme={null}
{
  "mcpServers": {
    "glasswarp": {
      "url": "https://mcp.glasswarp.com/mcp",
      "headers": {
        "Authorization": "Bearer gw_live_sk_REPLACE_WITH_YOUR_KEY"
      }
    }
  }
}
```

After reload, the client should list tools such as `list_rigs`, `start_session`,
`observe`, `click_target`, `type_text`, `send_actions`, `launch_app`, `list_demos`, `get_demo`,
`get_live_view_url`, and `end_session`.

## First session

Ask your assistant:

> Open Notepad on my PC and type hello from MCP.

Typical tool flow:

`list_rigs` → `start_session` → `observe` → click / type (or `send_actions`) → `observe` → `end_session`

Batches stop at the first failing action and report its index; the owner kill
switch (and session end) interrupt an in-flight batch.

Always end the session when finished. Idle sessions auto-end after about
**15 minutes**.

## What to expect from your assistant

On connect, the server gives every MCP client behavioral guidance. In practice:
your assistant handles quick tasks directly in chat — look at the screen, click,
type, and batch predictable sequences. For longer multi-step work in a
code-capable client, it will offer to write a small SDK agent that runs the loop
at full speed instead of one chat turn per step — your choice either way.
Chat-only clients simply keep working through MCP tools.

Details and the pre-built demo catalog:
[Ways to run agents](/guides/ways-to-run-agents).

## Live View (human in the loop)

`get_live_view_url` returns a **console** deep link. The **rig owner** must be
signed into Glasswarp to watch at \~60fps and intervene. API keys alone cannot
open the console player — that preserves owner consent. See
[Live View](/guides/live-view).

## Tools (v1)

| Tool                                          | Role                                                                                  |
| --------------------------------------------- | ------------------------------------------------------------------------------------- |
| `list_rigs`                                   | List paired rigs                                                                      |
| `start_session` / `end_session`               | Session lifecycle                                                                     |
| `observe`                                     | Screenshot + targets + structured text (`image=false` for text-only)                  |
| `click_target` / `click_xy`                   | Mouse (prefer targets; `click_xy` uses **native** capture coords)                     |
| `type_text` / `send_keys` / `drag` / `scroll` | Keyboard and pointer                                                                  |
| `send_actions`                                | Run up to 10 predictable actions in one call; returns a verification frame by default |
| `launch_app`                                  | Start an app on the host (`args` optional)                                            |
| `list_demos` / `get_demo`                     | Pre-built demo catalog (install + command; they do not run the demos)                 |
| `get_live_view_url`                           | Owner console Live View URL                                                           |
| `get_session_status`                          | Session status                                                                        |

**Prompts:** `best_practices`, `demo_mona_lisa`, `demo_minesweeper`

## Troubleshooting

<AccordionGroup>
  <Accordion title="Cursor: ENOENT / bare npx fails">
    Bare `npx` is often broken in Cursor’s spawn environment. Use the absolute
    `npx` path for your platform from the Cursor section above (Apple Silicon
    Homebrew, Intel Homebrew, Windows Node.js, or Linux).
  </Accordion>

  <Accordion title="fetch failed / ByteString / ellipsis in header">
    Do not paste truncated keys with `…`. Use the full `gw_live_sk_…` value from
    the console. Prefer the stdio `mcp-remote` bridge on Cursor.
  </Accordion>

  <Accordion title="list_rigs works but rig is not usable">
    Online=false means the Windows host agent is not connected. Start
    GlasswarpHost on that PC; keep **API access** enabled in Console → Rigs.
  </Accordion>

  <Accordion title="Platform API hostname does not resolve">
    If `signal.glasswarp.com` (or your configured API base URL) fails to resolve
    on your machine, flush your local DNS cache or try a public resolver
    (for example `1.1.1.1` or `8.8.8.8`). The MCP server reaches the Platform
    API from its own network — local DNS only affects tools you run on your
    machine.
  </Accordion>
</AccordionGroup>

## Building a product instead?

Use the [Python SDK](/quickstart) and [Setup for Agents](/setup-for-agents).
MCP is for assistants out of the box; the SDK is for products you ship.
