MCP & ACP

IDE Bridge & ACP Protocol Bidirectional Forwarding

Decrypting acp_adapter/ protocol conversion, WebSocket / Unix Socket routing principles
Transport protocol layers
📊 Fig 10-1-1: MCP Client & MCP Servers stdio, SSE and StreamableHTTP transport detail diagram

🔌 1. acp_adapter Persistent Connection Bridge

In the acp_adapter/ directory, the system implements a bridge proxy. It establishes a persistent connection with the IDE host (such as VSCode or Zed editor), listens for the developer's edits, highlights, or save actions, and converts these LSP events into JSON-RPC 2.0 data frames in real-time, forwarding them to the Python agent backend.

IDE bridge model
📊 Fig 10-1-2: Host editor, ACP adapter layer & Python Agent backend bidirectional message routing diagram

⚙️ 2. Bidirectional Message Dispatch & LSP Message Flow Mapping

The protocol between the editor and adapter not only handles file operations but can also directly issue terminal commands and intercept the agent's output bubbles, providing an exceptional pair-programming collaboration experience.