NitroStack Logo
/python
/guides
/dual transport

Dual Transport

MCP_TRANSPORT_TYPE is stdio | http | dual.

ValueUse
stdioDefault outside production. Claude Desktop, Cursor.
httpStreamable HTTP + legacy SSE. Cloud / Inspector.
dualDefault in production (NODE_ENV=production). stdio + HTTP as asyncio tasks in one process, shared DI.

HTTP surface:

  • POST/GET/DELETE /mcp — Streamable HTTP (/mcp and /mcp/ are equivalent; Inspector wants no slash for SSE GET)
  • GET /sse + POST /mcp/messages/ — legacy HTTP+SSE (trailing slash required)
  • GET /mcp/health — health
Python
server = ServerConfig(name="my-server", transport_type="http", max_sessions=100)

Either transport stopping (STDIO EOF or HTTP signal) stops the other.