server.fetch(request) is the portable mcp-use server boundary. Mount it at
your MCP route; no framework-specific handler is required. Views add one
deployment concern: their generated files live in .mcp-use/build/views/.
Run the build with the public MCP endpoint before deploying:
Node and filesystem runtimes
Use this for Railway, Manufact, Bun, and a Node Vercel Function. Deploy.mcp-use/build with the server and forward the MCP route, including its
_mcp-use subtree, to server.fetch. The server reads the generated assets
from disk and serves them from the same public origin.
Edge runtime with co-located static assets
Use this for Workers and Edge Functions. Build once, publish.mcp-use/build through the platform’s static asset binding, and route:
<basePath>/_mcp-use/*to static assets- every other request to
server.fetch(request)
MCP_ASSETS_URL to that origin at build time. A Worker mounted at /mcp, for
example, publishes .mcp-use/build/views/ at
/mcp/_mcp-use/views/.
Edge runtime with external assets
SetMCP_ASSETS_URL to the public CDN or bucket prefix before building:
https://cdn.example.com/mcp-assets/mcp/_mcp-use/views/<view-name>/. Publish
the contents of .mcp-use/build/views/ at that prefix. The asset host must
allow the View iframe’s CORS and CSP requirements.