Once a team decides it needs an MCP gateway — one URL in front of every connected server, instead of a separate config block in every AI client — the next question isn’t which features. It’s who runs it. Self-host it on your own infrastructure, or sign up for a hosted one. Both are real options today, and the tradeoff is less about cost than about which jobs you’re willing to take on permanently.
What a gateway actually has to keep running
A gateway isn’t a static reverse proxy you stand up once and forget. Underneath the one URL, something has to stay current every day:
- An OAuth client registered with each vendor you connect, pointed at a redirect URL your gateway owns — and some vendors only admit allow-listed clients rather than open registration, a wrinkle covered in the unauthorized client error post.
- A store of encrypted tokens for every server, every user, that has to survive a restart, a migration, and a key rotation without anyone ever seeing a token in plaintext in a log — the failure mode we wrote about in MCP secret exposure.
- A scanning pipeline that checks tool descriptions for injected instructions before a server goes live, and keeps catching new phrasing as tool poisoning techniques evolve.
- Uptime. If the gateway is down, every client pointed at it loses every tool at once, not just one server’s worth.
- A log of every call, retained and readable, for the day someone asks what the AI actually did.
Self-hosting and using a hosted gateway both have to solve every item on that list. The question is just whose team does the solving.
What self-hosting buys you
Tokens never leave infrastructure you control, which matters if a compliance requirement is written as “customer data and credentials stay inside our own VPC,” not just “a competent vendor handles it.” You can read the actual scanning logic running against your servers instead of trusting a vendor’s description of it. And you have no dependency on another company’s uptime, pricing changes, or whether it still exists in two years.
What self-hosting costs you
Every item in the list above becomes a standing responsibility, not a one-time setup task. You register and maintain a separate OAuth client with every vendor you add, including the retries and support tickets that come with an allow-listed one. You own patching the gateway itself when the MCP spec changes underneath it — the stateless core and hardened OAuth in the 2026-07-28 update is the kind of revision that touches real deployed code, not just documentation. You own backing up and rotating whatever encrypts the token store. And you own keeping the scanner’s detection current, which in practice means someone on your team is now doing a slice of a security vendor’s actual job, on top of whatever they were already hired to do.
None of that is unreasonable for a team that already runs comparable infrastructure for other reasons. It’s a real tax for one that doesn’t.
What a hosted gateway buys you
One URL on day one, with someone else keeping the OAuth registrations, the scanner, and the spec compliance current across every customer at once instead of once per self-hosted install. It’s the same buy-versus-build calculus that applies to most security infrastructure: a dedicated vendor amortizes the maintenance across everyone using it, which usually means it gets more attention than a side responsibility bolted onto an internal platform team.
What a hosted gateway costs you
You’re trusting a third party with custody of every token you connect through it. That trust is worth checking, not assuming — our privacy policy checklist and SOC 2 for MCP posts cover what to look for before you hand a vendor that custody. And if you ever want to stop, you’re depending on a clean exit: revoking access should be straightforward on both sides, which is exactly what we walked through in how to revoke an MCP OAuth grant.
A practical way to decide
- If your compliance requirement is specifically about data residency or physical infrastructure location, that leans self-hosted — no amount of vendor documentation substitutes for the data never leaving your own environment.
- If the real requirement is accountability, audit evidence, and a named party you can put in a vendor review, a hosted gateway with a clear SOC 2 report and a readable privacy policy can satisfy that just as well, often faster.
- Count how many servers and teams are actually connecting. A handful of servers for one team rarely justifies standing up and maintaining a second piece of security infrastructure. Dozens of servers across a whole org change that math either way, depending on whether you already have the ops capacity to own it.
- Ask who owns the OAuth client relationship with each vendor today. If that’s already scattered across individual engineers’ personal API keys, centralizing it anywhere — hosted or self-hosted — is the bigger win than which option you pick.
The bottom line
Self-hosting and a hosted gateway solve the exact same list of problems — OAuth per server, token custody, scanning, uptime, logging — and neither one makes that list shorter. What changes is whether your own team takes on maintaining it indefinitely or pays someone else to. Decide based on what your compliance requirement actually says and how much ops capacity you already have, not on which option sounds more secure by default.