Ephemeral Buffer MCP Server (ephemeral-buffer)
Ephemeral Buffer is an MCP server and command-line client for capturing command output in a bounded, searchable buffer. Coding agents can search captures and retrieve relevant portions instead of carrying entire build and test logs in their conversation context.
Quick start
Requires Python 3.10 or newer. Install the package in an isolated environment.
macOS and Linux
python3 -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install ephemeral-buffer-mcp
The default distribution includes BM25, semantic, and hybrid search. To
explicitly choose the smaller lexical-only install, use
ephemeral-buffer-mcp-lexical; it supports BM25 while semantic and hybrid
search require the full distribution.
Configure your MCP client using the user guide. For an isolated
server, the server and ephbuf must use the same unique session ID. On
macOS/Linux, export the ID before starting Codex with the launcher installed in
the virtual environment:
export EPHEMERAL_SESSION_ID=quick-start-session
.venv/bin/codex-ephemeral
Set the same value in another MCP client's server environment. Then capture
command output with ephbuf, passing the same ID.
macOS and Linux
.venv/bin/python -c 'print("Hello from a captured command")' 2>&1 |
EPHEMERAL_SESSION_ID=quick-start-session .venv/bin/ephbuf --label "quick start"
Windows installation steps are in the user guide's Windows support section. Windows runtime behavior isn't covered by CI; that section describes the unverified CLI capture and process-control paths.
The agent can then search the capture and retrieve bounded slices through the MCP tools.
Context reduction in one agent comparison
In a five-repetition gpt-6-luna comparison run on 2026-10-09, mean MCP
tool-response bytes fell from 6,681 to 1,501 (77.5%); the Codex context proxy
fell from 23,910 to 17,643 bytes (26.2%). This is a result from one workload,
not a general savings guarantee. The context figure is a prompt/event-envelope
proxy, not the model's internal context size. See the benchmark methodology
and comparison details.