Basic information
About MCP Python Executor Server
# MCP Python Executor
MCP Python Executor is a MCP server in the Other category listed in the AddMCP.net directory, published by bsmi021. Supported transport: stdio. Runtime: node. License: MIT license. The repository has 3 GitHub stars. Source code is hosted on github.com. Related topics: claude, mcp, mcp-server, modelcontextprotocol, python.
Setup
{
"mcpServers": {
"mcp-python-executor": {
"command": "node",
"args": [
"path/to/python-executor/build/index.js"
],
"env": {
"PREINSTALLED_PACKAGES": "numpy pandas matplotlib scikit-learn",
"MAX_MEMORY_MB": "512",
"EXECUTION_TIMEOUT_MS": "30000",
"MAX_CONCURRENT_EXECUTIONS": "5",
"LOG_LEVEL": "info",
"LOG_FORMAT": "json"
}
}
}
}
{
"mcpServers": {
"mcp-python-executor": {
"command": "node",
"args": [
"path/to/python-executor/build/index.js"
],
"env": {
"PREINSTALLED_PACKAGES": "numpy pandas matplotlib scikit-learn",
"MAX_MEMORY_MB": "512",
"EXECUTION_TIMEOUT_MS": "30000",
"MAX_CONCURRENT_EXECUTIONS": "5",
"LOG_LEVEL": "info",
"LOG_FORMAT": "json"
}
}
}
}
{
"servers": {
"mcp-python-executor": {
"command": "node",
"args": [
"path/to/python-executor/build/index.js"
],
"env": {
"PREINSTALLED_PACKAGES": "numpy pandas matplotlib scikit-learn",
"MAX_MEMORY_MB": "512",
"EXECUTION_TIMEOUT_MS": "30000",
"MAX_CONCURRENT_EXECUTIONS": "5",
"LOG_LEVEL": "info",
"LOG_FORMAT": "json"
}
}
}
}
MCP Python Executor config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-python-executor": {
"command": "node",
"args": [
"path/to/python-executor/build/index.js"
],
"env": {
"PREINSTALLED_PACKAGES": "numpy pandas matplotlib scikit-learn",
"MAX_MEMORY_MB": "512",
"EXECUTION_TIMEOUT_MS": "30000",
"MAX_CONCURRENT_EXECUTIONS": "5",
"LOG_LEVEL": "info",
"LOG_FORMAT": "json"
}
}
}
}
MCP Python Executor tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Python Executor?
MCP Python Executor is a Model Context Protocol (MCP) server that allows AI models and other MCP clients to execute Python code and manage Python packages. It enforces safety constraints, resource limits, and provides health checks and structured logging, making it suitable for controlled code execution environments.
How to use MCP Python Executor?
Configure the server in your MCP settings with the command node path/to/python-executor/build/index.js. Customize behavior via environment variables such as PREINSTALLED_PACKAGES, MAX_MEMORY_MB, EXECUTION_TIMEOUT_MS, and MAX_CONCURRENT_EXECUTIONS. Then use the provided tools—execute_python to run inline or file-based Python code, and install_packages to install Python packages.
Key features of MCP Python Executor
- Execute Python code with safety constraints
- Install and manage Python packages dynamically
- Pre-configure commonly used packages on startup
- Resource monitoring with configurable memory and time limits
- Health checks and structured logging (JSON or text)
Use cases of MCP Python Executor
- Run Python code snippets from an AI assistant to perform calculations or data transformations
- Execute pre-existing Python scripts by providing a script path
- Install additional Python packages on demand during a session
- Manage concurrent code executions with defined memory and timeout limits
Frequently asked questions
1 What kind of Python code can be executed?
Any valid Python code can be run inline via the code parameter or from a file via scriptPath. The server applies memory limits, timeouts, and concurrency restrictions to ensure safe execution.
2 What are the runtime dependencies?
The server runs on Node.js and requires a Python environment. The specific Python version is not stated in the README; the server attempts to use the system’s default Python.
3 How do I pre-install packages?
Set the PREINSTALLED_PACKAGES environment variable to a space-separated list of package names (e.g., numpy pandas matplotlib scikit-learn). These are installed on server startup using pip.
4 What resource limits are enforced?
You can configure per‑execution memory limit (MAX_MEMORY_MB, default 512), timeout (EXECUTION_TIMEOUT_MS, default 30000), and maximum concurrent executions (MAX_CONCURRENT_EXECUTIONS, default 5). No authentication or transport details are specified in the README.
5 How does logging work?
Logging level and format are controlled by LOG_LEVEL and LOG_FORMAT environment variables, supporting debug, info, error levels and json or text formats.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In