Guide

Drive Coasty from Cursor and Claude with the MCP Server

David Park||8 min
+Enter

Most desktop automation relies on brittle selectors and APIs that miss UI changes. The Coasty MCP server gives Cursor, Claude Desktop, and other MCP clients direct access to the Coasty computer use API. You can spin up real cloud machines, run task runs, and manage workflows right from your editor or chat client without switching contexts.

How the MCP server works

The MCP server exposes Coasty endpoints as tool calls. It reads your COASTY_API_KEY from the environment, authenticates with the X-API-Key header, and forwards requests to https://coasty.ai/v1. For example, you can start a machine provision with POST /v1/machines, then trigger a task run with POST /v1/runs. The server handles the state, streaming events, and billing so you stay focused on prompt engineering and workflow design.

bash
# Install the Coasty MCP server (example, check repo for latest install)
# npm install -g @coasty/mcp-server

# Start the MCP server with your API key:
export COASTY_API_KEY=your_key_here
coasty-mcp-server

# In Cursor, browse to Settings > Extensions > MCP > Add Server
# Name: Coasty
# Command: coasty-mcp-server
# Environment Variables: COASTY_API_KEY
# In Claude Desktop, add the same configuration in claude_desktop_config.json

Key request and response fields

  • POST /v1/machines requires machine_id (provisioned VM identifier) and returns id, status, region, and metadata.
  • POST /v1/runs needs task (string), machine_id (from /v1/machines), cua_version (default 'v3', 'v4' for autonomous mode), and optional instructions, system_prompt, max_steps, deadline_seconds, and webhook_url.
  • GET /v1/runs returns an array of runs with id, status (queued, running, awaiting_human, succeeded, failed, cancelled, timed_out), created_at, and updated_at.
  • GET /v1/runs/{id}/events streams Server-Sent Events with event type, timestamp, and data; reconnect using Last-Event-ID.
  • Billing: 1 credit = $0.01. Task runs cost $0.05 per agent step. Workflows also charge $0.05 per task step.

Read COASTY_API_KEY from the environment and set X-API-Key in every request to the Coasty API.

Where this beats brittle automation

The Coasty computer use API observes the screen and acts like a human. It does not depend on specific DOM IDs, class names, or undocumented API endpoints. If a button moves, layout changes, or an app updates, the agent still finds and clicks it based on visual context and natural language instructions. This makes workflows robust across browsers, desktop apps, and terminals.

What to build next

  • Create a Cursor extension that uses the MCP server to run automated tests or tasks directly from the editor.
  • Build a Claude Desktop assistant that provisions a machine, runs a workflow, and streams results back to chat.
  • Compose workflows with task, assert, if, loop, parallel, and human_approval steps to model multi-step processes.
  • Use POST /v1/ground to map element descriptions to coordinates for precise click targets.
  • Monitor runs with webhook_url and HMAC-signed Coasty-Signature header for audit trails and CI/CD integration.

The Coasty MCP server bridges Cursor, Claude Desktop, and other MCP clients with the full power of the Coasty computer use API. Spin up real machines, drive agents, and orchestrate workflows from your existing tools. Get your API key at https://coasty.ai/developers and start building agents that see and act like humans.

Want to see this in action?

View Case Studies
Try Coasty Free