Join our Newsletter — 33% off our NHI Course
Home› FAQ› Governance, Ownership & Risk› Should organisations build their own OAuth server for…
Governance, Ownership & Risk

Should organisations build their own OAuth server for MCP or use a hosted flow?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 8, 2026 Domain: Governance, Ownership & Risk

The right choice depends on governance maturity, not preference. Teams with strong OAuth expertise and full lifecycle ownership can justify building and maintaining their own flow. Teams that want to reduce operational burden may prefer a hosted or bridged model, but they still need clear control over scopes, validation, and offboarding.

Why the build-versus-hosted decision is really an OAuth governance question

The MCP choice is not mainly about infrastructure preference. It is about who owns the OAuth boundary, who can validate scopes and audiences, and who can prove that tokens, clients, and offboarding are controlled end to end. If your team cannot operate that lifecycle well, a hosted or bridged flow usually reduces risk and burden.

Building your own server makes sense when the organisation already has mature OAuth patterns, clear ownership of client registration, and the ability to enforce token handling rules consistently. In that case, the main advantage is control: you can align the flow to your trust model, internal tooling, and exception process without depending on a third party's operational choices.

A hosted flow shifts more of the operational load outward, but it does not remove your responsibility. You still need to decide how clients are registered, how scopes are constrained, how tokens are validated, and what happens when an integration is removed or a connector is no longer trusted. The governance question is therefore whether you can sustain those controls reliably, not whether a hosted option is technically easier.

What changes when you run the flow yourself

When you build and maintain the OAuth server yourself, you take on the full control plane for the MCP integration. That includes client onboarding, redirect URI discipline, grant selection, token lifetime policy, revocation handling, and the ability to review how each client is authorised to call each resource. That extra responsibility can be valuable when the integration touches sensitive systems or when you need unusually strict segmentation.

This option also gives you better room to apply a least-privilege model that matches the actual MCP use case. For example, you can keep scopes narrow, tie them to specific resources, and make token validation reflect your own audience and trust rules rather than inheriting a generic hosted interpretation. The trade-off is that you now own the security mistakes that come from weak OAuth implementation, inconsistent validation, or incomplete client lifecycle management.

That ownership should be viewed as an operating commitment, not a one-time engineering task. OAuth servers require patching, testing, monitoring, incident response, and periodic review of how clients authenticate and how long tokens remain useful. If the team cannot evidence those controls, “build it ourselves” becomes an exposure rather than a capability.

When hosted flow is the safer default, and where it still needs guardrails

A hosted flow is usually the better default when the organisation wants faster deployment, less bespoke maintenance, or a smaller operational surface area. It can also be a better fit when the internal team is strong at consuming OAuth but weak at running an OAuth platform. In practice, many failures come from overestimating how easy it is to safely maintain a bespoke authorization service.

Even so, hosted does not mean hands-off. You still need to check whether the provider supports the scope model you need, whether the token audience is properly constrained, and whether offboarding actually removes access in a timely way. A hosted service that makes it easy to connect tools but hard to prove revocation or review entitlements is only moving the problem, not solving it.

For MCP specifically, the highest-value guardrail is not brand choice, it is control clarity. The architecture should make it obvious which party is the authorization server, where tokens are minted, how clients are verified, and what happens when a user or application should no longer be able to act through that path. The MCP authorization specification is useful here because it frames the server as a proper OAuth 2.1 resource server rather than a token relay.

Risk and Threat Considerations

The main risk is not simply “using OAuth”, it is exposing a control path that is easy to get almost right and still materially unsafe. Weak scope design, token passthrough, poor audience validation, and slow offboarding can turn MCP into a privilege amplifier, especially when a single client can reach multiple tools or back-end systems.

Failure mechanism: Attackers or misconfigured integrations abuse broad scopes, replayable tokens, or weak client separation to extend access beyond the intended MCP workflow. In hosted models, the risk often becomes provider trust and lifecycle blindness; in self-built models, it becomes implementation error and patching debt.

Impact: The likely result is overbroad access, token theft reuse, or persistence after removal, which can lead to data exposure, unauthorized actions, and difficult-to-audit downstream activity. OAuth 2.0, OAuth 2.0 security best current practice, and sender-constrained patterns such as DPoP or mTLS-bound tokens matter because they reduce the chance that a stolen token remains broadly reusable.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, OWASP API Security Top 10 and OWASP Non-Human Identity Top 10 address the attack surface, NIST SP 800-53 Rev 5 sets the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseMCP auth decisions govern agent/tool privilege boundaries.
Recommendation — Constrain agent tool access and token scope to the minimum needed.
OWASP API Security Top 10API2 — Broken AuthenticationMCP servers rely on OAuth authentication and token validation.
Recommendation — Harden client authentication and reject weak or replayable tokens.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationOAuth-backed MCP flows are non-human authentication paths.
NHI-05 — Overprivileged NHIHosted or custom MCP flows can overgrant tool and resource access.
NHI-07 — Long-Lived SecretsOAuth client secrets and tokens can persist too long in MCP setups.
Recommendation — Use strong, sender-constrained authentication for NHI access. Limit scopes and permissions to the smallest workable set. Shorten credential lifetime and rotate secrets aggressively.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementOAuth tokens, client secrets, and revocation are authenticator lifecycle issues.
AC-6 — Least PrivilegeMCP scopes and audiences should enforce minimal access to tools and data.
IA-9 — Service Identification and AuthenticationMCP clients and servers authenticate machine-to-machine through OAuth.
Recommendation — Manage issuance, rotation, storage, and revocation of OAuth credentials. Assign only the permissions required for each MCP client and token. Authenticate service clients with strong machine identity and validation.
ISO/IEC 27001:2022A.5.15 — Access controlThe build-versus-hosted choice depends on enforcing controlled access paths.
A.8.5 — Secure authenticationOAuth flows require secure client and token authentication decisions.
Recommendation — Define and enforce access rules for each MCP integration path. Implement authentication mechanisms that resist token theft and misuse.

Practitioner Guidance

What to verify: Before choosing build or hosted, verify who owns client registration, token validation, revocation, and offboarding. If the answer is spread across teams without a clear control owner, hosted is usually the lower-risk choice because bespoke ownership will otherwise drift.

Decision rule: Build only if you can name the team that will operate the authorization server, the review cadence for scopes and client entitlements, and the evidence you will retain for token policy changes. If those cannot be answered crisply, use the hosted path and constrain the integration tightly.

Practitioner takeaway: The real test is whether the chosen model can enforce and prove least privilege across the full OAuth lifecycle, because MCP security fails first at governance gaps, not at protocol syntax.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 8, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org