Deploying a Private MCP Server on the Internal Network
Quick answer: Keep a private MCP server inside the same network boundary as the internal systems it calls, and treat reachability as the caller's problem, not the server's. A machine on the office network or VPN can route to a private address; a hosted agent running on the public internet cannot, because 10.x, 172.16.x, and 192.168.x addresses do not route outside the local network. Deploy the server internally, lock it down with TLS and a per-agent key, and bridge external callers through a controlled gateway rather than exposing a raw port.
Why the server belongs on the internal network
Most MCP servers that belong here reach systems that were never public: an internal API, database, or operational tool. Keeping the server in that boundary lets it reach those backends over local routes without punching a public hole in a system built to stay private. It becomes another internal service under the same firewall, logging, and patching rather than a separately exposed appliance.
Reachability is a property of the caller
Where the calling agent runs decides your design. A private address only has meaning inside the network that owns it, so the same URL works from one caller and times out from another. RFC 1918 sets aside 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16; public routers drop packets to those ranges.
| Caller location | Reaches a private IP directly | What it needs |
|---|---|---|
| Developer machine on the office network | Yes | Internal DNS name or IP plus agent key |
| Laptop on a VPN | Yes, while the tunnel is up | VPN client and internal routing |
| Hosted agent running in the cloud | No | Reverse tunnel or controlled gateway |
| CI runner inside the private network | Yes | Internal route and a scoped key |
| CI runner on public shared runners | No | Authenticated gateway, never raw port mapping |
The server did not change between rows; the caller's network position did. A test passing on your laptop does not prove a hosted agent can connect, because that agent sees its own namespace, where your internal address points at nothing or at a different machine.
Letting an external agent reach an internal server
When an agent outside the network must call a private server, you have three honest options, each with a cost. A VPN client on the caller joins the network and routes internal addresses, but gives that environment a foothold for as long as it stays connected. A reverse tunnel from the inside out exposes a single endpoint without opening inbound ports, and you still own the process that opens it. A controlled gateway in a screened subnet authenticates the caller, applies rate limits, and relays requests inward, which is the most work but keeps the internal server unroutable from outside.
Do not map the internal port straight to a public IP with NAT. That forwards unauthenticated traffic past the boundary and skips the logging and key checks a gateway adds, and the private address offers no protection once the port is internet-reachable.
The internal network is a boundary, not a trust zone
A server bound only to 127.0.0.1 answers no other machine; binding to 0.0.0.0 makes it reachable on every interface, so add host firewall rules that accept only the source ranges you expect. Use TLS with an internal certificate authority rather than plain HTTP, since traffic on the same segment can still be read or altered, and give each agent its own key so one leak is revoked without rotating everyone's.
Powerduck Cloud keeps the hosted MCP endpoint off until you expose it and issues a separate MCP access key for agents, the same default-deny pattern a private deployment should follow: nothing is reachable until you deliberately turn it on, and each caller gets a key you can revoke on its own. The comparison hub places this alongside the wider managed-versus-self-hosted choices.
Frequently asked questions
Can a cloud-hosted AI agent call my 192.168.x.x MCP server directly? No. That address is not routable from the agent's public environment, so the call times out or reaches a local address inside that environment. Route it through a VPN, reverse tunnel, or authenticated gateway instead.
Is it safe to skip TLS because the server is internal? No. Internal segments still carry traffic that can be intercepted or modified, and a compromised host on the network can make calls of its own. Use an internal CA for TLS and a separate key per agent.
How do internal agents find the server without public DNS? Publish the host on internal DNS or a service registry and give agents that name, or configure the address directly. Keep it stable, because a changed internal IP breaks every saved caller the way a public URL change would.
The bottom line
A private MCP deployment is mostly a network design task. Work out from the caller's position: internal callers route directly, external callers cross a VPN, tunnel, or gateway, and no internal port gets a straight public mapping. Treat the network as a boundary to defend rather than a trust zone, and default to off with a distinct key per agent. The failure to avoid is a public hole reaching an internal system you never meant to expose.