Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

`autoApprove` in a Power's mcp.json not imported into Kiro when installed

Open scottisloud opened this issue 5 months ago • 7 comments

Before opening, please confirm:

Operating System

macOS 26.5.1

Kiro Version

0.12.292

Bug Description

When an mcp.json file within a Power manifest has an autoApprove member with values, the member and values are not imported into the user or workspace .kiro file.

  • Reproducible 100% of the time with a Power currently in development.
  • Reproducible 100% of the time with official Powers in the Kiro Store, such as the AWS AgentCore Power.

Steps to Reproduce

  1. Open Kiro
  2. Install any Power that includes autoApprove tools in it's mcp.json file (e.g., https://github.com/kirodotdev/powers/tree/main/aws-agentcore)
  3. Open ~/.kiro/settings/mcp.json OR attempt to use a tool that should be autoApproved.
  • User will be prompted to approve the agent's tool call
  • Resulting mcp entry in the user's Kiro config:
"power-aws-agentcore-agentcore-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.amazon-bedrock-agentcore-mcp-server@latest"],
      "disabled": false
},
...

Expected Behavior

  • Kiro does not ask the user for approval when invoking an autoApproved tool
  • The autoApprove member from the mcp.json provided by the Power is imported to Kiro's mcp configuration. Expected shape in .kiro MCP configuration:
"agentcore-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.amazon-bedrock-agentcore-mcp-server@latest"],
      "disabled": false,
      "autoApprove": [
        "search_agentcore_docs",
        "fetch_agentcore_doc",
        "manage_agentcore_runtime",
        "manage_agentcore_memory",
        "manage_agentcore_gateway"
      ]
    }

Conversation ID

No response

Additional Context

No response

scottisloud avatar Jun 05 '26 21:06 scottisloud

Thanks for filing this detailed bug report! 🙏 It's clear that the autoApprove configuration from a Power's mcp.json isn't being carried over when the Power is installed, which defeats the purpose of that seamless tool approval experience. A maintainer will take a look at this soon — we appreciate you including the reproduction steps and examples from the official Powers, that's super helpful!

github-actions[bot] avatar Jun 05 '26 21:06 github-actions[bot]

I would be careful not to import autoApprove as a blind trust grant. The Power manifest can supply the requested default, but Kiro should record where that trust came from and let the installed config distinguish inherited auto-approval from user-granted approval.

Fields I would want on import:

  • power id/version;
  • MCP server id;
  • tool name;
  • autoApprove source: power_manifest or user_config;
  • manifest digest;
  • install timestamp;
  • user override state;
  • revoked/changed flag.

Acceptance tests:

  1. installing a Power copies the expected autoApprove tools into the generated MCP config.
  2. the copied entry records the source manifest digest.
  3. a user removing one tool from autoApprove is not re-added silently on update.
  4. a Power update that changes autoApprove prompts/reviews the delta.
  5. unknown or renamed tools are not auto-approved by wildcard or stale config.

That preserves the seamless Power install path without making auto-approval invisible after installation.

rpelevin avatar Jun 05 '26 22:06 rpelevin

I would be careful not to import autoApprove as a blind trust grant.

Agreed! However, there are situations, such as mine, where the MCP server itself requires user approval for certain actions. A double approval from two different places isn't a great experience for low risk toolcalls like an "authentication" tool call.

As it exists today, a user in this situation using our tol would have to:

  • Approve Kiro's use of the authentication tool call
  • Then perform the authentication with the MCP server (or, rather, with the application running the MCP server binary).

Importing an autoApprove for an authentication call that invokes the server's auth flow feels like something that can be done safely since the caller must provide valid authentication via a non-Kiro interface. If they want to reject the authentication request, they can decline the authentication flow that was invoked by the MCP serving app.

So perhaps this wasn't a bug but a deliberate product decision. Either way, some flexibility for vendors of MCP servers who have controls at the MCP server level requiring a human in the loop for sensitive tool calls is appreciated. It reduces permission prompt fatigue and confusion for users in these situations.

scottisloud avatar Jun 05 '26 23:06 scottisloud

That makes sense. I would separate "Power says this tool can skip the host prompt" from "this action has no human authority anywhere."

For an auth-bootstrap tool, Kiro can reduce duplicate prompts safely if the imported auto-approval is recorded as delegated authority to the MCP server's own auth/HITL flow, not as a blanket local allow.

Fields I would add to the imported entry:

  • Power id/version
  • manifest digest
  • MCP server id
  • tool name
  • delegation type: auth_bootstrap, server_side_human_check, or local_auto_approve
  • upstream authority owner: Kiro, Power manifest, or MCP server
  • server challenge/session id when available
  • risk class
  • expires_at / revocation state
  • server result required before Kiro marks the call satisfied

Acceptance tests:

  1. Low-risk auth-bootstrap tool from a trusted Power skips the Kiro prompt but still requires the server-side auth result.
  2. Cancelling the server-side auth flow returns denied/failed to Kiro, not approved.
  3. A destructive tool is not auto-approved unless the manifest explicitly declares an equivalent server-side human check.
  4. Changing the Power manifest digest or MCP server id revokes the inherited delegation.
  5. The same raw tool name under another Power/server cannot inherit the prior delegation.

That keeps the good UX goal - no double prompt for auth bootstrap - without turning autoApprove into invisible blanket trust.

rpelevin avatar Jun 06 '26 00:06 rpelevin

+1 to this.

And I add another annoying problem due to this behavior: when the user install power updates, the previously autoApproved tools are cleared.

  • The user installs a power
  • The user adds some tools to autoApprove. Either manually or by clicking "Trust" in the chat interface.
  • The user install updates for the power
  • The autoApprove array is removed from the user mcp configuration.

tonig avatar Jul 06 '26 11:07 tonig

Thanks for reporting this and sorry for the trouble. You're running Kiro version 0.12.x, and we've shipped several major releases since then (1.0.0 through 1.0.138) that include many improvements and fixes:

  • Rebuilt connectivity and session management
  • New permissions system
  • Compaction loop fixes (Context limit exceeded errors)
  • MCP reliability and OAuth improvements
  • Performance optimizations

Could you please retest on the latest version (1.0.138) from https://kiro.dev/downloads and let us know if this is still an issue? If we don't hear back within 7 days, we'll assume it's resolved and close this out.

AnilMaktala avatar Jul 15 '26 16:07 AnilMaktala

This issue has been automatically closed due to inactivity. It has been 7 days since we requested additional information.

If you still need help with this issue, please feel free to reopen it or create a new issue with the requested details.

github-actions[bot] avatar Jul 23 '26 00:07 github-actions[bot]