Answer: To protect API keys and tokens when configuring MCP servers in Kiro, never commit configuration files with sensitive tokens to version control, create tokens with minimal permissions, limit access scope, regularly rotate keys and tokens, and use environment variables instead of hardcoding values. Status: Confirmed Entry: tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens Revision: 2 Digest: sha256:bbfc73b009a3f0aa (changes whenever the content changes) Timeline: Created: 2026-11-13T03:43:27Z Last changed: 2026-11-20T13:30:31Z (Version control rule: — → Never commit configuration files with sensitive tokens to version control) Last verified: 2026-11-20T13:30:31Z Next check: 2026-11-21T13:30:31Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Version control rule | Never commit configuration files with sensitive tokens to version control | [1] | 2026-11-20 Minimal permissions | Create tokens with minimal permissions necessary for the MCP server to function | [1] | 2026-11-20 GitHub token example | use fine-grained personal access tokens for GitHub instead of classic tokens | [1] | 2026-11-20 Access scope | Limit access scope to only the repositories or resources needed | [1] | 2026-11-20 Rotation | Regularly rotate API keys and tokens used in configurations | [1] | 2026-11-20 Environment variables | Use environment variables when possible instead of hardcoding values | [1] | 2026-11-20 Sources: [1] Amazon Web Services. "Best practices - MCP - Features - Docs - Kiro". https://kiro.dev/docs/mcp/security/ Role: primary. Accessed: 2026-11-20T13:30:31Z Quote: "Never commit configuration files with sensitive tokens to version control" (Supports: Version control rule) Quote: "Create tokens with minimal permissions necessary for the MCP server to function" (Supports: Minimal permissions) Quote: "use fine-grained personal access tokens for GitHub instead of classic tokens" (Supports: GitHub token example) Quote: "Limit access scope to only the repositories or resources needed" (Supports: Access scope) Quote: "Regularly rotate API keys and tokens used in configurations" (Supports: Rotation) Quote: "Use environment variables when possible instead of hardcoding values" (Supports: Environment variables) Published: 2026-11-20T07:39:25Z Snapshot SHA-256: d4b30fc046d7791e35e13611dcd8e357218fdb5d530e144fdb7ded44b3acaa6f (captured 2026-11-20T13:30:33Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T13:30:31Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:30:31Z Last attempt: 2026-11-20T13:30:31Z Notes and limitations: Extracted automatically from a single official source (section "Protecting API keys and tokens"). Related: https://latestn.com/tool/kiro/permissions-and-security/protect-secrets-kiroignore How do I use .kiroignore to protect API keys and secrets from Kiro? https://latestn.com/tool/kiro/permissions-and-security/protected-paths How do I set up protected paths in Kiro and what match types are supported? https://latestn.com/tool/kiro/permissions-and-security/remote-extensions-security What security risks do remote extensions pose in Kiro and how should I handle them? https://latestn.com/tool/kiro/permissions-and-security/plan-mode-read-only-access What does read-only access mean in Kiro Plan mode? https://latestn.com/tool/kiro/permissions-and-security/policy-presets What permission policy presets does Kiro offer and how do I choose one for a session? https://latestn.com/tool/kiro/permissions-and-security/power-oauth-authorization Which Powers require OAuth authorization in Kiro, and how do I authorize or disconnect one? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T13:30:31Z | changed | Version control rule: — → Never commit configuration files with sensitive tokens to version control | [1] 2026-11-20T13:30:31Z | changed | Version control warning: Never commit configuration files with sensitive tokens to version control → — | [1] 2026-11-13T03:43:27Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens POST: https://latestn.com/dispute/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I protect API keys and tokens when configuring MCP servers in Kiro? Revision 2, last verified 2026-11-20T13:30:31Z. https://latestn.com/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens (accessed 2026-11-21T10:05:10Z). @misc{LatestN_tool_kiro_permissions_and_security_protect_mcp_api_keys_tokens_r2, title = {How do I protect API keys and tokens when configuring MCP servers in Kiro?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens}}, note = {Revision 2; digest sha256:bbfc73b009a3f0aa; last verified 2026-11-20T13:30:31Z; accessed 2026-11-21T10:05:10Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/kiro/permissions-and-security/protect-mcp-api-keys-tokens