server.run() call starts your server on stdio (the default) or Streamable HTTP:
This page is under construction. The outline below sketches what it will cover.
- Configuration priority — code > environment variables > defaults, so a deployed server switches transports with env vars alone:
MCP_TRANSPORT,MCP_HOST,MCP_PORT,MCP_PATH(plus plainPORTas a fallback for Railway/Render/Heroku). Defaults: stdio, port 3000, host0.0.0.0, path/mcp. - Transports —
stdioandhttp(Streamable HTTP). SSE is not supported; Streamable HTTP supersedes it. - Inspecting the bound address —
server.addressafterrun()resolves (including OS-assigned ports withport: 0);nullfor stdio. - Running via the CLI —
fastmcp run server.tsand thedev inspectorloop.