Fix Railway port configuration: explicitly force port 8080

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>
This commit is contained in:
Tyler Lafleur 2025-09-19 21:13:44 -05:00
parent c76ac66bdd
commit 76332e34bd

View file

@ -4,7 +4,7 @@
"buildCommand": "cd mcp_server && uv sync" "buildCommand": "cd mcp_server && uv sync"
}, },
"deploy": { "deploy": {
"startCommand": "cd mcp_server && uv run graphiti_mcp_server.py --transport sse --host 0.0.0.0", "startCommand": "cd mcp_server && PORT=8080 uv run graphiti_mcp_server.py --transport sse --host 0.0.0.0 --port 8080",
"restartPolicyType": "on_failure", "restartPolicyType": "on_failure",
"restartPolicyMaxRetries": 10 "restartPolicyMaxRetries": 10
} }