本文へ移動
cccskills
無料GitHub で公開

setup-devops-agent

Setup 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)

  • SKILL.md12.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

AWS DevOps Agent — Claude Setup

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.

Step 0: Check if setup is needed

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").

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.

If the user does not want to change their auth configuration, then you are DONE STOP HERE.

2/ Check for an MCP server config with a key "aws-devops-agent" in the following locations:

  • Plugin scoped: ${CLAUDE_PLUGIN_ROOT}/.mcp.json
  • Project-scoped: .mcp.json (in your project directory, version-controlled)
  • Project-specific: .claude/settings.local.json (in your project directory)
  • User-specific local: ~/.claude/settings.local.json
  • User-specific global: ~/.claude/settings.json
  • Main Claude.json: ~/.claude.json
  • Dedicated MCP file: ~/.claude/mcp_servers.json

Then:

  • 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).
  • If aws-devops-agent key exists but is failing → continue to "Step 1: Diagnose current state"
  • If aws-devops-agent key does NOT exist → continue to "Step 1: Diagnose current state"

Step 1: Diagnose current state

Run these checks:

# Bearer token
echo "DEVOPS_AGENT_TOKEN: $([ -n "$DEVOPS_AGENT_TOKEN" ] && echo 'set' || echo 'not set')"
echo "DEVOPS_AGENT_REGION: ${DEVOPS_AGENT_REGION:-not set}"

# SigV4 dependencies
uvx --version 2>&1

# AWS credentials
aws sts get-caller-identity 2>&1

Determine:

  • bearer_ready = DEVOPS_AGENT_TOKEN is set AND DEVOPS_AGENT_REGION is set
  • sigv4_ready = aws sts get-caller-identity succeeds AND uvx is installed

Step 2: Decide auth path

After diagnostics, ALWAYS ask the user which path they want — even if only one is available. Present what you found and let them choose.

The user may want to use bearer token if they only have access to the operator app for an agent space.

The user may want to use SigV4 if they use multiple agent spaces and/or have admin permissions to manage agent spaces.

Bearer readySigV4 readyAction
yesyes"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)?"
yesno"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)?"
noyes"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)?"
nono"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.

If the user would like to setup a bearer token, refer them to the AWS docs for Connect to DevOps Agent remote servers or walk them through the steps to create a access token from this document.

Do NOT proceed to Step 3 until the user confirms their choice.


Step 3: Verify connectivity

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.

Otherwise, proceed.

Verify BEFORE writing .mcp.json. This confirms the credentials work against the live endpoint. Or use this to verify an existing MCP server config.

Bearer verification

curl -s -w "\nHTTP_STATUS: %{http_code}" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEVOPS_AGENT_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
  "https://connect.aidevops.${DEVOPS_AGENT_REGION}.api.aws/mcp"
ResultMeaningAction
HTTP 200 + result.tools arraySuccessProceed to Step 4
HTTP 401Token invalid or expiredTell user to create a new token in the Operator Web App
HTTP 403Token scope insufficientTell user token needs agent:read + agent:operate scopes
Connection refused / timeoutEndpoint unreachableIf SigV4 is available, offer fallback. Otherwise report unavailable.

SigV4 verification

timeout 30 bash -c '
{
echo "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"setup-check\",\"version\":\"1.0\"}}}"
sleep 0.5
echo "{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}"
sleep 0.5
echo "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}"
sleep 8
} | uvx mcp-proxy-for-aws-cli@latest "https://connect.aidevops.${DEVOPS_AGENT_REGION}.api.aws/mcp" --service aidevops --region "$DEVOPS_AGENT_REGION"
'

Note: The first run may take 10-15s as uvx downloads mcp-proxy-for-aws-cli and its dependencies. Subsequent runs are near-instant.

ResultMeaningAction
Second line contains result.toolsSuccessProceed to Step 4
No output / timeoutCredentials invalid or endpoint unreachableCheck aws sts get-caller-identity again
ExpiredTokenException in stderrAWS session expiredTell user to re-authenticate (aws sso login or refresh creds)
AccessDeniedExceptionMissing IAM permissionsUser needs DevOps Agent permissions on their role

Step 4: Confirm and write .mcp.json

Before writing, confirm with the user:

"I've verified connectivity. I'll now add the [Bearer token / SigV4] MCP server to the plugin's .mcp.json. Proceed?"

Only write after the user confirms. Write ONE server entry — never both. Install the MCP config in ${CLAUDE_PLUGIN_ROOT}/.mcp.json. You can also offer to install the MCP server at the workspace level. The installation options are:

  • Plugin scoped: ${CLAUDE_PLUGIN_ROOT}/.mcp.json (default)
  • Project-scoped: .mcp.json (in your project directory, version-controlled)
  • Project-specific: .claude/settings.local.json (in your project directory)

Bearer config

{
  "mcpServers": {
    "aws-devops-agent": {
      "type": "http",
      "url": "https://connect.aidevops.${DEVOPS_AGENT_REGION}.api.aws/mcp",
      "headers": {
        "Authorization": "Bearer ${DEVOPS_AGENT_TOKEN}"
      },
      "timeout": 120000
    }
  }
}

SigV4 config

Replace <REGION> with the user's actual region:

{
  "mcpServers": {
    "aws-devops-agent": {
      "command": "uvx",
      "timeout": 120000,
      "args": [
        "mcp-proxy-for-aws-cli@latest",
        "https://connect.aidevops.<REGION>.api.aws/mcp",
        "--service", "aidevops",
        "--region", "<REGION>"
      ]
    }
  }
}

Fallback (aws-mcp)

Only add if the primary aws-devops-agent endpoint is unreachable AND SigV4 credentials are available:

{
  "mcpServers": {
    "aws-mcp": {
      "command": "uvx",
      "timeout": 100000,
      "args": [
        "mcp-proxy-for-aws-cli@latest",
        "https://aws-mcp.us-east-1.api.aws/mcp",
        "--metadata",
        "AWS_REGION=us-east-1"
      ]
    }
  }
}

For Sigv4 only: After writing the new MCP config, inform the user that the MCP server has been written successfully. Proceed to the next step.


Step 5: Multi-space routing (SigV4 only)

After successful SigV4 setup, discover and configure AgentSpace routing:

  1. Call list_agent_spaces via the newly connected MCP to discover available spaces
  2. Present the list to the user
  3. If multiple spaces exist, write a routing guide to .claude/aws-agents-for-devsecops.md:
# AWS DevOps Agent — Routing Guide

| Space | Agent Space ID | Purpose |
|-------|----------------|---------|
| <name> | <id> | <ask user> |
  1. Instruct: pass agent_space_id on every tool call when targeting a specific space.

Step 6: Reload plugin

Inform the user that they will need to run /reload-plugins to start the new MCP server. You may need to prompt the user to run it. Also mention that after restarting the MCP server they should try the following prompts:

  • setup multi-space routing (SigV4 only)
  • <list skill and prompt suggestions from ${CLAUDE_PLUGIN_ROOT}/README.md>

Bearer token guidance (for users who need to create one)

  1. Open the AWS DevOps Agent Operator Web App for your AgentSpace

  2. Navigate to Settings → Access tokens → Generate token

  3. Create a token with Permissions: Operate

  4. Set environment variables:

    export DEVOPS_AGENT_TOKEN="<your-token>"
    export DEVOPS_AGENT_REGION="<your-region>"
    

    Available regions: https://docs.aws.amazon.com/devopsagent/latest/userguide/about-aws-devops-agent-supported-regions.html

  5. Restart Claude Code (it reads env vars from the shell that launched it)

Important: Without Operate permissions, the chat and investigate tools will be completely invisible — not just fail, but absent from the tool list.


SigV4 guidance (for users who need to configure AWS credentials)

  1. Install uvx if not present:

    • macOS: brew install uv
    • Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Configure AWS credentials:

    aws configure sso --profile devops-agent
    aws sso login --profile devops-agent
    export AWS_PROFILE=devops-agent
    
  3. Set the region:

    export DEVOPS_AGENT_REGION="<your-region>"
    
  4. Verify: aws sts get-caller-identity

  5. The IAM role must have DevOps Agent permissions (e.g., managed policy with aidevops access)

Important: Unset DEVOPS_AGENT_TOKEN when using SigV4. If both are set, clients may attempt bearer auth instead of the signing proxy.


Troubleshooting

