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 access to system resources | 0 |
Schema
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_file_in_current_dir | List Python files in the current working directory. |
get_working_directory_listing | List all Python files in the working directory as a resource. |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
read_file | 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_file | 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_directory | 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_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 (default: default if custom path provided, otherwise system) |
run_python_code | 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_package | 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_file | 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_file | 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 |