Persistent Python REPL that lets agents execute code, keep variables between calls and install packages.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add python -- uv --directory /absolute/path/to/python-repl-server run mcp_python~/.codex/config.toml
[mcp_servers.python]
command = "uv"
args = ["--directory", "/absolute/path/to/python-repl-server", "run", "mcp_python"]
# codex mcp add python -- uv --directory /absolute/path/to/python-repl-server run mcp_python~/.cursor/mcp.json
{
"mcpServers": {
"python": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}.vscode/mcp.json
{
"servers": {
"python": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"python": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"python": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"python": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/python-repl-server",
"run",
"mcp_python"
]
}
}
}