Back to Blog
Tutorial

James Liu8 min
Tab

Building desktop agents usually means brittle selectors and fragile APIs. You want an AI that understands what it sees and acts like a human. The Coasty MCP server connects Claude Desktop, Cursor, and other MCP clients directly to the Coasty computer use API. You send a task. The server drives Coasty. That agent captures screenshots, predicts actions, and interacts with real desktops browsers and terminals. No manual setup, no fragile selectors.

What the MCP server gives you

  • In-process connection from Claude Desktop, Cursor, or any MCP client
  • Automatic setup of Coasty API authentication (X-API-Key from COASTY_API_KEY)
  • Direct access to Coasty task runs, workflows, and machine provisioning
  • Structured logging of events streamed from Coasty runs for debugging
  • Zero extra boilerplate code to call the Coasty computer use API

How it works

The MCP server implements standard MCP tools. When you call a tool, it forwards requests to Coasty using the authenticated session. For example, you ask Claude to provision a machine. The MCP server calls POST /v1/machines with your credentials. The response includes the machine_id. You then tell Claude to drive that machine. The MCP server calls POST /v1/runs with the machine_id and the task, using the default cua_version v3. Coasty streams events back to the MCP server, which forwards them to your client. Your agent sees status updates queued, running, succeeded, failed, etc. You can inspect a run with GET /v1/runs/{id} or stream its events via GET /v1/runs/{id}/events. All of this happens without you writing a single HTTP call yourself.

bash
Install the Coasty MCP server binary from the Coasty releases page. Configure it in your Claude Desktop settings.json or Cursor MCP config file. Ensure your COASTY_API_KEY environment variable is set.

export COASTY_API_KEY=your_live_key_here

claude --mcp-config=mcp.json

Now you can ask Claude to run a Coasty task directly from the chat. For example:

Claude: "Provision a Linux machine and run a browser task to open https://coasty.ai and fill out the contact form."

Claude will use the Coasty MCP tools to call POST /v1/machines, POST /v1/runs, and monitor events via GET /v1/runs/{id}/events. All authentication happens via the X-API-Key header set by the MCP server.

Key MCP calls and Coasty endpoints

  • POST /v1/machines - provisions a cloud VM for the agent to drive. Response includes machine_id.
  • POST /v1/runs - starts a task run on a machine, billing $0.05 per agent step. cua_version defaults to v3.
  • GET /v1/runs - lists your runs. GET /v1/runs/{id} shows details for a specific run.
  • GET /v1/runs/{id}/events - streams Server-Sent Events with status updates and actions.
  • POST /v1/runs/{id}/cancel - aborts a run. POST /v1/runs/{id}/resume - resumes if paused.

Use the MCP server to delegate Coasty API calls from Claude Desktop or Cursor. The server handles auth, routing, and event streaming automatically.

Where this beats brittle automation

Traditional automation relies on X paths, IDs, and CSS selectors. If a UI changes, your script breaks. Coasty agents see the screen. They understand context. They can click buttons, fill forms, and navigate around the desktop using real mouse and keyboard input. The Coasty computer use API performs predictions on screenshots, not on static selectors. This makes workflows robust to UI changes and enables agents to handle complex, multi-step tasks across different applications. You get a true computer use agent that can reason about what it sees and act accordingly.

Start driving Coasty agents from Cursor and Claude Desktop via the MCP server. Build agents that see your screen, click buttons, and complete desktop tasks without brittle selectors. Get your API key at https://coasty.ai/developers to begin. Use POST /v1/runs with your machine_id, cua_version v3, and a task description. The MCP server will handle the rest.

© 2026 Coasty

Backed byYCombinator