Heroku MCP Code Execution - Python
About
MCP (model context protocol) server for running python code.
Details
- Author
- heroku
- GitHub stars
- 8
- Downloads
- 209
- Categories
- Developer Tools
Jump to
- Executes Python code with optional pip package installation
- Supports Streamable HTTP, SSE, and STDIO transports
- Deploys to Heroku via one-click or manual setup
- API key authentication for access control
- Configurable STDIO-only mode for code execution isolation
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Heroku MCP Code Execution - PythonCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Deploy via the one-click Heroku button or manually using the Heroku CLI. Set required environment variables (API_KEY, STDIO_MODE_ONLY, REMOTE_SERVER_TRANSPORT_MODULE), then use MCP clients (STDIO or HTTP/SSE) to call the code_exec_python tool with code and optional packages arguments.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"heroku mcp code execution - python": {
"mcp-code-exec-python": {
"command": "python",
"args": [
"example_clients/streamable_http_client.py",
"mcp",
"call_tool",
"--args",
"{"
]
}
}
}
}
McpServers
{
"mcp-code-exec-python": {
"command": "python",
"args": [
"example_clients/streamable_http_client.py",
"mcp",
"call_tool",
"--args",
"{"
]
}
}
Heroku MCP Code Execution - Python
- Heroku MCP Code Execution - Python
- Automatic Deployment
- Manual Deployment
- Set Required Environment Variables from Heroku CLI
- Local Testing
- Local Streamable HTTP, SSE
- Local Streamable HTTP, SSE - Example Requests
- Local STDIO
- 1. Local STDIO - Example Python STDIO Client
- 2. Local STDIO - Direct Calls
- Remote Testing
- Remote Streamable HTTP, SSE
- Remote STDIO
- 1. Remote STDIO - Example Python STDIO Client, Running On-Server
- 2. Remote STDIO - Direct Calls to One-Off Dyno
- 3. Coming Soon - Heroku MCP Gateway!
Automatic Deployment
Manual Deployment
Set Required Environment Variables from Heroku CLI
Instead of manually setting each variable, use the Heroku CLI to pull the correct values.```bash
export APP_NAME=<your-heroku-app-name>
heroku create $APP_NAME
heroku buildpacks:set heroku/python -a $APP_NAME
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





