Vault retrieval is the better default because it gives identity and policy a chance to constrain access at the moment of use. Mounted secrets are acceptable only in narrow cases where the workload boundary is tightly controlled and the operational reason is stronger than the added exposure.
Why MCP Workloads Usually Benefit from Vault Retrieval
MCP workloads often sit at the boundary between orchestration, tool access, and runtime authorization, so the safest default is to fetch secrets when they are needed rather than place them on disk or mount them for the full container lifetime. That choice lets identity, policy, and token scope be evaluated closer to use, which reduces blast radius when a workload, tool, or agent is overreaching.
Mounted secrets can still be practical, but they work best when the workload is tightly isolated, the secret has a short and well-understood lifetime, and the operational model is simple enough that runtime retrieval would add more failure modes than it removes.
What Changes When the Secret Is Retrieved at Runtime
Vault retrieval changes more than storage location. It changes when access is decided, what evidence can be logged, and how quickly you can revoke or rotate the underlying credential. In an MCP setting, those differences matter because the workload may be acting on behalf of a user, calling tools, or chaining downstream services where a broad mounted secret can become a standing capability.
With retrieval, the workload can request a secret only after policy checks, workload identity checks, and any needed audience or environment constraints are satisfied. That makes the secret closer to an authorization outcome than a static artifact. If the same credential is mounted into the runtime, you often lose that opportunity to distinguish between a legitimate call path and an idle container that merely happens to hold the secret.
Runtime retrieval is also easier to align with short-lived credentials, scoped access, and rotation workflows. For teams using patterns such as secretless execution, just-in-time issuance, or dynamic credentials, the secret is not treated as an asset to be carried indefinitely. It becomes a controlled dependency that can expire, be reissued, and be traced back to a specific request or workload state.
When Mounted Secrets Are Still Acceptable
Mounted secrets are not automatically wrong. They can be acceptable when the workload boundary is narrow, the platform is highly controlled, and the secret is intentionally limited in scope and lifetime. That tends to be true for small, stable deployments with few dependencies, especially when the operational cost of a live secret backend would be disproportionate to the actual risk.
The key test is whether mounting the secret changes the security story in a material way. If the secret is long-lived, broadly reused, or able to reach production systems without additional checks, mounting it usually creates avoidable exposure. If the workload is isolated, the mount is ephemeral, and rotation is still enforced elsewhere, the residual risk may be acceptable for a specific use case.
Teams should also treat mounted secrets as a design exception, not the default. The moment the same secret starts serving multiple tools, environments, or agents, the simplicity argument weakens and the chance of accidental reuse, copying, or overprivilege rises.
Risk and Threat Considerations
Mounted secrets increase exposure because compromise of the runtime can immediately expose the credential for as long as it remains present. In MCP workloads, that matters because tool access and downstream service calls can turn one leaked secret into broad operational reach.
Failure mechanism: A credential mounted into the process environment, filesystem, or container volume is easier to steal, reuse, or accidentally propagate than a secret obtained only when the workload proves need and policy at runtime.
Impact: A single compromised workload, debug session, or copied image can expose the secret beyond its intended scope, making revocation slower and blast radius larger than with retrieval-based access.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Mounted secrets and runtime exposure directly affect secret leakage risk in MCP workloads. |
| NHI-07 — Long-Lived Secrets | The question contrasts static mounted secrets with more controllable runtime-issued credentials. | |
| NHI-05 — Overprivileged NHI | MCP workloads can overreach when a mounted secret grants broad downstream access. | |
| Recommendation — Prefer runtime retrieval and limit secret residency to reduce leakage exposure. Replace long-lived mounted secrets with short-lived credentials wherever possible. Scope workload credentials narrowly and remove unused privileges before deployment. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | MCP workloads may act with delegated authority, making secret handling a privilege issue. |
| Recommendation — Bind tool access to workload identity and issue credentials only at the moment of use. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Secret retrieval and mounted secret handling both depend on credential lifecycle control. |
| IA-9 — Service Identification and Authentication | MCP workloads authenticate as services or workloads, not human users. | |
| AC-6 — Least Privilege | The answer depends on constraining what the workload can reach with the secret. | |
| Recommendation — Enforce rotation, expiry, and revocation for credentials used by MCP workloads. Use workload authentication to gate secret retrieval and downstream service access. Limit each MCP workload to the minimum secret scope required for its tool path. | ||
| NIST Zero Trust (SP 800-207) | Zero Trust Architecture | Runtime retrieval aligns with verify-then-access behavior for workloads. |
| Recommendation — Evaluate access at the point of use instead of granting standing secret residency. | ||
| NIST SP 800-63 | Digital Identity Guidelines | The decision depends on the strength of proof before a workload or client is trusted with access. |
| Recommendation — Require strong proofing and authenticators before issuing credentials to the workload. | ||
Practitioner Guidance
What to prioritize: Default to vault retrieval for any MCP workload that can reach production data, invoke sensitive tools, or chain into other services. Treat mounted secrets as an exception that needs a clear operational reason, a narrow boundary, and a documented expiry or rotation plan.
What to verify: Confirm that the workload can obtain the secret only when it has the right identity, that the credential is scoped to the exact tool or service path, and that revocation will actually remove future access rather than just prevent new mounts.
Common mistake: Teams often choose mounted secrets because they are simpler to wire in early development, then keep them after the workload grows in privilege and reach. That is usually the point where the original convenience becomes the main exposure.
Practitioner takeaway: If the MCP workload can do meaningful harm with the secret, make access conditional at request time; if it cannot, mounting may be tolerable, but only as a consciously managed exception.
Related resources from NHI Mgmt Group
- What happens when DevOps teams use a shared secrets vault for autoscaling workloads?
- How should teams reduce the risk from exposed NHI secrets?
- How should security teams choose a secrets vault for application workloads?
- What breaks when teams use shared vault secrets for production access instead of identity-based access?
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org