A bridge implementation that enables Claude Code to work with the Agent Client Protocol (ACP), allowing it to integrate with Zed editor and other ACP-compatible clients.
This project implements an ACP Agent that wraps the Claude Code SDK, providing:
- Session management with 1:1 mapping between ACP and Claude sessions
- Streaming responses
- Message format conversion between ACP and Claude SDK
The package is available on npm and can be run directly without installation using npx or pnpx:
# No installation needed! Run directly with npx
npx acp-claude-code
# Or if you use pnpm
pnpx acp-claude-codeIf you want to specify a particular version:
npx acp-claude-code@0.1.0Run the agent using npx or pnpx:
# Using npm's npx
npx acp-claude-code
# Using pnpm's pnpx
pnpx acp-claude-codeAdd to your Zed configuration:
{
"agents": {
"claude-code": {
"command": "npx",
"args": ["acp-claude-code"]
}
}
}Or if you prefer using pnpm:
{
"agents": {
"claude-code": {
"command": "pnpx",
"args": ["acp-claude-code"]
}
}
}If you want to build and run from source instead of using the npm package:
# Clone the repository
git clone https://github.com/xuanwo/acp-claude-code.git
cd acp-claude-code
# Install dependencies
pnpm install
# Build the project
pnpm run build
# Run directly
node dist/index.jsFor development with hot reload:
# Run in development mode
pnpm run dev
# Type checking
pnpm run typecheck
# Build
pnpm run build- ✅ Basic ACP protocol implementation
- ✅ Session management
- ✅ Streaming responses
- ✅ Text content blocks
- ✅ Claude SDK integration
- Tool call support
- Permission management
- Image/audio content blocks
- Session persistence
- Advanced error handling
This bridge uses Claude Code's built-in authentication. You need to authenticate Claude Code first:
# Login with your Anthropic account
claude setup-token
# Or if you're already logged in through the Claude Code CLI, it will use that sessionThe bridge will automatically use the existing Claude Code authentication from ~/.claude/config.json.
MIT