Set up peek with Cline, Windsurf, or Codex CLI
When I use Cline, Windsurf, or Codex CLI, I want peek's MCP server registered without hunting for each tool's config file.
What you’ll end up with
A working peek MCP server registered with whichever of Cline, Windsurf, or Codex CLI you use, verified by asking the agent to call list_recent_sessions.

Prerequisites
- One or more of: Cline, Windsurf, Codex CLI
- Node >= 22 (peek’s native
better-sqlite3dependency only ships prebuilt binaries for Node 22+; older Node falls back to compiling from source and fails on stock Windows) npm i -g @peekdev/cli- Chrome with the peek extension installed — from the Chrome Web Store, or loaded unpacked from
packages/peek-extension/chrome-mv3/for local builds
Steps
Run peek init first — for Windsurf the wizard writes the config for you. For Cline and Codex CLI the config has to be added by hand; the wizard prints the canonical block to paste.
Cline
Cline stores its MCP config inside the VS Code extension’s per-OS globalStorage directory, so peek’s wizard surfaces it as manual config required rather than guessing the path. Open the Cline panel in VS Code → MCP Servers → Configure MCP Servers, and add:
{
"mcpServers": {
"peek": {
"command": "npx",
"args": ["-y", "@peekdev/mcp@latest"]
}
}
}
Reload the VS Code window to pick up the new server.
Windsurf
peek init
Select Windsurf in the wizard. It writes the entry into ~/.codeium/windsurf/mcp_config.json. Restart Windsurf to pick up the new server. If you prefer hand-editing, the block is the same mcpServers.peek JSON shown above.
Codex CLI
Codex CLI reads MCP config from ~/.codex/config.toml (TOML, not JSON). peek init doesn’t write this file today; paste the following manually:
[mcp_servers.peek]
command = "npx"
args = ["-y", "@peekdev/mcp@latest"]
Then restart Codex CLI.
Verify
In any of the three clients:
Call peek’s
list_recent_sessionsand show me what it returns.
You should see either an empty list or your captured sessions.
Why this works
All three clients implement the MCP client protocol — they spawn the configured server as a subprocess and call its tools. The only thing that varies is the config file location and format. peek’s CLI knows the JSON-format ones it can write; the TOML one (Codex CLI) and the per-OS-globalStorage one (Cline) get a manual block.