mcp-python-exec-sandbox
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| UV_PATH | No | Path to uv binary | uv |
| MAX_TIMEOUT | No | Maximum allowed timeout in seconds | 300 |
| PYTHON_VERSION | No | Python version for execution | 3.13 |
| DEFAULT_TIMEOUT | No | Default timeout in seconds | 30 |
| SANDBOX_BACKEND | No | native | docker | none | native on Linux, docker on macOS |
| MAX_OUTPUT_BYTES | No | Maximum output size in bytes | 102400 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
} |
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_pythonA | Execute a Python script with automatic dependency management. The script can include PEP 723 inline metadata (# /// script blocks) for declaring dependencies. Additional dependencies can also be passed via the dependencies parameter and will be merged. Args: script: Python source code to execute. May include PEP 723 metadata. dependencies: Extra PEP 508 dependency specifiers to make available. timeout_seconds: Maximum execution time (1-300, default 30). Returns: Formatted output with stdout, stderr, exit code, and duration. Example - simple script: Example - with dependencies parameter: Example - with inline dependency metadata (preferred for multiple deps): Always pin dependency versions (e.g. "pandas>=2.2" instead of "pandas") for reproducible results. The inline metadata block (# /// script ... # ///) is the recommended way to declare dependencies directly in the script (see PEP 723: https://peps.python.org/pep-0723/). The dependencies parameter is a simpler alternative when you just need to add a few packages. Both accept standard pip-style version specifiers like "requests>=2.28" or "pandas" (see PEP 508: https://peps.python.org/pep-0508/). |
| check_environmentA | Check the execution environment and report status. Returns information about Python version, uv version, platform, sandbox configuration, and cache status. |
| validate_scriptA | Validate a Python script's PEP 723 metadata and dependencies without executing it. Checks metadata syntax, dependency format, and requires-python compatibility. Args: script: Python source code to validate. May include inline dependency metadata (# /// script blocks, see https://peps.python.org/pep-0723/). dependencies: Extra dependency specifiers to validate, using standard pip-style format like "requests>=2.28" (see https://peps.python.org/pep-0508/). Returns: Validation result with metadata details or error information. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/lu-zhengda/mcp-python-exec-sandbox'
If you have feedback or need assistance with the MCP directory API, please join our Discord server