Disclaimer: I am not affiliated with Cursor or Zed. This project is a personal experiment and should not be considered an official product of either company. I am a big fan of both products and wanted to combine what I like with both of them: An amazing editor and a great AI coding agent (and composer-1, holy this model flies xD).
An Agent Client Protocol (ACP) adapter for Cursor Agent CLI, enabling Cursor's powerful AI coding assistant to be used within the Zed editor.
This is an ai-assisted personal project aimed at bringing a great AI coding agent into the Zed editor. It wraps the Cursor Agent CLI and exposes it via the ACP protocol, allowing Zed (and other ACP-compatible clients) to leverage Cursor's capabilities.
Based on claude-code-acp by Zed Industries - the original ACP adapter for Claude Code that served as the architectural foundation for this project.
- ACP Session Lifecycle: Supports
new,resume, andfork(best-effort) session operations - Session Persistence & History: Conversation history is persisted to disk; when resuming a session, the full history is replayed so the client sees previous messages (
⚠️ This feature is WIP on Zed's side, so this can break at any time, I will try to keep it up to date) - Session Listing: List past sessions (with optional cwd filter and pagination) for quick resume
- Model & Mode Switching: Dynamically change the underlying model and operation mode
- Authentication: Login/logout/status management via Cursor CLI
- File Mentions: Converts
@file/resource mentions to the appropriate format - Tool Call Streaming: Real-time ACP tool updates during execution
- Plan Updates: TODO updates mapped to ACP plans
- Slash Commands: Built-in adapter commands plus workspace/global custom slash commands
| Command | Description |
|---|---|
/help |
Show available commands |
/model |
Switch or display the current model |
/mode |
Switch or display the current mode |
/status |
Show authentication and session status |
/login |
Authenticate with Cursor |
/logout |
Sign out of Cursor |
Custom slash commands are loaded from:
<workspace>/.cursor/commands/*.md~/.cursor/commands/*.md
If both locations define the same command name, the workspace command wins.
Custom skills are loaded from:
<workspace>/.cursor/skills/**/skill.md~/.agents/skills/**/skill.md
If multiple locations define the same skill name, the workspace skill wins.
bun install
bun run buildThis compiles the project and produces the cursor-acp binary entry point at ./dist/index.js.
For Zed to find the cursor-acp command, it needs to be available on your PATH. Choose one of the following options:
Option A — npm link (recommended)
Run npm link inside the repository root to symlink the cursor-acp binary globally:
npm linkOption B — manual symlink
Create a symlink manually:
ln -s "$(pwd)/dist/index.js" /usr/local/bin/cursor-acpVerify the binary is accessible:
which cursor-acpbun run startOr use the binary:
cursor-acpOpen your Zed settings file via the Command Palette (zed: open settings) and add a custom agent server entry under agent_servers:
{
"agent_servers": {
"Cursor": {
"type": "custom",
"command": "cursor-acp",
"args": [],
"env": {}
}
}
}If cursor-acp is not on your PATH, use the full absolute path to the entry point instead:
{
"agent_servers": {
"Cursor": {
"type": "custom",
"command": "/absolute/path/to/cursor-acp/dist/index.js",
"args": [],
"env": {}
}
}
}You can optionally set default mode and model via environment variables in the "env" object:
CURSOR_ACP_DEFAULT_MODE— one ofdefault,acceptEdits,plan,ask,bypassPermissionsCURSOR_ACP_DEFAULT_MODEL— a model ID string (e.g. the model ID shown by/model)
Example with defaults configured:
{
"agent_servers": {
"Cursor": {
"type": "custom",
"command": "cursor-acp",
"args": [],
"env": {
"CURSOR_ACP_DEFAULT_MODE": "bypassPermissions"
}
}
}
}- Open the Agent Panel with
Cmd+?(macOS) orCtrl+?(Linux) - Click the
+button in the top right and select Cursor - On first use, run the
/loginslash command to authenticate with Cursor
You can also bind a keyboard shortcut to quickly open a new Cursor thread by adding the following to your keymap.json (open via zed: open keymap file):
[
{
"bindings": {
"cmd-alt-u": ["agent::NewExternalAgentThread", { "agent": "Cursor" }]
}
}
]If something isn't working, open Zed's Command Palette and run dev: open acp logs to inspect the ACP messages being sent between Zed and cursor-acp.
bun run devbun run test # Run tests in watch mode
bun run test:run # Run tests oncebun run lint # Check for linting issues
bun run lint:fix # Auto-fix linting issues
bun run format # Format code with oxfmt
bun run check # Run lint and format checkssrc/
├── index.ts # CLI entry point
├── lib.ts # Library exports
├── cursor-acp-agent.ts # Main ACP agent implementation
├── cursor-cli-runner.ts # Cursor CLI process management
├── cursor-event-mapper.ts# Maps Cursor events to ACP events
├── prompt-conversion.ts # Converts ACP prompts to Cursor format
├── auth.ts # Authentication handling
├── settings.ts # Configuration management
├── session-storage.ts # Session persistence and history replay
├── slash-commands.ts # Slash command handlers
├── tools.ts # Tool definitions
├── utils.ts # Utility functions
└── tests/ # Test files
The adapter uses Cursor CLI with --print --output-format stream-json flags for streaming JSON output that gets mapped to ACP events.
Sessions are persisted under ~/.cursor-acp/sessions/ (or $CURSOR_ACP_CONFIG_DIR/sessions/ if set). Each project has an encoded subdirectory; session history is stored as JSONL files with user and assistant messages for resume and replay.
- Zed
- Node.js 25.6.1+
- Bun (for package management and scripts)
- Cursor CLI installed and available in PATH
- Valid Cursor subscription
This project is based on claude-code-acp by Zed Industries. Their work on the original Claude Code ACP adapter provided the architectural patterns and protocol implementation that made this project possible.
Copyright 2026 Raphael Lüthy. Licensed under the Apache License, Version 2.0. See LICENSE for the full license text. Third-party attributions are listed in NOTICE.