ErrorCauseFix
No tools visibleToken not set or Claude Code not restartedSet DEVOPS_AGENT_TOKEN + DEVOPS_AGENT_REGION, restart
HTTP 401Token invalid/expiredCreate new token in Operator Web App
chat/investigate missingToken scope is agent:read onlyCreate token with agent:operate scope
Connection refused / timeoutEndpoint unreachableCheck network; if SigV4 available, offer aws-mcp fallback
ExpiredTokenExceptionAWS session credentials expiredaws sso login or refresh credentials
AccessDeniedException (SigV4)Missing IAM permissionsUse a role with DevOps Agent access
Proxy won't startuvx not installedbrew install uv (macOS) or install per platform
Tools appear but calls timeoutNormal for chat (5-30s)Ensure "timeout": 120000 in mcp.json

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow. Triggers on: which runtime for my agent, AgentCore vs ECS vs EKS vs Lambda, AgentCore vs Lambda MicroVMs, deploy an AI agent on AWS, agent architecture on AWS, I have an agent idea what do I build, move/migrate my agents to AWS, agent migration plan, add AgentCore services (memory, gateway, identity, policy, observability) to an agent already on AWS, Temporal on AWS (migrate/run Temporal workers on AWS, a service orchestrated by Temporal, Temporal Cloud vs self-hosted). Temporal Workflow code is never rewritten into Step Functions. Requires at least one agentic component — a purely non-agent system (plain services, batch jobs, HTTP endpoints, non-agent Temporal Activities) is out of scope, redirected to gcp-to-aws / heroku-to-aws / llm-to-bedrock. Not for: compute/data migration with no AI agent; pure LLM SDK rewrite (use llm-to-bedrock); per-model pricing.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

Use to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal. Triggers: "add memory", "remember across sessions", "call agent from app", "invoke agent from code", "agent auth", "streaming", "VPC", "VPC connectivity", "can't reach from VPC", "multi-agent", "A2A", "A2A auth", "orchestrator not delegating", "specialist not called", "migrate Bedrock Agent", "migration issue", "change model", "browser tool", "code interpreter", "delete agent", "tear down", "agentcore remove", "cross-account memory", "add payments capability to my agent", "wire payments plugin", "integrate x402 payments with the agent I'm building", "add MPP payments", "Machine Payments Protocol". External APIs via Gateway: use agents-connect. New project: use agents-get-started. CLI/dev-server errors: use agents-debug. Runtime x402/MPP payments: use agents-pay. Migration-specific Strands vs LangGraph routes here.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

Use when connecting your agent to external APIs, tools, or services via Gateway, or restricting tool access with Cedar policies. Handles gateway setup, target types, outbound auth (OAuth, API key, IAM), credentials, and Cedar policy authoring. Triggers on: "connect to API", "add gateway", "connect to MCP server", "Lambda tools", "OpenAPI", "gateway target", "Cedar policy", "restrict tools", "policy engine", "gateway auth error", "store API key", "outbound credential", "env var API key", "API key None after deploy", "credential not available after deploy", "should this be a gateway target", "give my agent tools", "add tools to agent". Not for inbound auth (who can call your agent) — use agents-harden. Not for debugging agent behavior — use agents-debug. Not for VPC networking errors (agent can't reach APIs due to VPC) — use agents-build. Not for creating or hosting a new MCP server project — use agents-get-started.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

Use when your agent or environment is broken — wrong answers, errors, timeouts, tool failures, or CLI issues. Reads traces and logs to diagnose root causes. Also checks prerequisites when the CLI itself isn't working. Triggers on: "agent not working", "wrong answer", "agent error", "tool call failing", "debug agent", "check logs", "read traces", "broken", "500 error", "424 error", "model access denied", "command not found", "stuck in DELETING", "maxVms exceeded", "cold start diagnosis", "cold start slow", "agentcore create error", "create failed", "exit code 7", "connection refused local dev". Not for deploy failures — use agents-deploy. Not for performance tuning without errors — use agents-optimize. Not for VPC configuration — use agents-build. Not for observability setup or missing logs — use agents-optimize.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

Use when deploying your agent to AWS, or when a deploy has failed. Handles pre-flight validation, CDK/IAM/quota error diagnosis, version management, rollback, and canary deployments. Triggers on: "deploy my agent", "agentcore deploy", "deploy failed", "CDK error", "rollback", "canary deploy", "pin version", "redeploy", "deploy stuck". Not for production hardening — use agents-harden. Not for adding capabilities before deploy — use agents-build or agents-connect. Not for VPC configuration errors — use agents-build.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

Use when a developer wants to create a new agent project or get started with AgentCore. Handles framework selection, project scaffolding, first deploy, and first invocation. Triggers on: "build an agent", "create an agent", "get started", "new project", "agentcore create", "which framework", "Strands vs LangGraph", "hello world agent", "first agent", "create MCP server", "host MCP server", "agentcore dev", "dev server", "what port", "local development". Not for adding capabilities to existing projects — use agents-build or agents-connect. Strands vs LangGraph in a migration context routes to agents-build, not here. Connecting to an existing MCP server routes to agents-connect, not here.

日本語の概要は準備中です。原文の説明を表示しています。

aws/agent-toolkit-for-aws2,8432026年10月10日 更新

aws のスキルをすべて見る

このスキルの問題を報告する