IDE Integration

Code CLI integrates with editors through three mechanisms: a dedicated VS Code extension, MCP server (HTTP/SSE) for tool access, and ACP (Agent Client Protocol) over stdio JSON-RPC for full agent control.

Quick Reference

VS CodeYesYes—/openVS Code InsidersYesYes—/openCursorYesYes—/openWindsurfYesYes—/openVSCodiumYesYes—/openZed——Yes/openJetBrains—Yes—/openNeovim / Vim—Yes—/openEmacs—Yes—/openSublime Text—Yes—/open

VS Code Family (VS Code, Cursor, Windsurf, VSCodium)

Install the extension from the terminal or use the /open command inside Code CLI, which detects installed editors and offers a selectable list.

Install

Terminal
bash
# VS Code
code --install-extension sst-dev.codecli
# Cursor
cursor --install-extension sst-dev.codecli
# Windsurf
windsurf --install-extension sst-dev.codecli
# VSCodium
codium --install-extension sst-dev.codecli

What the extension provides

  • Inline diff rendering for file edits
  • File context awareness (open files feed into the agent)
  • Command palette integration
  • Automatic IDE detection via TERM_PROGRAM

MCP inside VS Code

The extension connects to Code CLI's MCP server for tool access. The endpoint runs on the same port as the Code CLI server:

Endpoints
text
HTTP: http://localhost:<port>/mcp-server
SSE: http://localhost:<port>/mcp-server/sse

Zed

Zed integrates through ACP (Agent Client Protocol) over stdio, giving full agent control — session management, streaming responses, permission prompts, tool calls, and file edits.

Configuration

Add to your Zed settings.json:

Zed settings.json
json
{
"agent_servers": {
"codecli": {
"command": "codecli",
"args": ["acp"]
}
}
}

Zed launches codecli acp as a subprocess and communicates via stdin/stdout JSON-RPC.

What ACP provides in Zed

  • Session management — new, load, resume, fork, and list sessions
  • Streaming — real-time agent message chunks, reasoning blocks, tool call progress
  • Permissions — inline prompts to allow once, always allow, or reject
  • File edits — diff operations stream back with live patch application
  • Model switching — change model and variant per-session from Zed UI
  • Agent modes — switch between build, explore, plan, and other agents
  • MCP servers — Zed passes MCP configs that Code CLI registers automatically

JetBrains (IntelliJ, PyCharm, WebStorm, CLion, GoLand, RustRover, etc.)

JetBrains IDEs connect via the MCP server. Start Code CLI in a terminal, note the server port (displayed on startup or in ~/.codecli/port), then install an MCP client plugin from the JetBrains marketplace and configure the endpoint.

MCP Endpoints
text
HTTP: http://localhost:<port>/mcp-server
SSE: http://localhost:<port>/mcp-server/sse

JetBrains CLI launchers

The /open command detects these binaries if on PATH:

IntelliJ IDEAideaPyCharmpycharmWebStormwebstormCLionclionGoLandgolandRustRoverrustroverRubyMinerubyminePhpStormphpstormDataSpelldataspell

On macOS, create launchers via Tools > Create Command-line Launcher inside the IDE. On Linux, they are typically in /snap/bin/ or/usr/local/bin/.

Neovim / Vim

Use an MCP client plugin (e.g. nvim-mcp ormcp.nvim) and point it at the MCP server endpoint.

init.lua
lua
-- Configure MCP server connection to Code CLI
local mcp = require("mcp")
mcp.setup({
servers = {
codecli = {
url = "http://localhost:3000/mcp-server", -- adjust port
},
},
})

The /open command detects nvim andvim on PATH and shows a hint to open manually in a separate terminal since they are terminal-based editors.

Emacs

Use an MCP client package and connect to the MCP server endpoint.

init.el
elisp
;; Connect to Code CLI MCP server
(use-package mcp
:config
(setq mcp-servers
'(("codecli" . (:url "http://localhost:3000/mcp-server")))))

Sublime Text

Use the LSP package with an MCP extension, pointing at the MCP server endpoint. The/open command detects subl on PATH and opens the project directory directly.

Helix / Kakoune

Terminal-based editors detected by /open. They show a hint since they cannot be launched in the background from within Code CLI TUI.

The /open Command

Type /open in the Code CLI prompt to open a searchable dialog of all detected editors on your system. Also available as/ide and /editor.

The dialog runs which in parallel for 23 known editors. Only editors found on PATH are shown, grouped by category:

  1. Editors — VS Code, Zed, Cursor, Windsurf, VSCodium, Sublime Text, Atom
  2. JetBrains — IntelliJ, PyCharm, WebStorm, CLion, GoLand, RustRover, RubyMine, PhpStorm, DataSpell
  3. Terminal — Neovim, Vim, Emacs, Helix, Kakoune, nano

GUI editors open in a detached background process. Terminal editors show a hint to run manually in a separate terminal.


MCP Server Reference

Code CLI's MCP server implements the Model Context Protocol (version 2024-11-05). It starts automatically when Code CLI runs.

/mcp-serverPOSTJSON-RPC handler/mcp-server/sseGETServer-Sent Events stream/mcp-serverGETServer info

The server port is available at ~/.codecli/port or displayed in the status bar. Transport options: HTTP (direct JSON-RPC over POST) and SSE (Server-Sent Events for streaming responses).

ACP Server Reference

The Agent Client Protocol provides full agent control for editors that support it (currently Zed). Start with:

Terminal
bash
codecli acp [--cwd <directory>]

This starts a stdio-based JSON-RPC server. The parent process communicates via stdin/stdout using newline-delimited JSON.

Protocol details

  • Transport: stdio (newline-delimited JSON)
  • Protocol version: 1
  • Agent name: CodeCLI
  • Auth: Terminal auth via codecli auth login

Session lifecycle

Lifecycle
text
initialize → newSession → prompt → [streaming updates] → end_turn
↑ ↓
cancel prompt again

ACP capabilities

loadSessionSupportedforkSessionSupportedlistSessionsSupportedresumeSessionSupportedsetSessionModelSupported (with variant support)setSessionModeSupportedpromptSupported (text, image, resource_link, resource)cancelSupportedMCP (HTTP + SSE)SupportedEmbedded contextSupportedImage attachmentsSupported

Event types

The ACP server streams events back to the IDE in real time:

tool_callA tool call has startedtool_call_updateProgress update on a running toolagent_message_chunkStreaming agent response textuser_message_chunkStreaming user inputagent_thought_chunkStreaming reasoning/thinking blocksplanPlan or todo list updateusage_updateToken usage and cost updateavailable_commands_updateCommands list changed

ACP vs MCP

PurposeFull IDE integrationTool and data protocolTransportstdio JSON-RPCHTTP / SSESession managementYes (create, fork, resume)NoStreaming responsesYes (chunked)NoTool executionVia Code CLIDirect from clientBidirectionalYesRequest/response
PreviousMCP ServerNextComputer Use