Back to Home
heroku icon

mcp-code-exec-python

by heroku

Overview

Provides a Model Context Protocol (MCP) server for executing arbitrary Python code with optional package installations, supporting HTTP, SSE, and STDIO transports.

Installation

Run Command
uvicorn src.streamable_http_server:app --reload

Environment Variables

  • API_KEY
  • STDIO_MODE_ONLY
  • REMOTE_SERVER_TRANSPORT_MODULE
  • USE_TEMP_DIR

Security Notes

CRITICAL: The server is designed to execute arbitrary Python code and install arbitrary packages provided by a client, without robust sandboxing. The `code_exec_python` tool explicitly states it has access to networking, the filesystem, and the standard library. This functionality inherently allows for Remote Code Execution (RCE) if a malicious client can access the server. The `USE_TEMP_DIR` option only isolates package installations within a temporary virtual environment, not the underlying execution environment from the host system. Deployment in a highly restricted, isolated environment (e.g., a container with minimal privileges) is essential but not enforced by the codebase itself. No hardcoded secrets were found.

Similar Servers

Stats

Interest Score22
Security Score1
Cost ClassMedium
Avg Tokens600
Stars6
Forks5
Last Update2025-12-29

Tags

Code ExecutionPythonHerokuMCPAI Tooling