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 |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_python_environments | List all available Python environments (system Python and conda environments). |
| list_installed_packages | List installed packages for a specific Python environment.
Args:
environment: Name of the Python environment |
| run_python_code | Execute Python code with flexible execution modes.
Args:
code: Python code to execute
execution_mode: Execution mode - "inline" (default, fast, in-process) or "subprocess" (isolated)
session_id: Session ID for inline mode to maintain state across executions
environment: Python environment name (only for subprocess mode)
save_as: Optional filename to save the code before execution
timeout: Maximum execution time in seconds (only enforced for subprocess mode)
Returns:
Execution result with output
Execution modes:
- "inline" (default): Executes code in the current process. Fast and reliable,
maintains session state. Use for most code execution tasks.
- "subprocess": Executes code in a separate Python process. Use when you need
environment isolation or a different Python environment. |
| run_python_file | Execute a Python file (always uses subprocess for file execution).
Args:
file_path: Path to the Python file to execute
environment: Name of the Python environment to use
arguments: List of command-line arguments to pass to the script
timeout: Maximum execution time in seconds (default: 300) |
| install_package | Install a Python package in the specified environment.
Args:
package_name: Name of the package to install
environment: Name of the Python environment
upgrade: Whether to upgrade if already installed
timeout: Maximum execution time in seconds |
| read_file | Read the content of any file, with size limits for safety.
Args:
file_path: Path to the file
max_size_kb: Maximum file size to read in KB |
| write_file | Write content to a file.
Args:
file_path: Path to the file to write
content: Content to write
overwrite: Whether to overwrite if exists |
| list_directory | List all Python files in a directory.
Args:
directory_path: Path to directory (empty for working directory) |
| clear_session | Clear a REPL session's state and history.
Args:
session_id: Session ID to clear |
| list_sessions | 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. |