Deployment
Deploy the MCP + HTTP server to Railway (or any container host)
mymcp-serve runs the FastAPI app, which mounts FastMCP at /mcp. One image,
one process, one port -- anything that can run a container can host it.
Railway (quickest path)
- Create a project from this repo. Railway detects
Dockerfileandrailway.jsonand uses them automatically. - Set environment variables in the Railway dashboard:
DEV_ENV=prod-- picks upcommon/production_config.yamloverrides.BACKEND_DB_URI-- Postgres connection string (Railway can provision one).SESSION_SECRET_KEY-- random 32+ bytes.WORKOS_CLIENT_ID,WORKOS_API_KEY-- only if using JWT auth.- Any other secrets your services need (LLM keys, Stripe, etc.).
- Edit
common/production_config.yamland replace the placeholderserver.allowed_originswith your dashboard / MCP host domain. - Deploy. Railway's healthcheck hits
/health.
Other hosts
Any container host works. The Dockerfile runs:
uv run uvicorn api_server.server:app --host 0.0.0.0 --port ${PORT:-8080}Expose port 8080 (or whatever you set PORT to). Healthcheck /health.
Mount MCP traffic at the /mcp path.
Connecting clients
Once deployed, clients connect to https://YOUR-DOMAIN/mcp with a Bearer JWT
or an X-API-KEY header. See Setup.