Skip to main content
Glama
PortPro-Technologies-Inc

MCP Python Interpreter

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_ALLOW_SYSTEM_ACCESSNoControls whether the MCP server has access to system resources0

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

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
read_fileA
Read the content of any file, with size limits for safety.

Args:
    file_path: Path to the file (relative to working directory or absolute)
    max_size_kb: Maximum file size to read in KB (default: 1024)

Returns:
    str: File content or an error message
write_fileA
Write content to a file in the working directory or system-wide if allowed.

Args:
    file_path: Path to the file to write (relative to working directory or absolute if system access is enabled)
    content: Content to write to the file
    overwrite: Whether to overwrite the file if it exists (default: False)
    encoding: File encoding (default: utf-8)

Returns:
    str: Status message about the file writing operation
list_directoryA
List all Python files in a directory or subdirectory.

Args:
    directory_path: Path to directory (relative to working directory or absolute, empty for working directory)
list_python_environmentsB

List all available Python environments (system Python and conda environments).

list_installed_packagesB
List installed packages for a specific Python environment.

Args:
    environment: Name of the Python environment (default: default if custom path provided, otherwise system)
run_python_codeB
Execute Python code and return the result. Code runs in the working directory.

Args:
    code: Python code to execute
    environment: Name of the Python environment to use (default if custom path provided, otherwise system)
    save_as: Optional filename to save the code before execution (useful for future reference)
install_packageB
Install a Python package in the specified environment.

Args:
    package_name: Name of the package to install
    environment: Name of the Python environment (default if custom path provided, otherwise system)
    upgrade: Whether to upgrade the package if already installed (default: False)
write_python_fileB
Write content to a Python file in the working directory or system-wide if allowed.

Args:
    file_path: Path to the file to write (relative to working directory or absolute if system access is enabled)
    content: Content to write to the file
    overwrite: Whether to overwrite the file if it exists (default: False)
run_python_fileB
Execute a Python file and return the result.

Args:
    file_path: Path to the Python file to execute (relative to working directory or absolute if system access is enabled)
    environment: Name of the Python environment to use (default if custom path provided, otherwise system)
    arguments: List of command-line arguments to pass to the script

Prompts

Interactive templates invoked by user choice

NameDescription
python_function_templateGenerate a template for a Python function with docstring.
refactor_python_codeHelp refactor Python code for better readability and performance.
debug_python_errorHelp debug a Python error.

Resources

Contextual data attached and managed by the client

NameDescription
get_environments_resourceList all available Python environments as a resource.
get_file_in_current_dirList Python files in the current working directory.
get_working_directory_listingList all Python files in the working directory as a resource.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PortPro-Technologies-Inc/mcp-python-interpreter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server