Description
When authenticated with an API key (KIRO_API_KEY), running kiro-cli mcp list or starting a chat session shows:
⚠️ WARNING: Failed to retrieve MCP settings; MCP functionality disabled
Root Cause
The MCP governance check calls GetProfile which returns AccessDeniedException for API key users:
ERROR chat_cli::api_client::profile: GetProfile failed on all endpoints for API key
WARN chat_cli::cli::mcp: Failed to check MCP configuration, defaulting to disabled
err=GetProfileError(ServiceError(AccessDeniedError: "Your account is not authorized to make this call."))
Running kiro-cli profile confirms: error: This command is only available for IAM Identity Center or External IdP users
Expected Behavior
For API key users without MCP Registry/governance, the CLI should skip the governance check and load locally configured MCP servers from ~/.kiro/settings/mcp.json and .kiro/settings/mcp.json normally.
Environment
- kiro-cli version: 2.3.0
- Auth method: API key (
KIRO_API_KEY env var)
- OS: Linux (Ubuntu)
- MCP servers configured in
~/.kiro/settings/mcp.json (global) and .kiro/settings/mcp.json (workspace)
Steps to Reproduce
- Authenticate with API key:
export KIRO_API_KEY=ksk_...
- Configure MCP servers in
~/.kiro/settings/mcp.json
- Run
kiro-cli mcp list
- Observe warning and empty MCP list
Workaround
MCP servers still work within active chat sessions despite the warning. The issue only affects the mcp list command output and initial governance check.
Description
When authenticated with an API key (
KIRO_API_KEY), runningkiro-cli mcp listor starting a chat session shows:Root Cause
The MCP governance check calls
GetProfilewhich returnsAccessDeniedExceptionfor API key users:Running
kiro-cli profileconfirms:error: This command is only available for IAM Identity Center or External IdP usersExpected Behavior
For API key users without MCP Registry/governance, the CLI should skip the governance check and load locally configured MCP servers from
~/.kiro/settings/mcp.jsonand.kiro/settings/mcp.jsonnormally.Environment
KIRO_API_KEYenv var)~/.kiro/settings/mcp.json(global) and.kiro/settings/mcp.json(workspace)Steps to Reproduce
export KIRO_API_KEY=ksk_...~/.kiro/settings/mcp.jsonkiro-cli mcp listWorkaround
MCP servers still work within active chat sessions despite the warning. The issue only affects the
mcp listcommand output and initial governance check.