MCP Python Interpreter
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_ALLOW_SYSTEM_ACCESS | No | Controls whether the MCP server has system access. Set to 0 to disable system access for security. | 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 |
|---|---|
| list_python_environmentsB | List all available Python environments (system Python and conda environments). |
| list_installed_packagesC | |
| run_python_codeA | |
| run_python_fileB | |
| install_packageB | |
| read_fileA | |
| write_fileB | |
| list_directoryB | |
| clear_sessionC | |
| list_sessionsB | List all active REPL sessions. |
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 |
|---|---|
| get_environments_resource | List all available Python environments as a resource. |
| get_working_directory_listing | List all Python files in the working directory as a resource. |
TDQS
Scored across 10 tools
Most tools target clearly distinct resources or actions (execution, files, environments, packages, sessions). The main potential confusion is between run_python_code and run_python_file, but the descriptions make the inline-code vs file-execution split explicit, so an agent can select correctly.
All ten tools follow a consistent snake_case verb_noun pattern: list_*, run_*, install_*, clear_*, read_*, write_*. No mixed conventions or vague single-word names.
Ten tools is a well-scoped surface for a Python interpreter server, covering execution, file I/O, environments, packages, and sessions without redundancy. Each tool earns its place.
Core lifecycle is covered: execute code/files, read/write files, list/install packages, list environments and sessions, and clear sessions. Minor gaps exist (no uninstall_package, no file delete, no environment creation), but agents can work around these via run_python_code.