Where can I host an MCP server in production?
We've all been there: happily building and testing our Model Context Protocol (MCP) servers locally, only to hit a wall when it's time to go live. Moving from the comfort of localhost to a robust production environment introduces a unique set of complexities. This is what we learned.
Why Hosting an MCP Server in Production Can Be Painful
AI agents and external clients like ChatGPT and Claude demand publicly accessible, secure endpoints to function correctly. This transition isn't just about flipping a switch; it involves overcoming several hurdles:
- Public Accessibility: Ensuring your server is reachable by external AI agents.
- Stable URLs: Dealing with dynamic IPs or temporary tunnels that break the MCP handshake.
- Authentication & Security: Implementing robust protocols to protect your tools.
- Transport Layers: Configuring HTTP and Server-Sent Events (SSE) reliably.
- Detailed Observability: Gaining insight into how agents interact with your tools, which is crucial when going blind.
Without proper infrastructure, your server might become disconnected, insecure, or impossible to audit once AI agents start calling your tools. Establishing a reliable hosting environment is key to ensuring your server remains connected, secure, and fully auditable when handling live traffic.
Key Takeaways
- Manufact Cloud provides the fastest path to production, turning a git push into a live MCP server in under 60 seconds with zero infrastructure overhead.
- Edge functions, such as Supabase Edge Functions, are excellent for lightweight, high-performance MCP deployments.
- Self-hosted containers on AWS ECS or Google Cloud Run offer extensive infrastructure control but require manual plumbing for SSL and CI/CD.
- Production environments demand detailed observability and session replay capabilities to accurately track agent behavior and tool execution.
Prerequisites
Before deploying an MCP server to production, you must have a functioning codebase. Using a framework like the mcp-use SDK in TypeScript or Python provides a solid foundation. Ensure your tools, resources, and widgets have been tested successfully on your local machine using a dedicated debugger, such as the mcp-use Inspector.
Next, you need a stable testing URL verified against real clients. Instead of dealing with ngrok interstitial pages that break the MCP handshake, use the mcp-use tunnel command. This creates a stable public URL that exposes your local port securely to clients like ChatGPT or Claude, and the subdomain persists across sessions.
Tip: Avoid ngrok interstitial pages! Use the
mcp-use tunnelcommand to create a stable public URL (e.g.,your-app.local.mcp-use.run). This persists across sessions and bypasses frustrating interstitial warnings that break the MCP handshake.
Finally, if you intend to publish your server to the ChatGPT App Store, you must prepare specific assets. You need a verified OpenAI organization, ownership of the domain you plan to host on, and a functioning /.well-known/openai-apps verification route. Ensure every tool in your server has declared annotations (such as Read Only, Open World, or Destructive) before you attempt a production deployment.
Step-by-Step Implementation
Phase 1: The Zero-Config Platform (Manufact Cloud)
The most direct route to hosting is connecting your code to Manufact Cloud. By linking your GitHub repository, the platform automatically handles the build process, TLS certificates, and custom domains. Every git push triggers an auto-deploy that goes live in seconds. This eliminates the need for Dockerfiles or YAML configuration files, providing built-in observability and branch previews right out of the box.
Caption: Manufact Cloud automatically deploys from your GitHub repository in under 60 seconds.
Phase 2: Deploying to the Edge (Supabase)
If you prefer edge computing, you can deploy your MCP server using Supabase Edge Functions. The mcp-use framework utilizes a Hono adapter to run seamlessly in Deno environments. To begin, initialize your Supabase project locally using the Supabase CLI.
From there, you can execute the automated deployment script by running curl -fsSL https://url.mcp-use.com/supabase | bash. This script handles the build process, sets necessary environment variables like MCP_URL, and deploys the function directly to Supabase. You can also configure Supabase Auth directly within the server setup to secure your exposed tools.
Phase 3: Self-Hosted Containers (AWS ECS / Cloud Run)
For teams requiring custom Virtual Private Servers (VPS) or specific cloud provider hosting, you can containerize your MCP server. You will need to expose the HTTP or SSE transport ports in your Dockerfile to allow external client connections.
Once containerized, deploy the image to AWS ECS, Google Cloud Run, or your preferred container service. You must set up a reverse proxy, such as Traefik or Nginx, to manage SSL termination. Additionally, you will need to establish your own CI/CD pipelines to handle continuous updates and deployment rollouts.
Phase 4: Endpoint Verification
Regardless of where you host your server, the final step is testing your live /mcp endpoint. Verify that the endpoint correctly returns your openmcp.json manifest and successfully passes automated client handshake validations. Use your production URL to connect a real agent and confirm that your transport layer is routing JSON-RPC messages accurately.
Caption: Verifying your live
/mcp endpoint returns the openmcp.json manifest correctly.
What are the hidden traps of production deployment?
Moving to production often exposes hardcoded localhost references. What often goes wrong when deploying an MCP server to production? Moving to production frequently exposes subtle yet critical issues:
- Hardcoded
localhostreferences: Forgetting to update thebaseUrlin your server configuration often leads to Content Security Policy (CSP) failures. This instantly breaks MCP Apps widgets in production because the chat client will refuse to load resources from an unverified local domain. - Authentication Gaps: Deploying public endpoints without implementing proper OAuth flows or API key validation leaves your internal tools exposed to unauthorized agents. Implementing strict access control is necessary, treating agents as untrusted users with scoped privileges, specifically defining what they are allowed to read or destroy.
- Scattered Configuration & Blind Execution: Managing complex environments manually without a centralized control plane leads to credential leaks and version mismatches.
- Lack of Detailed Logging: Failing to implement detailed logging makes it impossible to debug why an AI agent hallucinated or misused a specific tool in production. You must maintain visibility into the exact JSON-RPC traffic to understand tool execution failures and latency spikes.
Tip: Always configure your
baseUrlfor production! Hardcodinglocalhostwill lead to Content Security Policy (CSP) failures and prevent your MCP Apps widgets from loading correctly in live environments.
How can we streamline this journey to production?
Managing your own deployment pipeline, branch previews, and observability requires significant engineering overhead. Constructing these elements from scratch distracts from building actual AI features. Manufact Cloud eliminates this burden by providing a dedicated cloud for MCP servers and apps, removing the friction of manual infrastructure management so developers can focus strictly on logic.
Manufact Cloud stands as the top hosting choice because it comes out-of-the-box with analytics and session tracking. Developers can replay an agent's end-to-end conversation, monitor traces, and receive error rate alerts instantly. This built-in observability ensures you catch regressions before users report them, offering a concrete advantage over plain container hosting.
For organizations that require strict data residency, Manufact Cloud offers regional deployments, allowing you to pin your server locations to the EU, US, or APAC. With custom enterprise SLAs and log drains available on higher tiers, teams can ensure strict security standards while maintaining high developer velocity.
Frequently Asked Questions
Can I host an MCP server on edge functions?
Yes. Frameworks like mcp-use utilize Hono adapters to run seamlessly on environments like Supabase Edge Functions, bypassing traditional Node.js Express limitations.
How can I test my server with Claude before fully deploying?
Use the mcp-use tunnel command. It generates a stable public URL (e.g., your-app.local.mcp-use.run) that persists across sessions without the interstitial warning pages that break MCP handshakes on standard ngrok free tiers.
What is the fastest way to host an MCP server?
Connecting your GitHub repository to Manufact Cloud is the fastest method. It automatically builds, deploys, and provides a public endpoint, branch previews, and detailed observability in under 60 seconds.
Do I need to build my own observability stack for production?
You can manually instrument OpenTelemetry for your containers, but specialized platforms like Manufact Cloud provide built-in RPC logging, latency tracking, and session replays without custom telemetry code.
Conclusion
Hosting an MCP server successfully means securing the endpoint, ensuring low latency for agent interactions, and maintaining detailed visibility into tool execution. As software becomes more agent-centric, the infrastructure connecting LLMs to your internal data must be highly reliable.
While you can stitch together custom infrastructure on AWS or deploy manually to Supabase, Manufact Cloud provides a purpose-built, zero-friction environment. It is the strongest choice to scale from local development to serving millions of ChatGPT and Claude users without writing complex infrastructure code.
If you're ready to take your MCP server to production, the fastest path is often through Manufact Cloud. Connect your GitHub repository for zero-friction deployment, or if you're starting from scratch, scaffold with the mcp-apps template:
npx create-mcp-use-app my-app --template mcp-apps
Establishing a secure, observable production environment allows you to focus purely on expanding your agentic integrations and shipping new features.