# Connect OpenClaw

> Step-by-step guide to connect your OpenClaw agent to an Aerostack Workspace and start chatting from the dashboard.

Connect your OpenClaw agent to an Aerostack Workspace in under 2 minutes. Once connected, you can chat with your agent from the dashboard, approve tool calls, and monitor activity — all without Telegram or Discord.

---

## Prerequisites

- An Aerostack account with at least one workspace ([create one here](https://app.aerostack.dev))
- OpenClaw installed on your machine
- Node.js 18+ installed
- Your workspace has MCP servers, skills, or functions added

---

## Setup

1. **Copy Your Workspace URL and Token**

   1. Open the [Admin Dashboard](https://app.aerostack.dev)
   2. Go to **Workspaces** and select your workspace
   3. Click **Connect via Gateway** tab
   4. Copy the **Gateway URL** — it looks like:
      ```
      https://mcp.aerostack.dev/ws/your-workspace-slug
      ```
   5. Go to the **Tokens** tab and copy your workspace token (starts with `mwt_`)

2. **Install the Aerostack Bridge**

   ```bash
   npm install -g @aerostack/gateway
   ```

   This installs the `aerostack-gateway` command globally. Verify it works:

   ```bash
   aerostack-gateway --check
   ```

3. **Add Aerostack Bridge to OpenClaw**

   Open your OpenClaw MCP configuration and add the Aerostack Bridge:

   ```json
   {
     "mcpServers": {
       "aerostack": {
         "command": "aerostack-gateway",
         "env": {
           "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-workspace-slug",
           "AEROSTACK_TOKEN": "mwt_your_token_here"
         }
       }
     }
   }
   ```

   
   The `@aerostack/gateway` package is the Aerostack Bridge — it connects your agent to your workspace and enables Agent Chat, approvals, and activity monitoring.
   

4. **Start OpenClaw**

   Launch OpenClaw as you normally would. The bridge connects automatically and registers with your workspace.

5. **Open Agent Chat**

   Go back to the dashboard and click **Agent Chat** in the sidebar. You should see your agent listed as **Connected**. Click it to start a conversation.

6. **Chat**

   Type a message and press Enter. Your agent receives it, uses your workspace tools, and responds. That is it — you are chatting with your agent from the dashboard.

---

## Verify the Connection

If your agent does not appear as connected in the dashboard, use the **Diagnose** button in Agent Chat. It runs a step-by-step check:

1. Is the bridge running?
2. Can it reach your workspace?
3. Is the token valid?
4. Is the real-time connection established?

Fix any issues it reports, then refresh the page.

---

## Also Works With Claude Code and Cursor

First install globally: `npm install -g @aerostack/gateway`

Then add to `~/.claude/mcp.json`:

```json
{
  "mcpServers": {
    "aerostack": {
      "command": "aerostack-gateway",
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-workspace-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}
```

First install globally: `npm install -g @aerostack/gateway`

Then add to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "aerostack": {
      "command": "aerostack-gateway",
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-workspace-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}
```

First install globally: `npm install -g @aerostack/gateway`

Any MCP-compatible client can use the Aerostack Bridge. The configuration is always the same — run `aerostack-gateway` with your workspace URL and token as environment variables.

```bash
AEROSTACK_WORKSPACE_URL=https://mcp.aerostack.dev/ws/your-workspace-slug \
AEROSTACK_TOKEN=mwt_your_token_here \
aerostack-gateway
```

**Keep your token secret.** Your workspace token grants access to all tools in the workspace. Never commit it to version control. Use environment variables or a secrets manager.

---

## What Happens After You Connect

Once your agent is connected through the bridge, you automatically get:

| Feature | Description |
|---------|-------------|
| **Agent Chat** | Real-time messaging from the dashboard |
| **Approvals** | Approve or reject risky tool calls before they execute |
| **Activity Monitor** | See every action your agent takes, categorized by risk |
| **Media Support** | Send images and files to your agent through the chat |
| **Team Access** | Invite team members — each gets their own conversations |

No extra configuration needed. These features are built into the bridge.

---

## Staying Connected

The bridge maintains a persistent connection to your workspace. If the connection drops (network issue, machine sleep), it automatically reconnects when your agent starts again.

For always-on connectivity, the bridge can run as a background service that stays connected even when you are not actively using your agent. This is useful for team setups where multiple people need to reach the agent at any time.

---

## Next Steps

- [Team Access](/agent-chat/team-access) — invite your team to chat with the agent
- [Approvals](/agent-chat/approvals) — set up approval rules for risky actions
- [Activity Monitor](/agent-chat/activity-monitor) — monitor what your agent does
- [Token Savings](/agent-chat/token-savings) — understand why this costs less than Telegram
