PROBLEM: MCP server was using port 8000 despite PORT=8080 being set in Railway. Environment variable wasn't being read correctly by the Python process. SOLUTION: - Set PORT=8080 in start command environment - Add explicit --port 8080 command argument - Double enforcement ensures port 8080 is used EXPECTED RESULT: - MCP server will start on port 8080 (not 8000) - Railway load balancer can route traffic correctly - SSE endpoint accessible for ChatGPT at /sse - No more 502 errors 🚀 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
11 lines
No EOL
338 B
JSON
11 lines
No EOL
338 B
JSON
{
|
|
"$schema": "https://railway.app/railway.schema.json",
|
|
"build": {
|
|
"buildCommand": "cd mcp_server && uv sync"
|
|
},
|
|
"deploy": {
|
|
"startCommand": "cd mcp_server && PORT=8080 uv run graphiti_mcp_server.py --transport sse --host 0.0.0.0 --port 8080",
|
|
"restartPolicyType": "on_failure",
|
|
"restartPolicyMaxRetries": 10
|
|
}
|
|
} |