Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@useswarm/mcp

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@useswarm/mcp

Automated UX testing loop for local dev. Tunnel via cloudflared, run AI agent swarms, get structured issues, fix and repeat.

npmnpm
Version
2.0.8
Version published
Weekly downloads
29
31.82%
Maintainers
1
Weekly downloads
 
Created
Source

Useswarm MCP Server

Connect the Useswarm UX testing platform to AI agents (Claude Code, Cursor, VS Code, etc.) via the Model Context Protocol.

Local Machine                          mcp.useswarm.co
+--------------------+    WebSocket    +--------------------+
|  useswarm-mcp      |<---tunnel----->|  Relay Server      |
|  (MCP Server)      |                |  /tunnel (WS)      |
|                    |                |  /s/:slug/message   |
|  27 tools -> API   |                +--------------------+
+--------------------+                        ^
        ^                              Remote MCP Clients
        |                              (Claude Code, Cursor)
   stdio / HTTP
        |
  Local MCP Client

Quick Start

# 1. Log in via browser (creates an API key, stores in ~/.useswarm/config.json)
npx @ux-testing/mcp-server login

# 2. Add to Claude Code
claude mcp add useswarm -- npx @ux-testing/mcp-server serve

That's it. Claude Code can now create tests, run persona agents, analyze results, and more.

Installation

No installation needed. Just run:

npx @ux-testing/mcp-server login
npx @ux-testing/mcp-server serve

Option B: From source (contributors)

cd apps/mcp-server
pnpm install
cp .env.example .env
# Edit .env with your USESWARM_API_KEY
pnpm dev

Option C: With tunnel (remote access)

Tunnel your local MCP server through mcp.useswarm.co so remote clients can connect without port forwarding:

npx @ux-testing/mcp-server serve --tunnel --tunnel-token YOUR_TOKEN

The CLI prints your public endpoint:

[useswarm-mcp] Public MCP endpoint: https://mcp.useswarm.co/s/abc123/message
[useswarm-mcp] Add to Claude Code:
  claude mcp add useswarm --transport streamable-http https://mcp.useswarm.co/s/abc123/message

CLI Commands

CommandDescription
useswarm-mcp loginOpen browser to useswarm.co, create MCP API key, store locally
useswarm-mcp logoutClear stored credentials from ~/.useswarm/config.json
useswarm-mcp whoamiShow auth status and verify API key
useswarm-mcp serveStart MCP server (stdio transport, default)
useswarm-mcp serve --httpStart with HTTP transport on port 3100
useswarm-mcp serve --tunnelStart with tunnel to mcp.useswarm.co
useswarm-mcp serve --api-key KEYOverride stored API key
useswarm-mcp serve --api-url URLOverride API base URL

Available Tools

Batch Tests

Run autonomous AI personas against a website to get UX feedback.

ToolDescription
list_batch_testsList all batch test runs
get_batch_testGet details of a specific test
create_batch_testCreate a new batch test with AI personas
run_batch_testStart executing a batch test
cancel_batch_testCancel a running test
get_batch_test_resultsGet aggregated results and insights
generate_personasGenerate personas from an audience description
delete_batch_testDelete a test and its results

Screenshot Tests

Upload screenshots of a user flow and get AI persona analysis.

ToolDescription
create_screenshot_testCreate a screenshot-based test
analyze_screenshot_testRun persona analysis on uploaded screenshots
get_screenshot_test_resultsGet analysis results and insights
generate_mockupsGenerate improved UI mockups from findings

UX Agent

Interact with autonomous agent runs.

ToolDescription
get_queue_statusCheck job queue depth and worker status
get_agent_runGet details of an agent run
get_agent_thoughtsGet structured thoughts from a run
get_agent_insightsGet AI-generated insights
chat_with_personaAsk follow-up questions to a persona

Scout AI

Deep research and analysis across test results.

ToolDescription
scout_chatChat with Scout about test findings
scout_historyGet chat history and suggested questions

Swarms

Manage reusable groups of personas.

