Back to Blog
Tutorial

Alex Thompson6 min
+Tab

You want an agent that can click, type, and scroll on real desktops or browsers. You also want to stay inside Cursor or Claude Desktop instead of writing boilerplate HTTP requests. The Coasty MCP server solves both problems by exposing the Coasty vision-based computer use API over the Model Context Protocol. You send a task, the MCP server runs it on real machines, and the server streams events back to your AI client. This post shows how to set up the MCP server and run a task from Cursor or Claude Desktop.

How the MCP server works

The Coasty MCP server connects your AI IDE to the Coasty platform. It reads the COASTY_API_KEY from the environment and exposes a tool called run_task. When you invoke that tool, the server performs the following steps 1) It calls POST /v1/machines to provision a cloud VM (machine_id is returned and cached for subsequent calls). 2) It POSTs to /v1/runs with your task, cua_version set to v3 by default, and optional instructions. 3) It streams events from GET /v1/runs/{id}/events back to the AI client. States include queued, running, awaiting_human, succeeded, failed, cancelled, and timed_out. Each agent step is billed at $0.05. The MCP server hides the polling and event handling so you can focus on the task.

bash
Install the Coasty MCP server globally
npm install -g @coasty/mcp-server

Start the MCP server with your API key in the environment
export COASTY_API_KEY=your_key_here
coasty-mcp-server

In Cursor or Claude Desktop, add the server to your MCP settings. On a Mac the config lives at ~/.cursor/mcp_settings.json.
{
  "mcpServers": {
    "coasty": {
      "command": "coasty-mcp-server",
      "env": {
        "COASTY_API_KEY": "your_key_here"
      }
    }
  }
}

Restart the IDE and ask Claude to run a task via the Coasty MCP server. Example prompt:
"Use the cozy-mcp-server tool to run a task that opens https://coasty.ai and confirms the homepage title is loaded."

Key configuration options

  • machine_id: the cloud VM ID returned from POST /v1/machines (cached for subsequent runs)
  • task: the user task sent to POST /v1/runs
  • cua_version: defaults to v3, set to v4 for autonomous mode with a pass/fail verifier
  • instructions: optional text appended to the base prompt for the agent
  • max_steps: optional upper bound on agent steps (each costs $0.05)
  • deadline_seconds: optional timeout for the run
  • on_awaiting_human: pause, fail, or cancel when the agent needs human approval
  • webhook_url: optional URL for post-run notifications (Coasty-Signature header with HMAC)

Set on_awaiting_human to pause to keep the agent interactive inside your IDE.

Where this beats brittle automation

Traditional automation relies on brittle selectors like XPath or CSS class names. UI changes break those selectors quickly. Coasty uses vision-based computer use to see the screen like a human does. It understands layouts, buttons, and context. It can adapt to layout shifts and new elements without needing you to update selectors. This makes long-running workflows and ad-hoc tasks far more robust. You describe what you want, the agent figures out how to do it on the real UI, and you get back a status and streamed events instead of a broken selector.

You now have a path to run computer use agents directly from Cursor and Claude Desktop via the Coasty MCP server. Set up the server, configure your IDE, and start issuing natural-language tasks. Get a key at https://coasty.ai/developers and integrate vision-based automation into your workflow.

© 2026 Coasty

Backed byYCombinator