MCP Python Interpreter
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DIR | Yes | Required working directory for file operations (equivalent to --dir parameter). | |
| PYTHON_PATH | No | Path to a specific Python executable (optional, equivalent to --python-path parameter). | |
| MCP_ALLOW_SYSTEM_ACCESS | No | Allow access to system Python environments (0 or 1). | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_fileA | |
| write_fileB | |
| list_directoryA | |
| list_python_environmentsB | List all available Python environments (system Python and conda environments). |
| list_installed_packagesA | |
| run_python_codeC | |
| install_packageA | |
| write_python_fileB | |
| run_python_fileB | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| python_function_template | Generate a template for a Python function with docstring. |
| refactor_python_code | Help refactor Python code for better readability and performance. |
| debug_python_error | Help debug a Python error. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| python://environments | |
| python://file | |
| python://directory |
TDQS
Scored across 9 tools
Each tool targets a distinct operation: package installation, listing, environments, code execution (inline/file), file read/write, and listing Python files. There is no overlap, and descriptions clearly differentiate similar tools like run_python_code and run_python_file.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., install_package, list_directory, run_python_code). No deviations or mixed conventions.
With 9 tools, the set is well-scoped for a Python interpreter server. It covers essential operations without being overwhelming or too sparse.
Core workflows (install, run, read/write files, list environments) are covered. Minor gaps include missing uninstall_package and more detailed environment management, but the set is sufficient for common tasks.