JSPM

  • Created
  • Published
  • Downloads 1125
  • Score
    100M100P100Q117638F
  • License MIT

stdio-to-HTTP bridge connecting any MCP client to Aerostack Workspaces

Package Exports

  • @aerostack/gateway
  • @aerostack/gateway/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aerostack/gateway) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@aerostack/gateway

Connect any MCP client to an Aerostack Workspace — one URL, all your tools, with built-in human approval gates.

License: MIT npm

Why?

Instead of configuring dozens of separate MCP servers in your AI tool, point at one Aerostack Workspace and get:

  • All tools in one place — composed from multiple MCP servers
  • Centralized OAuth — 27+ providers managed by Aerostack, not your agent
  • Human approval gates — sensitive tools require your approval before executing
  • Local Guardian — approval gates for local operations (file delete, shell, git push, deploy)
  • Per-tool permissions — workspace tokens scope exactly which tools are accessible
  • Usage tracking & audit — every tool call logged and metered

Quick Start

1. Get your workspace URL and token

In your Aerostack Dashboard, open your workspace and copy:

  • Workspace URL: https://mcp.aerostack.dev/ws/your-slug
  • Token: generate one from the Tokens tab (mwt_...)

Setup by Client

Two connection modes:

Mode How Best for
URL Client connects directly over HTTP Cursor, Windsurf, VS Code, Goose — HTTP-native clients
NPX Runs a local bridge process Claude Desktop, Cline, OpenClaw — stdio-only clients

Claude Desktop

NPX (recommended):

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "aerostack": {
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

URL:

{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev/ws/your-slug",
      "headers": { "Authorization": "Bearer mwt_your_token_here" }
    }
  }
}

Claude Code

NPX (recommended):

claude mcp add aerostack \
  --command "npx" \
  --args "-y,@aerostack/gateway" \
  --env "AEROSTACK_WORKSPACE_URL=https://mcp.aerostack.dev/ws/your-slug" \
  --env "AEROSTACK_TOKEN=mwt_your_token_here"

Or edit .claude/mcp.json:

{
  "mcpServers": {
    "aerostack": {
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

Cursor

URL (recommended — no install needed):

Open Cursor Settings → MCP → Add Server:

{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev/ws/your-slug",
      "headers": { "Authorization": "Bearer mwt_your_token_here" }
    }
  }
}

NPX:

{
  "mcpServers": {
    "aerostack": {
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

Windsurf

URL (recommended):

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "aerostack": {
      "serverUrl": "https://mcp.aerostack.dev/ws/your-slug",
      "headers": { "Authorization": "Bearer mwt_your_token_here" }
    }
  }
}

NPX:

{
  "mcpServers": {
    "aerostack": {
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

VS Code

URL:

Edit .vscode/mcp.json:

{
  "servers": {
    "aerostack": {
      "type": "http",
      "url": "https://mcp.aerostack.dev/ws/your-slug",
      "headers": { "Authorization": "Bearer mwt_your_token_here" }
    }
  }
}

NPX:

{
  "servers": {
    "aerostack": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

Cline

NPX:

Open VS Code Settings → search Cline MCP → Edit in settings.json:

{
  "cline.mcpServers": {
    "aerostack": {
      "command": "npx",
      "args": ["-y", "@aerostack/gateway"],
      "env": {
        "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
        "AEROSTACK_TOKEN": "mwt_your_token_here"
      }
    }
  }
}

URL:

{
  "cline.mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev/ws/your-slug",
      "headers": { "Authorization": "Bearer mwt_your_token_here" }
    }
  }
}

Goose

URL (recommended — Goose is HTTP-native):

Edit ~/.config/goose/config.yaml:

mcp:
  servers:
    aerostack:
      url: https://mcp.aerostack.dev/ws/your-slug
      headers:
        Authorization: Bearer mwt_your_token_here

NPX:

mcp:
  servers:
    aerostack:
      command: npx
      args: ["-y", "@aerostack/gateway"]
      env:
        AEROSTACK_WORKSPACE_URL: https://mcp.aerostack.dev/ws/your-slug
        AEROSTACK_TOKEN: mwt_your_token_here

OpenClaw

NPX:

{
  "mcp": {
    "servers": {
      "aerostack": {
        "command": "npx",
        "args": ["-y", "@aerostack/gateway"],
        "env": {
          "AEROSTACK_WORKSPACE_URL": "https://mcp.aerostack.dev/ws/your-slug",
          "AEROSTACK_TOKEN": "mwt_your_token_here"
        }
      }
    }
  }
}

Any HTTP-native client

Use the workspace URL directly — no package needed:

URL:    https://mcp.aerostack.dev/ws/your-slug
Header: Authorization: Bearer mwt_your_token_here

Debugging

If the connection isn't working, run the bridge directly in your terminal:

AEROSTACK_LOG_LEVEL=debug \
AEROSTACK_WORKSPACE_URL=https://mcp.aerostack.dev/ws/your-slug \
AEROSTACK_TOKEN=mwt_your_token_here \
npx -y @aerostack/gateway

Or test the workspace endpoint with curl:

curl -X POST https://mcp.aerostack.dev/ws/your-slug \
  -H "Authorization: Bearer mwt_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Common issues:

Symptom Cause Fix
401 Unauthorized Invalid or expired token Generate a new token from the Tokens tab
404 Not Found Wrong workspace slug Check the slug in your dashboard URL
Tools list is empty No servers added to workspace Add MCP servers from the marketplace
npx: command not found Node.js not installed Install Node.js 18+ from nodejs.org
Old version cached by npx Stale npx cache Run npx --yes @aerostack/gateway@latest

Approval Gates

When workspace approval rules are configured, the bridge handles them transparently:

AI calls a gated tool
  → Workspace returns "needs approval"
  → Bridge waits (WebSocket for instant wake, polling as fallback)
  → You approve or reject from dashboard or mobile app
  → Bridge retries on approval, returns error on rejection

Your agent sees either a successful result or a clear error — no special handling needed.

Local Guardian

Approval gates for local operations — file deletion, shell commands, git push, deploys. The aerostack__local_guardian tool is injected automatically when enabled in your workspace settings.

Configuration

Variable Required Default Description
AEROSTACK_WORKSPACE_URL Yes https://mcp.aerostack.dev/ws/your-slug
AEROSTACK_TOKEN Yes Workspace token (mwt_...)
AEROSTACK_APPROVAL_POLL_MS No 3000 Approval polling interval (ms)
AEROSTACK_APPROVAL_TIMEOUT_MS No 300000 Max approval wait time (5 min)
AEROSTACK_REQUEST_TIMEOUT_MS No 30000 HTTP request timeout (30s)
AEROSTACK_LOCAL_GUARDIAN No true Set false to disable Local Guardian
AEROSTACK_LOG_LEVEL No info Log level: debug, info, warn, error

Requirements

  • Node.js 18+ (for NPX mode only)
  • An Aerostack account with a configured workspace
  • A workspace token (mwt_...)

License

MIT