Cursor
Overview
Section titled “Overview”Cursor supports both ACP (full agent) and MCP (tool-only) integration with AgentZero.
Recommended: ACP — AgentZero runs the full agentic loop (inference, tool calling, approval, context management) using your local models. Cursor acts as the UI.
ACP Setup (Recommended)
Section titled “ACP Setup (Recommended)”ACP runs AgentZero as a complete coding agent. Cursor sends messages; AgentZero drives the model, executes tools, and streams results back.
1. Generate config
Section titled “1. Generate config”az init --editor cursorThis creates .cursor/rules with ACP integration instructions.
2. Start the ACP server
Section titled “2. Start the ACP server”In a Cursor terminal panel, run:
az serveThe server communicates over stdio (JSON-RPC). No network ports are opened.
3. Use in Cursor
Section titled “3. Use in Cursor”Send messages to the ACP server via Cursor’s terminal. AgentZero handles model inference and tool execution locally.
MCP Setup (Tool-Only)
Section titled “MCP Setup (Tool-Only)”Use MCP when you want Cursor’s built-in AI to drive inference, but use AgentZero’s policy-enforced tools (read, write, search, edit, shell).
1. Add to Cursor MCP config
Section titled “1. Add to Cursor MCP config”Open Cursor Settings > MCP Servers, and add:
{ "mcpServers": { "agentzero": { "command": "az", "args": ["mcp"] } }}2. Available tools
Section titled “2. Available tools”| Tool | Description |
|---|---|
read_file | Read file contents |
list_directory | List directory contents |
search_files | Search for patterns in files |
write_file | Write content to a file (requires approval) |
run_command | Execute a shell command (requires approval) |
All tools enforce AgentZero’s policy engine — path validation, sensitive file blocking, and audit logging apply.
When to Use Which
Section titled “When to Use Which”| Use Case | Protocol |
|---|---|
| Full local coding agent with tool calling | ACP |
| Cursor’s AI + AgentZero’s secure tools | MCP |
| Working with sensitive/PII data locally | ACP (data never leaves your machine) |
Security
Section titled “Security”- Stdio-only transport — AgentZero never opens a network port for editor communication
- Policy enforcement — all tool calls go through the policy engine
- Audit trail — every action is logged to
.agentzero/audit/
Troubleshooting
Section titled “Troubleshooting”- “command not found: az” — ensure
azis in your PATH. Runwhich azto verify. - MCP tools not showing — rebuild with
cargo build --features mcp - Provider errors — run
az doctorto check provider connectivity