A Model Context Protocol (MCP) server that allows LLMs to interact with Python environments, read and write files, execute Python code, and manage development workflows.
- Environment Management: List and use different Python environments (system and conda)
- Code Execution: Run Python code or scripts in any available environment
- Package Management: List installed packages and install new ones
- File Operations:
- Read files of any type (text, source code, binary)
- Write text and binary files
- Python Prompts: Templates for common Python tasks like function creation and debugging
You can install the MCP Python Interpreter using pip:
pip install mcp-python-interpreterOr with uv:
uv install mcp-python-interpreter- Install Claude Desktop
- Open Claude Desktop, click on menu, then Settings
- Go to Developer tab and click "Edit Config"
- Add the following to your
claude_desktop_config.json:
{
"mcpServers": {
"mcp-python-interpreter": {
"command": "uvx",
"args": [
"mcp-python-interpreter",
"--dir",
"/path/to/your/work/dir",
"--python-path",
"/path/to/your/python"
],
"env": {
"MCP_ALLOW_SYSTEM_ACCESS": 0
},
}
}
}For Windows:
