You want to write an autonomous agent that works inside a real desktop or browser, not just call an HTTP API. The Coasty computer use API already gives you a model that drives a screen, but you do not want to manage sessions, handle screenshots, or loop capture‑predict‑act yourself. Coasty provides an MCP server so you can plug that behavior directly into Cursor, Claude Desktop, and other MCP clients. You stay in your favorite IDE while an external agent runs real work for you.
How the MCP server works
The MCP server exposes the Coasty computer use API through the Model Context Protocol. Your MCP client (Cursor, Claude Desktop) calls the server's tools to start a task run, cancel a run, or get events. The server then talks to Coasty over HTTPS using the documented base URL https://coasty.ai/v1 with the X-API-Key header set from your COASTY_API_KEY environment variable. Internally it uses the task run endpoint POST /v1/runs to drive the agent, streams events from GET /v1/runs/{id}/events, and handles retries and webhook notifications for you. You do not need to write any HTTP client code or manage screenshots.
# Install the Coasty MCP server
npx -y @coasty/mcp-server
# Start Cursor and enable the MCP server
# In Cursor: Settings → MCP Servers → Add
# Server command: npx -y @coasty/mcp-server
# API key: auto-reads COASTY_API_KEY from your shell
# Now in Cursor you can invoke tools like:
# - cozy_run: start a task, pass machine_id, task, cua_version, max_steps
# - cozy_cancel: cancel a running task by its run_id
# - cozy_events: stream status updates (queued, running, succeeded, failed)Typical workflow from Cursor
- Define a task in a .coasty.json or inline JSON object with machine_id, task, cua_version (default v3, v4 adds a verifier), max_steps, and optional instructions.
- Call cozy_run to POST /v1/runs. The server returns a run_id and begins execution.
- Poll cozy_events or let the MCP client handle SSE reconnection with Last-Event-ID.
- When the run reaches succeeded or failed, the server emits the final status. Billed at $0.05 per agent step.
- If you need to pause or abort, call cozy_cancel to POST /v1/runs/{id}/cancel.
The MCP server reads COASTY_API_KEY from the environment and hides all API calls, retries, and streaming from your IDE.
Where this beats brittle automation
Traditional automation relies on brittle selectors, XPath, or specific API endpoints that break when a UI changes. The Coasty computer use agent sees the screen, interprets instructions, and clicks or types exactly like a human. It runs on real desktops, browsers, and terminals, not just mocks. With the MCP server you keep your coding workflow in Cursor or Claude while the agent handles the heavy lifting, all without exposing credentials or writing HTTP glue code.
Start building agents that open apps, fill forms, or navigate web flows with a single MCP configuration. Install the server, set COASTY_API_KEY, and start running tasks from Cursor or Claude. Get your API key at https://coasty.ai/developers.
Want to see this in action?
View Case Studies