Skip to content

Remote Deployment (Ops)

The HTTP transport enables remote access to Workflow MCP with optional OAuth authentication.

Users should connect to:

https://api.workflow-mcp.blackmesa.live/mcp
Terminal window
# Install
npm install @blackmesa/workflow-mcp-http
# Run
MCP_PORT=3000 npx @blackmesa/workflow-mcp-http
VariableDefaultDescription
PORT3000Server port (Render/Heroku standard)
MCP_PORT3000Server port (fallback)
MCP_HOST0.0.0.0Bind address
MCP_BASE_PATH/mcpMCP endpoint path
MCP_WORKSPACE_DIRcwdSession file directory
CORS_ORIGINS*Allowed origins
MCP_OAUTH_ENABLEDfalseEnable GitHub OAuth
GITHUB_CLIENT_ID-OAuth client ID
GITHUB_CLIENT_SECRET-OAuth secret
MethodPathDescription
POST/mcpMain request handler
GET/mcpSSE stream for notifications
DELETE/mcpSession termination
GET/healthHealth check
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const transport = new StreamableHTTPClientTransport(
new URL('https://your-server.com/mcp')
);
const client = new Client({ name: 'my-client', version: '1.0.0' });
await client.connect(transport);

When MCP_OAUTH_ENABLED=true, the server requires a valid GitHub access token:

const transport = new StreamableHTTPClientTransport(
new URL('https://your-server.com/mcp'),
{
requestInit: {
headers: {
'Authorization': `Bearer ${githubAccessToken}`
}
}
}
);
  1. Create a GitHub OAuth App at https://github.com/settings/developers
  2. Set callback URL to your server
  3. Copy Client ID and Secret
  4. Set environment variables:
    Terminal window
    MCP_OAUTH_ENABLED=true
    GITHUB_CLIENT_ID=your_client_id
    GITHUB_CLIENT_SECRET=your_client_secret

Sessions are stored in memory with automatic cleanup:

  • Sessions expire after 1 hour of inactivity
  • Cleanup runs every minute
  • Session count available via /health endpoint

The HTTP server is stateful (sessions in memory). For horizontal scaling:

  • Use sticky sessions/session affinity
  • Or implement a shared session store (Redis)

Set MCP_WORKSPACE_DIR to a persistent volume:

Terminal window
MCP_WORKSPACE_DIR=/data/workflow

For browser-based clients, configure allowed origins:

Terminal window
CORS_ORIGINS=https://app.example.com,https://admin.example.com