Skip to content
Current State: ALPHA - Use at your own risk / Work in Progress

MCP Server Reference

Universal MCP server for Eryxon Flow MES - Works in both self-hosted and cloud SaaS deployments.

  • Auto-detects direct Supabase or REST API connection
  • 55 tools across 9 modules for jobs, parts, operations, quality, shipping, analytics
  • Production-grade validation with Zod runtime type checking
  • Tool factory pattern reducing code duplication by 60%
  • Multi-tenant safe via API keys or RLS
  • Deploy to Railway, Fly.io, or run locally
  • 90-test suite with 100% pass rate
Section titled “Cloud SaaS (Recommended for Hosted Deployment)”

Users connect to YOUR hosted MCP server using their API key:

Terminal window
cd mcp-server
npm install
npm run build
# Set your API endpoint (your project)
export ERYXON_API_URL="https://your-project.supabase.co"
# Users provide their own API key
export ERYXON_API_KEY="ery_live_xxxxx" # From Settings → API Keys
npm start

User’s Claude Desktop config:

{
"mcpServers": {
"eryxon-flow": {
"command": "node",
"args": ["/path/to/eryxon-flow/mcp-server/dist/index.js"],
"env": {
"ERYXON_API_URL": "https://your-project.supabase.co",
"ERYXON_API_KEY": "ery_live_xxxxx"
}
}
}
}

For single-tenant self-hosted deployments:

Terminal window
cd mcp-server
npm install
npm run build
export SUPABASE_URL="https://your-project.supabase.co"
export SUPABASE_SERVICE_KEY="eyJhbGc..." # Service role key
npm start

The server automatically detects which mode to use:

  • Has ERYXON_API_KEY? → API Mode (cloud, multi-tenant)
  • Has SUPABASE_SERVICE_KEY? → Direct Mode (self-hosted, single-tenant)
Claude Desktop (User)
↓ MCP Protocol
MCP Server (Your deployment or local)
↓ REST API (if cloud) OR Direct Supabase (if self-hosted)
Supabase Edge Functions / Database
↓ RLS (tenant isolation)
Your Data
  1. Jobs (7 tools) - Job lifecycle and management
  2. Parts (2 tools) - Part tracking
  3. Operations (5 tools) - Operation workflow with state transitions
  4. Tasks (2 tools) - Task management
  5. Issues (8 tools) - Quality issues and NCRs
  6. Substeps (5 tools) - Operation substeps
  7. Dashboard (3 tools) - Production metrics
  8. Scrap (7 tools) - Scrap tracking and analytics
  9. Agent Batch (16 tools) - Batch operations optimized for AI agents
Terminal window
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
# Start in development mode
npm run dev