python_replLABSCO SUMMARY
Persistent sessions are the difference between a calculator and a workspace.
Because state survives between calls, a model can load a dataframe once and keep poking at it, instead of rebuilding context in every snippet — and the readable history resource means you can see exactly what it ran. Treat it as a local shell with the same trust level: point it at a machine and directory you would be comfortable letting the model write to.
What it is
A small MCP server that exposes an interactive Python read-eval-print loop. State is kept per session, so a value defined in one call is still in scope for the next one.
What you get
python_repl— runs Python code in a named session, takingcodeandsession_id- Separate state per session, so two lines of work do not collide
- Expressions and statements both work, and stdout and stderr come back with the result
- Session history exposed as a
repl://resource, showing each input and its output
Requirements
The python-local package, run with uv or uvx. Code executes in the server's own Python process on your machine, with whatever that interpreter can reach — there is no sandbox in front of it.
Setup effort
One command — uvx python-local
USE CASES
Exploring a dataset step by step
Load the data in one call, then keep asking follow-up questions against the object that is already in memory.
Checking a calculation the model just claimed
Have it run the arithmetic instead of asserting it, and read the captured output.
Keeping two lines of work apart
Give each thread its own session id so their variables never overwrite each other.
Reviewing what was actually executed
Read the session history resource to see every input and its output in order.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
uvx on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx python-localMCP Clients
Claude Desktop
{
"mcpServers": {
"python_local": {
"command": "uvx",
"args": [
"python-local"
]
}
}
}