Repository navigation
Releases
v0.3.0
Explicit REPL sessions
Python REPL MCP now keeps separate workers for chats that share one dispatcher, even when those chats use the same directory. DSH cannot supply the OpenCode session metadata that the old API used; with 0.2.6's implicit routing, such chats could end up in the same worker. In 0.3.0, each chat opens its own session and supplies the returned UID explicitly.
Breaking migration from 0.2.x
- Call
repl_open_session(workdir)with an existing absolute directory. Each call starts a new worker in that directory and returnssession_uid,workdir, andkernel_id. - Pass
session_uidtorepl_execute,repl_run_file,repl_reset, andrepl_stop. The_meta,PYTHON_REPL_MCP_SESSION,PYTHON_REPL_MCP_WORKDIR, and default-session routing are removed. repl_resetkeeps the UID and replaces the worker.repl_stop, idle expiry, or confirmed terminal worker loss invalidates it. If a chat loses its UID, callrepl_open_sessionagain; the new worker starts with a clean namespace.
The default limit is 16 sessions per dispatcher. The idle timeout is 1,800 seconds by default and can be set with PYTHON_REPL_MCP_IDLE_TIMEOUT (seconds; 0 disables expiry). Idle expiry never interrupts an executing cell.
Install on Windows with Python 3.14:
uv pip install --upgrade python-repl-mcp==0.3.0Verification
Verified with 180 local tests, Windows CI, two independent lifecycle checks, and two native OpenCode 2.4.3 chats using the published wheel and one dispatcher. The tests confirmed distinct worker PIDs, namespace isolation, and UID reuse across turns. Native DSH acceptance is still pending.
v0.2.6
v0.2.5
What's Changed
- chore(deps): bump the github-actions-minor-and-patch group with 3 updates by @dependabot[bot] in #2
- chore(deps): bump astral-sh/setup-uv from 6.8.0 to 10.4.0 by @dependabot[bot] in #3
New Contributors
- @dependabot[bot] made their first contribution in #2
Full Changelog: v0.2.4...v0.2.5
python-repl-mcp 0.2.4
python-repl-mcp 0.2.4
Persistent CPython REPL over MCP for OpenCode and other stdio MCP hosts.
- One pooled dispatcher; one worker and working directory per chat.
PYTHON_REPL_MCP_OPENCODE_SERVER=autodiscovers the desktop service.- Idle workers stop after 30 minutes (
PYTHON_REPL_MCP_IDLE_TIMEOUT), without
interrupting an executing cell; stale expiration callbacks are ignored after
a fresh idle window is armed. - Structured
result_type,result_json(including JSON null),
result_truncated,kernel_idandworkdir. - 207 unit/E2E tests; OpenCode pool/lookup/EOF probes; native Command Code
single-session receipt. Disabled-by-default pooled entry requires Connect. - Windows, CPython 3.14.x,
uv. Install the attached wheel into the shared venv.
Rollback: install the published v0.1.4 wheel.