Environment Variables
Environment Variables
Section titled “Environment Variables”Complete reference for all environment variables used by Workflow MCP.
HTTP Server
Section titled “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 |
| Variable | Default | Description |
|---|---|---|
CORS_ORIGINS | * | Allowed origins (comma-separated for multiple) |
Example:
CORS_ORIGINS=https://app.example.com,https://admin.example.comOAuth (GitHub)
Section titled “OAuth (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
Section titled “Node.js”| Variable | Default | Description |
|---|---|---|
NODE_ENV | - | Set to production for production builds |
Examples
Section titled “Examples”Local Development
Section titled “Local Development”MCP_PORT=3000MCP_WORKSPACE_DIR=/home/user/projects/myappRender Deployment
Section titled “Render Deployment”# Set in Render dashboardMCP_WORKSPACE_DIR=/tmp/workflow-workspaceCORS_ORIGINS=https://myapp.comDocker with OAuth
Section titled “Docker 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
Section titled “.env File”For local development, create a .env file:
# ServerMCP_PORT=3000MCP_HOST=localhostMCP_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