ToolDescription
list_swarmsList all persona swarms
create_swarmCreate a new persona swarm
get_swarmGet swarm details and personas
delete_swarmDelete a swarm

Projects

Organize tests into projects.

ToolDescription
list_projectsList all projects
create_projectCreate a new project
get_projectGet project details

Device Farm

Test mobile apps on real devices via AWS Device Farm.

ToolDescription
enqueue_mobile_testEnqueue a mobile app test job
get_mobile_test_jobGet mobile test status and results
list_devicesList available real devices

CUA Tests

Run Computer Use API tests with autonomous visual agents.

ToolDescription
run_cua_testRun a CUA test against a URL
get_cua_testGet CUA test results

Editor Configuration

Claude Code

claude mcp add useswarm -- npx @ux-testing/mcp-server serve

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "useswarm": {
      "command": "npx",
      "args": ["@ux-testing/mcp-server", "serve"],
      "env": {
        "USESWARM_API_KEY": "ux_..."
      }
    }
  }
}

VS Code (Copilot)

Add to .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "useswarm": {
        "command": "npx",
        "args": ["@ux-testing/mcp-server", "serve"],
        "env": {
          "USESWARM_API_KEY": "ux_..."
        }
      }
    }
  }
}

Remote via tunnel (any editor)

If you're using the tunnel, configure the editor with the HTTP transport:

{
  "mcpServers": {
    "useswarm": {
      "transport": "streamable-http",
      "url": "https://mcp.useswarm.co/s/YOUR_SLUG/message"
    }
  }
}

Authentication

The MCP server uses X-API-Key header authentication. Keys are SHA-256 hashed before storage.

useswarm-mcp login

Opens your browser to useswarm.co/mcp/auth. After logging in, an MCP-scoped API key is created and stored in ~/.useswarm/config.json (file permissions: 0600).

Manual API key

Create a key in the Useswarm dashboard or pass one directly:

useswarm-mcp serve --api-key ux_your_key_here

Or set the environment variable:

export USESWARM_API_KEY=ux_your_key_here
useswarm-mcp serve

Environment Variables

VariableDefaultDescription
USESWARM_API_URLhttp://localhost:8080API base URL
USESWARM_API_KEY-API key for authentication
USESWARM_SESSION_TOKEN-Session token (alternative to API key)
USESWARM_APP_URLhttps://useswarm.coWeb app URL (for login flow)
MCP_PORT3100HTTP transport port
MCP_TUNNELfalseEnable tunnel to relay
MCP_TUNNEL_TOKEN-Tunnel authentication token
MCP_RELAY_URLwss://mcp.useswarm.coTunnel relay WebSocket URL

Architecture

Transports

The MCP server supports three transport modes:

  • stdio (default) -- Standard input/output. Used by Claude Code, Cursor, etc. No network port needed.
  • HTTP (--http) -- Streamable HTTP on port 3100. For clients that prefer HTTP transport.
  • Tunnel (--tunnel) -- Connects via WebSocket to the relay at mcp.useswarm.co. The relay assigns a public slug and proxies JSON-RPC requests through the tunnel.

Relay Server

The relay server runs at mcp.useswarm.co and handles:

  • WebSocket tunnel connections from local MCP servers (/tunnel)
  • Public HTTP endpoints for remote MCP clients (/s/:slug/message)
  • Token-based tunnel authentication with stable slug persistence on reconnect
  • 2-minute request timeout, 30-second keep-alive pings

Infrastructure

The relay is deployed on AWS ECS Fargate. See infra/ for the Terraform configuration:

cd apps/mcp-server/infra
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your ACM cert ARN, VPC tags, etc.
terraform init
terraform plan
terraform apply

Development

# Run MCP server in dev mode (auto-reload)
pnpm dev

# Run relay server locally
pnpm start:relay

# Type-check
npx tsc --noEmit

# Build
pnpm build

URLs

ServiceURL
Web apphttps://useswarm.co
APIhttps://api.useswarm.co
MCP relayhttps://mcp.useswarm.co

FAQs

Package last updated on 26 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts