Skip to content

fix: convert Amazon Q CLI references to Kiro CLI#3

Open
merlinnaidoo wants to merge 1 commit intoaws-samples:mainfrom
merlinnaidoo:fix/convert-amazonq-to-kiro
Open

fix: convert Amazon Q CLI references to Kiro CLI#3
merlinnaidoo wants to merge 1 commit intoaws-samples:mainfrom
merlinnaidoo:fix/convert-amazonq-to-kiro

Conversation

@merlinnaidoo
Copy link
Copy Markdown

What does this PR do?

Converts the CFM Tips MCP server setup from Amazon Q CLI to Kiro CLI compatibility.

Why is this change needed?

Amazon Q CLI has been deprecated and replaced by Kiro CLI. The current setup script creates configuration files in the wrong location (~/.aws/amazonq/) and references outdated commands, preventing users from properly configuring the MCP server with Kiro CLI.

Changes Made

  • Directory path: Changed from ~/.aws/amazonq/mcp.json to ~/.kiro/settings/mcp.json
  • Command references: Updated from q chat to kiro-cli chat
  • Documentation: Changed "Amazon Q CLI" references to "Kiro CLI"
  • User instructions: Updated example commands to use Kiro CLI

Testing

  • ✅ Local testing confirms setup script now creates config in correct Kiro location
  • ✅ All integration tests pass (python3 test_runbooks.py)
  • ✅ MCP server starts correctly with new configuration
  • ✅ Maintains backward compatibility for MCP configuration format

Breaking Changes

None. This is purely a configuration path and documentation update.

Files Modified

  • setup.py - Updated paths, commands, and documentation references

How to Test

  1. Run python3 setup.py
  2. Verify config is created at ~/.kiro/settings/mcp.json
  3. Confirm output shows "kiro-cli chat" instead of "q chat"
  4. Test MCP server functionality with Kiro CLI

Fixes the setup compatibility issue with Kiro CLI migration.

- Update directory path from ~/.aws/amazonq to ~/.kiro/settings
- Change command references from 'q chat' to 'kiro-cli chat'  
- Update documentation references from Amazon Q to Kiro
- Maintain backward compatibility for MCP configuration format

This enables the CFM Tips MCP server to work with the new Kiro CLI
instead of the deprecated Amazon Q CLI.
@corbuno
Copy link
Copy Markdown

corbuno commented Jan 14, 2026

Tested manually. It works. CFM cfm-tips is loaded in kiro-cli.

❱ python3 setup.py
CFM Tips - AWS Cost Optimization MCP Server Setup
✅ Python version: 3.13.2

📦 Checking dependencies...
✅ boto3 is installed
✅ mcp is installed

🔐 Checking AWS credentials...
✅ AWS credentials are configured
Account: xxxxxxxxxxxxxxxxxxxxx
User/Role: arn:aws:iam::xxxxxxxxxxxxxxxxxxxxx:user/bob

⚙️ Creating MCP configuration...
✅ MCP configuration updated: /Users/bob/.kiro/settings/mcp.json
✅ Template created: mcp_runbooks.json

🧪 Testing MCP server...
CFM Tips AWS Cost Optimization MCP Server - Integration Test
Testing imports...
✅ MCP imports successful
✅ AWS imports successful
✅ Runbook functions import successful

Testing server creation...
✅ Server module imported successfully
✅ Server object created successfully
✅ Server name is correct: cfm_tips

Testing CloudTrail functions...
✅ CloudTrail functions imported successfully
✅ get_management_trails has correct signature
✅ run_cloudtrail_trails_analysis has correct signature
✅ generate_cloudtrail_report has correct signature

Testing tool name lengths...
✅ All tool names within limit (max: 34 chars)

Tests passed: 4/4
✅ All integration tests passed!

Next steps:

  1. Configure AWS credentials: aws configure
  2. Apply the correct IAM permissions (see CORRECTED_PERMISSIONS.md)
  3. Start the server: q chat --mcp-config "$(pwd)/mcp_runbooks.json"
  4. Test with: "Run comprehensive cost analysis for us-east-1"

🎉 CFM Tips is ready to help optimize your AWS costs!
✅ Server tests passed

Setup Summary:
✅ Python version: OK
✅ Dependencies: OK
✅ AWS credentials: OK
✅ MCP configuration: OK
✅ Server tests: OK

🎉 CFM Tips AWS Cost Optimization MCP Server Setup Complete!

🚀 Quick Start:
kiro-cli chat

💬 Example commands in Kiro:
"Run comprehensive cost analysis for us-east-1"
"Find unused EBS volumes costing money"
"Generate EC2 right-sizing report in markdown"
"Show me idle RDS instances"
"Identify unused Lambda functions"

🔧 Available tools:
• ec2_rightsizing - Find underutilized EC2 instances
• ebs_unused - Identify unused EBS volumes
• rds_idle - Find idle RDS databases
• lambda_unused - Identify unused Lambda functions
• comprehensive_analysis - Multi-service analysis

📚 Documentation:
• README.md - Main documentation
• RUNBOOKS_GUIDE.md - Detailed usage guide
• CORRECTED_PERMISSIONS.md - IAM permissions

🔍 Troubleshooting:
• python3 diagnose_cost_optimization_hub_v2.py
• python3 test_runbooks.py

💡 Tips:
• Ensure your AWS resources have been running for 14+ days for metrics
• Apply the IAM permissions from CORRECTED_PERMISSIONS.md
• Enable Cost Optimization Hub in AWS Console if needed

🎯 Ready to use! Start with:
kiro-cli chat

❱ kiro-cli
✓ cfm-tips loaded in 1.04 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants