Call AWS DevOps Agent from Kiro and Claude Code over MCP
AWS DevOps Agent now offers headless access via the Model Context Protocol (MCP), letting developers invoke production observability and root-cause investigations directly from Kiro, Claude Code, Cursor, and other MCP-compatible clients. This step-by-step guide walks through enabling access tokens, creating a scoped token, connecting from popular IDEs, choosing between bearer tokens and SigV4 authentication, and the security practices to follow before rolling out to a team.
As of June 2026, AWS DevOps Agent supports headless access over the Model Context Protocol (MCP). You can call the agent from Kiro, Claude Code, Cursor, or any other MCP-compatible client without leaving your editor.
This article covers enabling access tokens on your Agent Space, creating a scoped token, connecting your client, and the security practices for production use.
What you will learn
- How AWS DevOps Agent exposes its capabilities over the Model Context Protocol (MCP).
- How to enable access tokens on your Agent Space and create a scoped token.
- How to connect Kiro, Claude Code, and other MCP clients.
- When to use SigV4 authentication instead of an access token.
- Security practices for token handling, rotation, and revocation.
What headless access gives you
The AWS DevOps Agent web app handles long-running investigation work well. For shorter questions you ask between code commits ("did my last deploy break anything?", "what services are paging right now?", "summarize the open recommendations"), switching to a browser tab is overhead.
Over MCP, your client can call the agent directly to:
- Run quick chat queries with instant responses.
- Start a full investigation asynchronously, which takes 5 to 8 minutes for root-cause analysis.
- Read recommendations, deployment history, and resource health.
- Open an AWS Support case with the investigation context attached.
How it works
AWS DevOps Agent exposes a regional remote server endpoint that supports two protocols:
- MCP (Model Context Protocol) for IDEs and CLIs such as Kiro, Claude Code, and Cursor.
- A2A (Agent-to-Agent) v1.0 for autonomous agents calling DevOps Agent as a sub-agent.
The endpoint pattern is:
https://connect.aidevops.{region}.api.aws
| Protocol | Path | Method |
|---|---|---|
| MCP | /mcp | POST |
| A2A | /a2a/* | POST |
| A2A agent card | /.well-known/agent-card.json | GET |
Two authentication options work on both protocols:
- Bearer access token: a single token scoped to one Agent Space. Simpler to set up for individual developers.
- AWS SigV4: uses your existing AWS credentials and routes to multiple Agent Spaces. Recommended for production teams and multi-account setups.
The rest of this guide uses the access-token path. SigV4 is covered after the main setup.
Prerequisites
Before you begin, make sure you have:
- An AWS DevOps Agent Agent Space in one of the supported Regions. If you do not have one, follow the Getting started guide first.
- IAM permissions to manage access tokens on that Agent Space. At minimum:
aidevops:CreateAccessToken,aidevops:RevokeAccessToken, andaidevops:RotateAccessToken. The full list is in the IAM permissions reference. - One of the supported clients installed locally: Kiro, Claude Code, or any other MCP-compatible IDE/CLI.
Note: Access tokens are off by default on every Agent Space. You must explicitly enable them. See Step 1.
Step 1: Enable access tokens on your Agent Space
- Sign in to the AWS Management Console and open AWS DevOps Agent.
- Choose your Agent Space.
- Open the Configuration tab.
- In the Access tokens section, choose Enable.
- Confirm the action.
Once enabled, the Access Tokens menu becomes available inside the Agent Space web app.
Step 2: Create a scoped access token
- Open the AWS DevOps Agent web app for your Agent Space.
- From the navigation menu, choose Settings, then Access Tokens.
- Choose Create access token.
- Enter a descriptive name. Names like
kiro-laptop-devorclaude-code-devmake audit trails easier to read later. - Choose a scope. Pick the least privilege option that meets your need:
read: view investigations, recommendations, chats, topology, and resources.operate: everything inread, plus the ability to send messages, create chats, and manage recommendations and backlog tasks.
- Set an expiration between 1 and 60 days. Shorter is better.
- (Optional but recommended) Specify an IP allowlist. The token can only be used from the listed IPs or CIDR ranges.
- Copy the token value and store it in a secure place: a password manager, AWS Secrets Manager, or your OS keychain. You cannot retrieve the value again after this screen.
The web app shows a ready-to-paste configuration snippet at the end. Keep that tab open for the next step.
Tip: Use
readscope for personal exploratory use. Reserveoperatefor automation that needs to write back to investigations.
Step 3: Connect your client
The setup pattern is the same across every supported client: install a small connector, set two environment variables, and restart. Pick the option below that matches your IDE or CLI.
Option A: Kiro
Kiro ships an official aws-devops-agent power in the Powers marketplace.
-
Open Kiro and install the aws-devops-agent power from the Powers marketplace.
-
Set two environment variables in your shell profile (
~/.zshrc,~/.bashrc, or your shell's equivalent):export DEVOPS_AGENT_TOKEN="paste-your-token-here" export DEVOPS_AGENT_REGION="us-east-1" # or your Agent Space Region -
Restart Kiro so it picks up the new environment variables.
-
Approve the environment-variable prompt that Kiro shows the first time the power is invoked.
The Kiro power also includes aws-mcp as a fallback. If the remote server endpoint is briefly unreachable, the power falls back to direct AWS API access using your local credentials, so the investigation continues.
Option B: Claude Code
-
Install the aws-devops-agent plugin in Claude Code. The reference plugin is available at the sample-aws-devops-agent-claude-plugin repository.
-
Set the same two environment variables:
export DEVOPS_AGENT_TOKEN="paste-your-token-here" export DEVOPS_AGENT_REGION="us-east-1" -
Restart Claude Code.
The Claude Code plugin also has the aws-mcp fallback for direct AWS API access.
Option C: Any other MCP-compatible client
Cursor, Amazon Q Developer, and custom MCP CLIs all work with the same endpoint. Use these connection settings:
- URL:
https://connect.aidevops.{region}.api.aws/mcp - Authorization header:
Bearer your-access-token - Timeout: at least 120 seconds (initial responses take 5 to 30 seconds; full investigations can run for several minutes)
A typical MCP client config looks like this:
{ "mcpServers": { "aws-devops-agent": { "url": "https://connect.aidevops.us-east-1.api.aws/mcp", "headers": { "Authorization": "Bearer ${DEVOPS_AGENT_TOKEN}" }, "timeout": 120000 } } }
Replace us-east-1 with your Agent Space Region. Keep the token in an environment variable and never commit it to source control.
When to use SigV4 instead of a bearer token
SigV4 is the right choice when:
- You manage multiple Agent Spaces and want a single client to route between them by
agent_space_id. - Your team requires authentication tied to existing AWS IAM identity governance (SSO, role assumption, federated identity).
- You want to avoid managing token rotation manually.
The Kiro power and Claude Code plugin both ship with SigV4 support through the open-source mcp-proxy-for-aws helper. The proxy signs requests using your local AWS credentials.
Prerequisites for SigV4:
- AWS credentials available locally (SSO, environment variables, or
~/.aws/credentials). - IAM permissions to invoke AWS DevOps Agent actions.
uvxinstalled. The proxy is launched viauvx mcp-proxy-for-aws@latest.
In SigV4 mode, you pass agent_space_id on each tool call to choose which Agent Space the request targets. This matters when you support multiple environments (dev, staging, prod) or multiple business units from one workstation.
Sample prompts
Once your client is connected, here are prompts that exercise the chat and investigation skills.
Quick health check (chat skill, instant):
"Give me a one-paragraph status of the production environment right now."
Deployment correlation (chat skill, instant):
"List the last five deployments and flag any that overlap with elevated error rates."
Full root-cause investigation (investigate skill, asynchronous):
"Investigate why latency on the orders API is above 500 ms over the last 30 minutes. Tell me the most likely cause and a mitigation plan."
Recommendation review:
"What are the top three open observability recommendations for the payment service?"
The investigation skill is asynchronous. Your IDE receives a task ID, and you can check the result a few minutes later or subscribe to streaming updates over server-sent events.
Security best practices
Token hygiene rules:
- Least privilege scope. Default to
read. Useoperateonly when the workflow needs to write back. - Short expiration. Pick the shortest expiration that fits the use case. Maximum is 60 days; 7 to 14 days is a sensible default for individual developer tokens.
- IP allowlist. Use the IP allowlist field whenever you can predict the source IP (corporate VPN, fixed office range, jump host).
- Store securely. Use environment variables, OS keychains, or AWS Secrets Manager. Never hardcode tokens in source files or commit them to repositories.
- Rotate before expiry. Rotation generates a new token value while preserving the name, scopes, and IP allowlist of the original. The old value is invalidated immediately.
- Revoke fast on compromise. If a token leaks, revoke it from the web app under Settings > Access Tokens, or use the
awscurl-based revocation API. To lock down all token access immediately, the Configuration > Access tokens > Disable action blocks every token at once. - Do not auto-execute agent responses. The agent's mitigation plans are recommendations. Review them before applying changes to production.
Every AssumeRole call triggered by a token is logged in AWS CloudTrail with session tags including AgentSpaceId, UserId, AccessTokenId, TokenName, ClientType, and SourceIp. This produces a per-token, per-IDE-session audit trail.
If your organization needs to prevent access tokens from being enabled at all, deploy a Service Control Policy (SCP) that denies aidevops:UpdateAgentSpace along with the access-token APIs. The full SCP example is in the Connect to DevOps Agent remote servers documentation.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
HTTP 401 Unauthorized | Token expired, revoked, or invalid. | Create a new token or rotate the existing one in the web app. |
HTTP 400 "A2A-Version header required" | Missing protocol version on an A2A request. | Add A2A-Version: 1.0 to your request headers. |
| Request timeout | Default client timeout too low. | Set the client timeout to at least 120 seconds. |
Connection refused | Wrong endpoint URL or Region. | Confirm the URL format is https://connect.aidevops.{region}.api.aws and that the Region matches your Agent Space. |
| Tool calls succeed but return empty data | The Agent Space has no access to the resources you are asking about. | Open the Agent Space configuration and check the source-account associations and IAM source roles. |
Summary
The setup is four steps: enable access tokens on your Agent Space, create a scoped token, set two environment variables, restart your client. After that, you can call AWS DevOps Agent from Kiro, Claude Code, or any other MCP client. For teams managing multiple Agent Spaces, SigV4 with mcp-proxy-for-aws covers the same surface using existing AWS credentials.
Next steps
- Read the Connect to DevOps Agent remote servers documentation for the complete reference, including A2A details.
- Explore the sample-aws-devops-agent-claude-plugin repository if you want to customize the Claude Code integration.
- Check the release history page for the latest features. Headless access shipped on June 15, 2026, alongside custom SRE agents on a cadence and bring-your-own sub-agents via A2A.
If you build an integration for a different MCP client, consider sharing it on re:Post.
- Language
- English
Relevant content
- Accepted Answer
asked 2 months ago
asked 4 months ago
- Accepted Answer
asked a year ago
AWS OFFICIALUpdated 5 months ago
AWS OFFICIALUpdated 5 months ago