$npx -y skills add aws/agent-toolkit-for-aws --skill setup-devops-agentSetup and diagnostics for the AWS DevOps Agent MCP connection. Triggers when aws-devops-agent is missing from .mcp.json, when the connection is broken, or when the user says "set up devops agent" / "configure agent". Does NOT trigger if the MCP is already connected and working.
| 1 | # AWS DevOps Agent — Claude Setup |
| 2 | |
| 3 | The instructions below are specifically for setting up the AWS DevOps Agent plugin for Claude applications. For other clients, use this as a reference, but adjust the instructions based on the client's specific requirements. |
| 4 | |
| 5 | ## Step 0: Check if setup is needed |
| 6 | |
| 7 | 1/ Check if the "aws-devops-agent" MCP server is running. If it is, verify that it has a valid connection (see "Step 3: Verify connectivity"). |
| 8 | |
| 9 | If verification is successful, you should inform the user that the plugin is already setup using `SigV4 or Bearer Token`. Offer that you can switch the configuration to `Bearer Token or SigV4`, see "Step 2: Decide auth path" below for details. |
| 10 | |
| 11 | If the user does not want to change their auth configuration, then you are DONE STOP HERE. |
| 12 | |
| 13 | 2/ Check for an MCP server config with a key "aws-devops-agent" in the following locations: |
| 14 | |
| 15 | - Plugin scoped: `${CLAUDE_PLUGIN_ROOT}/.mcp.json` |
| 16 | - Project-scoped: .mcp.json (in your project directory, version-controlled) |
| 17 | - Project-specific: .claude/settings.local.json (in your project directory) |
| 18 | - User-specific local: ~/.claude/settings.local.json |
| 19 | - User-specific global: ~/.claude/settings.json |
| 20 | - Main Claude.json: ~/.claude.json |
| 21 | - Dedicated MCP file: ~/.claude/mcp_servers.json |
| 22 | |
| 23 | Then: |
| 24 | |
| 25 | - If `aws-devops-agent` key exists AND the server is connected (tools are available, see "Step 3: Verify connectivity") → Inform the user: "DevOps Agent is already configured and connected."; If Bearer Token is used in the MCP config, suggest that you can alternatively setup the plugin to use SigV4 credentials for the AWS DevOps Agent (multiple agent spaces, admin tooling). If SigV4 credentials are used in the MCP config, suggest that you can alternatively setup the plugin to use Bearer Token credentials for the AWS DevOps Agent (single agent space). |
| 26 | - If `aws-devops-agent` key exists but is failing → continue to "Step 1: Diagnose current state" |
| 27 | - If `aws-devops-agent` key does NOT exist → continue to "Step 1: Diagnose current state" |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## Step 1: Diagnose current state |
| 32 | |
| 33 | Run these checks: |
| 34 | |
| 35 | ```bash |
| 36 | # Bearer token |
| 37 | echo "DEVOPS_AGENT_TOKEN: $([ -n "$DEVOPS_AGENT_TOKEN" ] && echo 'set' || echo 'not set')" |
| 38 | echo "DEVOPS_AGENT_REGION: ${DEVOPS_AGENT_REGION:-not set}" |
| 39 | |
| 40 | # SigV4 dependencies |
| 41 | uvx --version 2>&1 |
| 42 | |
| 43 | # AWS credentials |
| 44 | aws sts get-caller-identity 2>&1 |
| 45 | ``` |
| 46 | |
| 47 | Determine: |
| 48 | |
| 49 | - `bearer_ready` = `DEVOPS_AGENT_TOKEN` is set AND `DEVOPS_AGENT_REGION` is set |
| 50 | - `sigv4_ready` = `aws sts get-caller-identity` succeeds AND `uvx` is installed |
| 51 | |
| 52 | --- |
| 53 | |
| 54 | ## Step 2: Decide auth path |
| 55 | |
| 56 | After diagnostics, ALWAYS ask the user which path they want — even if only one is available. Present what you found and let them choose. |
| 57 | |
| 58 | The user may want to use bearer token if they only have access to the operator app for an agent space. |
| 59 | |
| 60 | The user may want to use SigV4 if they use multiple agent spaces and/or have admin permissions to manage agent spaces. |
| 61 | |
| 62 | | Bearer ready | SigV4 ready | Action | |
| 63 | |:---:|:---:|--------| |
| 64 | | yes | yes | "You have both a bearer token and AWS credentials configured. Which would you prefer for the DevOps Agent? **Bearer token** (single agent space) or **AWS credentials / SigV4** (multiple agent spaces and admin tooling)?" | |
| 65 | | yes | no | "You have a bearer token configured. Would you like me to set up the DevOps Agent using your **Bearer token** (single agent space)? Or would you prefer to configure **AWS credentials / SigV4** instead (multiple agent spaces and admin tooling)?" | |
| 66 | | no | yes | "You have valid AWS credentials. Would you like me to set up the DevOps Agent using **SigV4** (multiple agent spaces and admin tooling)? Or would you prefer to set up a **Bearer token** instead (single agent space)?" | |
| 67 | | no | no | "Neither a bearer token nor AWS credentials are configured. Would you like to connect via **Bearer token** (single agent space) or **AWS credentials / SigV4** (multiple agent spaces and admin tooling)?" Then guide them through the chosen path. | |
| 68 | |
| 69 | If the user would like to setup a bearer token, refer them to the AWS docs for [Connect to DevOps Agent remote servers](https://docs.aws.amazon.com/devopsagent/latest/userguide/accessing-devops-agent-connect-to-devops-agent-remote-servers.html#create-an-access-token) |
| 70 | or walk them through the steps to create a access token from this document. |
| 71 | |
| 72 | **Do NOT proceed to Step 3 until the user confirms their choice.** |
| 73 | |
| 74 | --- |
| 75 | |
| 76 | ## Step 3: Verify connectivity |
| 77 | |
| 78 | If the "aws-devops-agent" MCP server is already running, check if you can list tools. If you can, then you have verified the connection. |
| 79 | |
| 80 | Otherwise, proceed. |
| 81 | |
| 82 | Verify BEFORE writing `.mcp.json`. This confirms the credentials work against the live endpoint. Or us |