AWS MCP Integration
Add the AWS Documentation MCP server to your cloud-ops agent so Kiro CLI can search and read AWS documentation automatically.
Prerequisite: Complete Custom Agents and MCP Overview. The
uvxcommand requiresuv— see the prerequisite callout in MCP Servers.
Step 1: Add AWS Documentation MCP Server
Section titled “Step 1: Add AWS Documentation MCP Server”Edit the agent JSON with /agent edit or your editor:
vi ~/.kiro/agents/cloud-ops.jsonParts to modify:
- Replace
"mcpServers": {}with the MCP server block below - Add four
@awslabs...entries to theallowedToolsarray
"mcpServers": { "awslabs.aws-documentation-mcp-server": { "command": "uvx", "args": ["awslabs.aws-documentation-mcp-server@latest"], "env": { "FASTMCP_LOG_LEVEL": "ERROR", "AWS_DOCUMENTATION_PARTITION": "aws" } }}"allowedTools": [ "fs_read", "fs_write", "execute_bash", "use_aws", "web_fetch", "web_search", "@awslabs.aws-documentation-mcp-server/read_documentation", "@awslabs.aws-documentation-mcp-server/search_documentation", "@awslabs.aws-documentation-mcp-server/recommend", "@awslabs.aws-documentation-mcp-server/read_sections"]If editor-based editing is difficult, overwrite the entire file:
cat > ~/.kiro/agents/cloud-ops.json << 'EOF'{ "name": "cloud-ops", "description": "AWS cloud operations dedicated agent", "prompt": "You are an AWS cloud operations expert.", "mcpServers": { "awslabs.aws-documentation-mcp-server": { "command": "uvx", "args": ["awslabs.aws-documentation-mcp-server@latest"], "env": { "FASTMCP_LOG_LEVEL": "ERROR", "AWS_DOCUMENTATION_PARTITION": "aws" } } }, "tools": ["*"], "allowedTools": [ "fs_read", "fs_write", "execute_bash", "use_aws", "web_fetch", "web_search", "@awslabs.aws-documentation-mcp-server/read_documentation", "@awslabs.aws-documentation-mcp-server/search_documentation", "@awslabs.aws-documentation-mcp-server/recommend", "@awslabs.aws-documentation-mcp-server/read_sections" ], "resources": [], "hooks": {}, "model": null}EOFAdding MCP tools to allowedTools allows documentation searches to run automatically without needing approval each time.
Restart Kiro CLI:
kiro-cli chat --agent cloud-opsStep 2: Verify MCP Server
Section titled “Step 2: Verify MCP Server”Inside the session:
/mcp/toolsConfirm the AWS Documentation MCP server appears and its tools are listed.
Step 3: Test AWS Documentation Search
Section titled “Step 3: Test AWS Documentation Search”Search the AWS documentation for scaling policies in Amazon EC2 Auto ScalingSince the search tools are registered in allowedTools, they run immediately without an approval request.
Step 4: Custom MCP Prompt Server (Optional)
Section titled “Step 4: Custom MCP Prompt Server (Optional)”This step is optional — it demonstrates MCP Prompts, not required for the rest of the guide.
Create a project and write the MCP server code:
mkdir -p ~/mcp-prompts && cd ~/mcp-promptsuv init && uv add mcp "mcp[cli]"cat > ~/mcp-prompts/mcp-server.py << 'EOF'from mcp.server.fastmcp import FastMCP
mcp = FastMCP("MyPromptServer")
@mcp.prompt()def cloud_diagnosis() -> str: """Checklist prompt for AWS infrastructure diagnostics""" return """Please diagnose the AWS infrastructure in the following order:1. Check EC2 instance status2. Review Security Group rules3. Verify VPC routing tables4. Check CloudWatch alarms"""EOFAdd MyPromptServer to the mcpServers section in ~/.kiro/agents/cloud-ops.json:
"MyPromptServer": { "command": "uv", "args": ["--directory", "$HOME/mcp-prompts", "run", "--with", "mcp", "mcp", "run", "mcp-server.py"]}Restart the agent and list prompts:
/prompts listAn UnauthorizedOperation error may occur when running @cloud_diagnosis without AWS permissions — that is expected. The prompt loading and execution attempt confirms successful MCP Prompt server configuration.
Checkpoint
Section titled “Checkpoint”You have completed this step if you have confirmed all of the following:
- AWS Documentation MCP server loaded (confirmed with
/mcp) - Documentation search tools visible in
/tools - AWS documentation search runs without approval prompt
- (Optional)
@cloud_diagnosisprompt loads from custom MCP Prompt server
Next: Hooks and Permissions — automate context injection and fine-grained tool control.