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 - 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 buildbun run startOr use the binary:
cursor-acpbun 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
├── 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.
- Node.js 18+
- Bun (for package management and scripts)
- Cursor CLI installed and available in PATH
- Valid Cursor authentication
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.
Apache-2.0 - See LICENSE for details.