# Python Interpreter MCP server

> Runs Python code and scripts, manages Python environments and packages, and reads or writes files for an AI client.

- Repository: https://github.com/yzfly/mcp-python-interpreter
- Page: https://hostedmcp.org/servers/yzfly/mcp-python-interpreter
- Transport: —
- Stars: 104

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MCP_ALLOW_SYSTEM_ACCESS` | no | no |  |

## Tools (9)

- `list_python_environments`
- `list_installed_packages`
- `install_package`
- `run_python_code`
- `run_python_file`
- `read_file`
- `write_file`
- `write_python_file`
- `list_directory`

## FAQ

### Does it restrict file access to a working directory?

File tools and save_as paths are checked against the working directory unless MCP_ALLOW_SYSTEM_ACCESS=1 is set, but executed Python code itself is not sandboxed.

### How do I configure it in Claude Desktop?

Add the mcp-python-interpreter entry to claude_desktop_config.json using uvx with --dir and --python-path arguments, then restart Claude Desktop.
