Guide

How to Drive Coasty from Cursor and Claude with the MCP Server

Sarah Chen||6 min
+Tab

Most AI coding tools can only read code and generate snippets. They cannot interact with the OS, click buttons, or complete workflows that require a graphical interface. The Coasty computer use API solves this by letting an agent see the screen and act like a human. The MCP server makes that API directly available in Cursor, Claude Desktop, and other MCP clients, so you can issue OS-level commands without writing HTTP calls yourself.

How the MCP server works

The Coasty MCP server is an implementation of the Model Context Protocol. It exposes tools that map directly to the computer use API endpoints. When you call a tool from Cursor or Claude, the MCP server authenticates with your X-API-Key, forwards the request to https://coasty.ai/v1, and returns the parsed JSON response. This means you get stateful sessions, task runs, workflows, and the full computer use API surface, but the client code stays as simple natural-language tool calls.

bash
curl -X POST https://coasty.ai/v1/runs \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machine_id": "my-vm-001",
    "task": "open Chrome and navigate to https://example.com",
    "cua_version": "v4",
    "on_awaiting_human": "pause",
    "max_steps": 50,
    "deadline_seconds": 300
  }'

What you can do from Cursor and Claude

  • Provision a cloud machine with POST /v1/machines and use it as the target for computer use.
  • Start a task run with POST /v1/runs and track its state: queued, running, awaiting_human, succeeded, failed, cancelled, timed_out.
  • Stream events for a specific run with GET /v1/runs/{id}/events to react in real time.
  • Cancel or resume a task run with POST /v1/runs/{id}/cancel and POST /v1/runs/{id}/resume.
  • Submit ad-hoc workflows or versioned workflow DSLs with POST /v1/workflows and POST /v1/workflows/{id}/runs.
  • Use POST /v1/sessions and POST /v1/sessions/{id}/predict for stateful trajectory memory across actions.
  • Map visual elements to coordinates with POST /v1/ground, so agents can click exactly where they see an element.

Read your key from COASTY_API_KEY and use the MCP server to delegate computer use to Cursor and Claude.

Where this beats brittle automation

Traditional UI automation relies on brittle selectors like XPath or CSS classes that break when a page layout changes. The Coasty computer use API, accessed through the MCP server, lets AI agents see the actual screen and decide where to click and type based on visual context. This means the agent can handle dynamic UIs, multiple locales, and unfamiliar apps without fragile selectors. By leveraging the real desktop, the agent can complete multi-step workflows that API-only tools cannot reach.

You can now compose workflows that span terminal commands, browser interactions, and desktop apps, all driven from Cursor or Claude. Start building with the full computer use API by signing up for a key at https://coasty.ai/developers.

Want to see this in action?

View Case Studies
Try Coasty Free