ACP (Agent Client Protocol) for Claude Code.
seren-acp-claude speaks ACP JSON-RPC over stdio and internally:
- Spawns
claudeas a subprocess (viaclaude-code-agent-sdk) - Translates ACP prompt turns to Claude Code queries
- Streams Claude output back to the client as ACP session updates
- Bridges Claude tool approvals through ACP
session/request_permission - Uses JSON-RPC 2.0 for the ACP transport (handled by
agent-client-protocol)
┌────────────┐ stdio ┌──────────────────┐ stdio ┌──────────────────┐
│ ACP Client │ ─────────────► │ seren-acp-claude │ ─────────────► │ claude │
│ │ ◄───────────── │ │ ◄───────────── │ (subprocess) │
└────────────┘ JSON-RPC └──────────────────┘ JSON-RPC └──────────────────┘
- Install Claude Code CLI (see https://docs.anthropic.com/claude-code/)
- Authenticate with Claude:
claude login - ACP spec: https://agentclientprotocol.com/
Note: this binary expects an ACP client to drive it over stdin/stdout. Running it directly will wait for JSON-RPC messages.
# Debug build
cargo run --bin seren-acp-claude
# Release build
cargo run --release --bin seren-acp-claude
# Enable logs
RUST_LOG=info cargo run --release --bin seren-acp-claude
RUST_LOG=debug cargo run --release --bin seren-acp-claude| Mode ID | Meaning |
|---|---|
ask |
Ask before running tools (default) |
auto |
Auto-approve safe operations |
Methods
initializeauthenticate(no-op; Claude CLI handles auth)newSessionpromptsetSessionModecancelloadSessionis not supported
High-level event mapping
- ACP session = Claude Code session
- ACP tool calls / permission prompts = Claude tool approvals
- MSRV: Rust
1.90(seeCargo.toml) cargo fmtcargo clippy --all-targets -- -D warningscargo test
MIT