Skip to content

Environment Variables

Complete reference for all environment variables used by Workflow MCP.

VariableDefaultDescription
PORT-Server port (Render/Heroku standard, takes precedence)
MCP_PORT3000Server port
MCP_HOST0.0.0.0Bind address
MCP_BASE_PATH/mcpMCP endpoint path
MCP_WORKSPACE_DIRprocess.cwd()Working directory for session files
VariableDefaultDescription
CORS_ORIGINS*Allowed origins (comma-separated for multiple)

Example:

Terminal window
CORS_ORIGINS=https://app.example.com,https://admin.example.com
VariableDefaultDescription
MCP_OAUTH_ENABLEDfalseEnable OAuth authentication
GITHUB_CLIENT_ID-GitHub OAuth App client ID
GITHUB_CLIENT_SECRET-GitHub OAuth App client secret
GITHUB_CALLBACK_URL-OAuth callback URL (optional)
VariableDefaultDescription
NODE_ENV-Set to production for production builds
Terminal window
MCP_PORT=3000
MCP_WORKSPACE_DIR=/home/user/projects/myapp
Terminal window
# Set in Render dashboard
MCP_WORKSPACE_DIR=/tmp/workflow-workspace
CORS_ORIGINS=https://myapp.com
Terminal window
docker run -p 3000:3000 \
-e MCP_OAUTH_ENABLED=true \
-e GITHUB_CLIENT_ID=xxx \
-e GITHUB_CLIENT_SECRET=xxx \
-e MCP_WORKSPACE_DIR=/data \
-v ./data:/data \
workflow-mcp

For local development, create a .env file:

Terminal window
# Server
MCP_PORT=3000
MCP_HOST=localhost
MCP_WORKSPACE_DIR=./
# OAuth (optional)
# MCP_OAUTH_ENABLED=true
# GITHUB_CLIENT_ID=your_client_id
# GITHUB_CLIENT_SECRET=your_client_secret
# CORS (optional)
# CORS_ORIGINS=http://localhost:5173

Note: The HTTP server doesn’t automatically load .env files. Use a tool like dotenv-cli:

Terminal window
npx dotenv-cli -- node packages/http/dist/index.js

Or source it in your shell:

Terminal window
export $(cat .env | xargs)
node packages/http/dist/index.js