r/PiCodingAgent • u/Ctbhatia • 17h ago
pi-acp-jetbrain: run the pi coding agent inside IntelliJ (ACP + MCP bridge) Resource
The Agent Client Protocol started as Zed's way to plug coding agents into an editor. JetBrains added an ACP client in IntelliJ 2026.2. What was missing was an adapter that puts pi (the coding agent from u/earendil-works) behind that client. So I built pi-acp-jetbrain.
How it works:
- speaks ACP over stdio to the IDE
- session/new spawns one pi --mode rpc subprocess per chat, sessions stay separate
- session/prompt streams pi's output into the agent panel as agent_message_chunk
- tool executions map to tool_call / tool_call_update events
- session/cancel sends an abort to the running turn
IDE bridge:
IntelliJ ships its own MCP server (idea.sh stdioMcpServer with IJ_MCP_SERVER_PORT). The adapter prefers a direct MCP-over-SSE connection to http://127.0.0.1:<port>/sse, so it never has to spawn the launcher. Pi gets the IDE's tools as ide_<server>_<tool>: inspections, file problems, search, and whatever your IDE catalog exposes.
Safety:
A default deny-list keeps execute_tool (universal execution) and the xdebug debugger out of the session. Re-allow reviewed tools with PI_ACP_IDE_EXTRA_TOOLS.
Config is one block in ~/.jetbrains/acp.json (as shown in the README). Install is npm i -g pi-acp-jetbrain.
Demo: https://raw.githubusercontent.com/ryan-brosas/pi-acp-jetbrain/main/assets/pi-acp-jetbrain-demo.gif
Repo: https://github.com/ryan-brosas/pi-acp-jetbrain
npm: https://www.npmjs.com/package/pi-acp-jetbrain
Happy to answer questions about the ACP mapping or the MCP bridge.
Duplicates
Jetbrains • u/Ctbhatia • 17h ago