Reference
Environment Variables
All environment variables for Workflow MCP
Environment Variables
Complete reference for all environment variables used by Workflow MCP.
HTTP Server
| Variable | Default | Description |
|---|---|---|
PORT | - | Server port (Render/Heroku standard, takes precedence) |
MCP_PORT | 3000 | Server port |
MCP_HOST | 0.0.0.0 | Bind address |
MCP_BASE_PATH | /mcp | MCP endpoint path |
MCP_WORKSPACE_DIR | process.cwd() | Working directory for session files |
CORS
| Variable | Default | Description |
|---|---|---|
CORS_ORIGINS | * | Allowed origins (comma-separated for multiple) |
Example:
CORS_ORIGINS=https://app.example.com,https://admin.example.comOAuth (GitHub)
| Variable | Default | Description |
|---|---|---|
MCP_OAUTH_ENABLED | false | Enable 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) |
Node.js
| Variable | Default | Description |
|---|---|---|
NODE_ENV | - | Set to production for production builds |
Examples
Local Development
MCP_PORT=3000
MCP_WORKSPACE_DIR=/home/user/projects/myappRender Deployment
# Set in Render dashboard
MCP_WORKSPACE_DIR=/tmp/workflow-workspace
CORS_ORIGINS=https://myapp.comDocker with OAuth
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.env File
For local development, create a .env file:
# 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:5173Note: The HTTP server doesn't automatically load .env files. Use a tool like dotenv-cli:
npx dotenv-cli -- node packages/http/dist/index.jsOr source it in your shell:
export $(cat .env | xargs)
node packages/http/dist/index.js