The Cursor agent runtime in Mains uses the Cursor Agent CLI (theDocumentation Index
Fetch the complete documentation index at: https://docs.mains.dev/llms.txt
Use this file to discover all available pages before exploring further.
agent binary) and communicates with it over the Agent Client Protocol (ACP) via stdio. These settings control authentication, model selection, and how the agent operates during runs.
Installation & Authentication
Mains drives the Cursor Agent CLI as a subprocess. You must install and authenticate the CLI before using it inside Mains.Authenticate
Launch the CLI once to log in with your Cursor account:Follow the browser prompt to complete authentication. Mains reuses these credentials automatically.
Need help with the CLI itself? See the official Cursor CLI Setup Guide.
Mode
The mode controls how Cursor behaves during runs. You set it once in Settings > Cursor, and Mains applies it to every session.| Mode | Description |
|---|---|
agent | Full autonomous agent mode — Cursor plans and executes tool calls automatically (default). |
plan | Plan first, then execute — Cursor produces a plan and pauses for confirmation before taking action. |
ask | Answer-only mode — Cursor responds to questions but does not invoke tools or modify files. |
Pulse-driven runs always force
agent mode regardless of your default. This guarantees scheduled tasks can complete autonomously without human input.Model Selection
Cursor exposes the list of available models through ACP after a session starts. Mains picks them up automatically and lets you choose a default model in settings. When you start a run, Mains sendssession/set_config_option with your preferred model. If the model is unavailable, the session falls back to Cursor’s default for your account.
| Behavior | Description |
|---|---|
| Default model | Applied to every new session unless overridden per run. |
| Per-run model | Set on individual runs to test different models without changing your default. |
| Resume | When you continue a previous session, Mains re-applies your model and mode settings. |
MCP Tools
Cursor sessions automatically receive Mains’ bundled MCP tools at startup — these include git operations, package safety checks, and workspace utilities. You can also add your own MCP servers; see MCP Servers for setup. Cursor extensions likeupdate_todos, generate_image, and the task subagent are exposed as native ACP capabilities, not MCP tools.
Tool Approval
Cursor sends asession/request_permission ACP request when it wants to invoke a tool that requires user confirmation. Mains shows an interactive approval dialog in the workspace UI — you can allow once, deny, or remember the decision for the session.
See Permissions for the full approval flow and how to pre-approve tools.