cursor-agent (also exposed as agent). Curl-installer from cursor.com.
Install
baseCLIPostCreate provisioning.
Auth
API access is a paid-plan feature — there’s no free BYOK. If Cursor returns 401 after credential test, verify the API toggle at cursor.com/account.
Models
Cursor multiplexes:cursor-agent -m accepts underlying provider model IDs plus their in-house Composer:
Command shape
-p— print (non-interactive) mode--output-format stream-json— JSONL events--stream-partial-output— token-level deltas--force— REQUIRED in headless mode; without it write tools hang on permission prompts--approve-mcps— added when MCP source is configured (otherwise MCP servers are listed but never invoked, see forum #143045)
MCP
Would be configured at/output/<slug>/.cursor/mcp.json:
${env:VAR} (NOT ${VAR}). Crewship’s writer translates the standard ${VAR} form on write.
Memory
Cursor reads.cursor/rules/, AGENTS.md, AND CLAUDE.md (merged). Crewship writes the full canonical set including .cursor/rules/crewship.md (Cursor priority path). On turn 1 the orchestrator also prepends the preamble inline with [SYSTEM]/[USER] delimiters because Cursor’s headless mode has no --system-prompt flag and file-discovery doesn’t fire until the second invocation.
Output stream
JSONL per cursor.com/docs/cli/reference/output-format:Troubleshooting
cur_… key but 401 — Cursor subscription doesn’t have API access toggle on. Visit cursor.com/account.
Write tool hangs forever — --force flag missing from adapter command (regression check cli_adapter_versions_test.go).
MCP tools never fire — expected: headless Cursor doesn’t invoke MCP servers (see the MCP warning above; SupportsMCP() is false, so .cursor/mcp.json isn’t even written). The adapter still adds --approve-mcps when req.MCPServers, req.CrewMCPConfigJSON, or req.AgentMCPConfigJSON is non-empty, ready for the day upstream fixes this.
tool_call:completed events lost on reconnect — known upstream regression (forum #157593). model_call_id + timestamp_ms are captured by parser to enable chat-bridge dedup.