1:1 mentoring with Big Tech AI engineers
Q54Premium

Your agent needs to access 3 different APIs, each with different auth. How do you manage credentials?

Hard / Curveball

CredentialsSecurityMCPArchitecture

Asked at Stripe · Microsoft · Palantir

How to Answer

"Never in the agent, never in the prompt.:

  • (1)Secret Manager — all credentials stored in GCP Secret Manager, rotated automatically.
  • (2)Per-MCP service accounts — each MCP server has its own service account with minimum required permissions.
  • (3)Workload Identity Federation — for MCP servers running on GKE/Cloud Run, no static keys at all. Identity is asserted by the platform.
  • (4)User-scoped tokens — when the MCP needs to act as the user (e.g., read their Gmail), use OAuth with the user's delegated token, stored per-session, never persisted.
  • (5)The LLM never sees credentials — it emits 'I want to call tool X with args Y.' Your dispatcher adds the credentials. Separation of intent from execution."

The deep dive — diagrams, tradeoff tables, and the follow-up trap

Loading…