模型

Google 推出 Credentials API,让大模型安全访问外部服务

New Credentials API to securely authenticate with external services and MCP servers without the mode...

精选理由

Google 新出的 Credentials API 很实用,能帮大模型安全地访问外部服务,比如 Slack 或其他工具,而且不会把你的密钥直接暴露给模型。

Google 推出 Credentials API,让大模型安全访问外部服务。该 API 支持通过 bearer_token、环境变量或 oauth2 方式注册密钥,密钥不会进入模型上下文。代理仅在允许的 trusted_domains 上替换真实令牌,防止数据泄露。密钥可直接绑定到远程 mcp_server 工具或沙箱环境变量。

原文 · Philipp Schmid

New Credentials API to securely authenticate with external services and MCP servers without the mode...

New Credentials API to securely authenticate with external services and MCP servers without the model ever seeing your secrets: - Register secrets once with `credentials.create()` supporting `bearer_token`, `environment_variable`, or `oauth2` (with auto-refresh and token rotation). - Zero plaintext exposure: Secrets never enter model context, stdout, memory. - The agent only sees a placeholder (e.g., `__GEMINI_CRED_slack-bot-token__`). - Egress proxy swaps real token on the request only for allowlisted `trusted_domains` (any exfiltration attempt to another host gets a `403`). - Bind credentials directly to remote `mcp_server` tools or sandbox env vars. Docs: ai.google.dev/gemini-api/doc… 💬 3 🔄 1 ❤️ 3 👀 454 📊 3 ⚡