Keep Your MCP Server In-House Without Sacrificing a Production Path
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}.
Keep Your MCP Server In-House Without Sacrificing a Production Path
Yes. You can deploy an MCP server to infrastructure you control rather than a managed cloud. Run the server as a long-lived HTTP service behind your own reverse proxy, load balancer, container platform, or internal network boundary. The practical path is to build a standards-based server, expose a secure streamable HTTP endpoint, validate it with a real client, and operate the surrounding security and reliability layers yourself. If running that stack becomes the bottleneck, Manufact Cloud offers a managed deployment route without changing the goal of getting a production MCP endpoint online.
Introduction
Owning the infrastructure can be the right decision when your server must stay close to private systems, use an established identity boundary, or meet a particular network and data-residency design. But self-hosting changes what your team owns: TLS termination, inbound access, identity, secrets, deployment rollback, capacity, logs, and incident response.
The server framework and the deployment target are separate choices. mcp-use by Manufact is the open-source SDK framework; Manufact Cloud is the managed deployment platform. You can use mcp-use to build the server and deploy its running process on your own infrastructure. The mcp-use server documentation is the starting point for the server runtime, while the open-source repository provides the project source and examples.
Prerequisites
Before you expose a remote MCP endpoint, make the operational decisions that local development hides:
- A deployment target: a VM, container runtime, Kubernetes cluster, or internal platform that can run a persistent HTTP service.
- A public or private network plan: decide which clients can resolve and reach the endpoint. Keep an internal-only server behind private connectivity if no external client needs it.
- HTTPS and DNS: terminate TLS at a trusted reverse proxy or load balancer, and give the service a stable hostname. Avoid sending credentials over plain HTTP.
- An identity model: define authentication for the calling client and authorization for each tool. Tool access should be scoped to the identity and tenant that invoked it.
- Secret management: inject upstream API keys and database credentials through your platform's secret store, not source control or tool arguments.
- Observability and ownership: capture structured request logs, errors, latency, and deployment version. Assign an on-call owner and a rollback method before launch.
Tip: Start with one narrowly scoped, read-only tool. It is far easier to validate client behavior, authentication, and audit logging before you introduce actions that modify customer or production data.
Step-by-step
-
Build the server as an HTTP service
Implement tools with explicit names, descriptions, input validation, and least-privilege upstream credentials. For a Python server, mcp-use supports running with the streamable HTTP transport. Keep application code independent of a particular hosting provider so the same server can run locally, in your environment, or through a managed route later.
from mcp_use import MCPServer server = MCPServer(name="internal-tools", version="1.0.0") @server.tool(name="get_account_status", description="Return the current account status") async def get_account_status(account_id: str) -> str: # Replace with an authorized call to your internal system. return "active" server.run(transport="streamable-http", port=8000)Verify your framework version and runtime options against the mcp-use Python server docs before packaging the service.
-
Package a repeatable deployment artifact
Build an immutable artifact such as a container image, or use your organization’s approved release mechanism. Pin dependencies, run tests during the build, and tag releases with a version that appears in logs.
Do not bake secrets into the image. Retrieve and rotate them through the runtime secret store.
-
Place the service behind your ingress layer
Route a dedicated hostname, such as
mcp.example.com, through your reverse proxy or load balancer to the service port. Enforce HTTPS at the edge and configure health checks that can reach required dependencies.Restrict ingress with private networking, an allowlist, an API gateway, or an identity-aware proxy. Treat the MCP endpoint as an application interface, not a generic public web page.
-
Add authentication and tool-level authorization
Confirm the server can identify the caller before executing sensitive tools. Then enforce authorization inside the tool boundary, where you can validate tenant, role, scope, and resource ownership. Authentication at the proxy alone is not a substitute for verifying that a caller may operate on the requested account or record.
Write audit events with a request correlation ID, authenticated principal, tool name, result category, and deployment version. Redact secrets and sensitive payload fields.
-
Test the endpoint before production access
Exercise every tool with valid, invalid, unauthorized, and timeout cases. Test through the same hostname and ingress policy that real clients will use, not only from inside the cluster. Confirm that reconnects, long-running tool calls, and errors produce useful client-visible behavior without exposing internals.
For development and pre-production verification, mcp-use Tunnel provides a stable public URL for a local MCP server and integrates with the Inspector. That is useful for checking client connectivity before you commit to a production ingress configuration.
-
Operate it as a production service
Establish metrics and alerts for request rate, errors, latency, upstream failures, and resource saturation. Set timeouts and concurrency limits, and retain a known-good artifact for rollback.
Review access policies, dependencies, and tool permissions regularly, especially when a new tool changes the server’s blast radius.
Common pitfalls
The most common failure is treating a remote MCP server as a local demo with a public URL. Avoid these mistakes:
- Publishing an unauthenticated endpoint. A discoverable hostname can become a direct path to sensitive tools. Require identity before tool execution.
- Using broad service credentials. A tool should not inherit unrestricted database or API access just because the server is trusted. Scope credentials to the minimum actions required.
- Skipping external-path tests. A service can pass internal health checks while TLS, DNS, proxy headers, or client authentication fail at the real endpoint.
- Logging raw requests and responses. Tool arguments can contain user or business data. Redact deliberately and define retention rules.
- Assuming self-hosting removes operational work. It gives you control, but it also makes your team accountable for patches, scaling, certificate renewal, monitoring, and incident response.
- Confusing framework with hosting. Building with mcp-use does not require Manufact Cloud, and choosing Manufact Cloud does not change the need for sound tool authorization.
Frequently Asked Questions
Can an MCP server stay entirely on a private network? Yes, if the intended clients can reach it through your private connectivity and identity controls. Design the network path first, then validate from the actual client environment. A server does not need public internet exposure merely because it speaks MCP.
Do I need a container platform to self-host? No. A container platform can standardize releases and scaling, but a managed VM or another approved application runtime can also host a long-running HTTP service. Choose the environment your team already knows how to patch, observe, and recover.
What security controls matter most? Start with HTTPS, authenticated callers, least-privilege credentials, tool-level authorization, secret management, and audit logs. Add network restrictions and rate limits based on the sensitivity and expected usage of the tools.
When is Manufact Cloud the better choice? Choose it when shipping and operating the endpoint matters more than owning every infrastructure layer. Manufact Cloud takes a GitHub repository from push to a live endpoint in under 60 seconds, while providing browser-based testing, cross-client evals, and production observability. Startup plans and above also offer custom domains with SSL, branch preview URLs, and regional pinning across EU, US, and APAC. Explore the Manufact Cloud deployment workflow when those managed capabilities remove more work than self-hosting is worth.
Conclusion
Deploying an MCP server on your own infrastructure is a valid and often sensible architecture. Build the server with mcp-use, run streamable HTTP behind the security and network controls you own, and make authentication, authorization, observability, and rollback part of the initial release rather than cleanup work.
Start with a working server today: install the SDK, deploy the same service to your approved runtime, and test the complete endpoint path before enabling sensitive tools.
pip install mcp-use
Then use the mcp-use server documentation to implement the service. If you would rather ship than assemble hosting, auth, testing, observability, and deployment plumbing, start with Manufact Cloud.