• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

setup-devops-agent

プラグイン
aws-agents-for-devsecops
ソース
GitHub で見る ↗
説明

AWS DevOps Agent(クラウドベースの開発運用支援ツール)の MCP 接続のセットアップと診断を行います。 以下の場合に実行されます: - aws-devops-agent が .mcp.json ファイルに設定されていない - 接続が途切れている - ユーザーが「devops agent をセットアップして」「agent を設定して」と指示した 既に MCP が接続され正常に動作している場合は実行されません。

原文を表示

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.

ユースケース
  • aws-devops-agent が未設定のとき
  • 接続が途切れているとき
  • devops agent のセットアップを指示されたとき
  • agent の設定を指示されたとき
本文(日本語訳)

AWS DevOps Agent — Claude セットアップ

以下の手順は、Claude アプリケーション用の AWS DevOps Agent プラグイン セットアップ専用です。他のクライアント向けの場合は、これを参考にしながらクライアントの要件に合わせて調整してください。

ステップ 0: セットアップが必要かどうかの確認

  1. 「aws-devops-agent」MCP サーバ(APIの仲介役)が実行されているか確認します。実行されている場合は、接続が正常に機能しているか検証します(「ステップ 3: 接続の確認」を参照)。

検証が成功した場合、ユーザーに対して、プラグインが既に SigV4(AWS公式の認証形式)または Bearer Token(アクセストークン) で設定されていることを知らせます。その後、設定を Bearer Token または SigV4 に切り替えることができるかどうかを確認してください。詳しくは、以下の「ステップ 2: 認証方式の選択」を参照してください。

ユーザーが認証設定を変更したくない場合は、ここで終了です。

  1. 以下の場所で「aws-devops-agent」キーを持つ MCP サーバ設定をチェックします:
  • プラグイン範囲:${CLAUDE_PLUGIN_ROOT}/.mcp.json
  • プロジェクト範囲:.mcp.json(プロジェクトディレクトリ内、バージョン管理対象)
  • プロジェクト固有:.claude/settings.local.json(プロジェクトディレクトリ内)
  • ユーザーローカル:~/.claude/settings.local.json
  • ユーザーグローバル:~/.claude/settings.json
  • メイン Claude.json:~/.claude.json
  • 専用 MCP ファイル:~/.claude/mcp_servers.json

その後:

  • aws-devops-agent キーが存在し、サーバが接続されている場合(ツールが利用可能、「ステップ 3: 接続の確認」を参照)→ ユーザーに「DevOps Agent は既に設定・接続されています」と伝えます。MCP 設定で Bearer Token が使用されている場合は、代わりに SigV4 認証情報を使用するようセットアップできることを提案します(複数のエージェントスペース、管理ツール対応)。SigV4 認証情報が使用されている場合は、代わりに Bearer Token を使用するようセットアップできることを提案します(単一エージェントスペース対応)。
  • aws-devops-agent キーが存在するが接続に失敗している場合 → 「ステップ 1: 現在の状態を診断」に進みます
  • aws-devops-agent キーが存在しない場合 → 「ステップ 1: 現在の状態を診断」に進みます

ステップ 1: 現在の状態を診断

以下のチェックを実行します:

# 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 依存関係
uvx --version 2>&1

# AWS 認証情報
aws sts get-caller-identity 2>&1

以下を判定します:

  • bearer_ready = DEVOPS_AGENT_TOKEN が設定されており、かつ DEVOPS_AGENT_REGION が設定されている
  • sigv4_ready = aws sts get-caller-identity が成功し、かつ uvx がインストールされている

ステップ 2: 認証方式の選択

診断後、利用可能な方式が 1 つだけでも、常にユーザーにどちらを使いたいか尋ねます。診断結果を提示し、ユーザーに選択させます。

ユーザーは、1 つのエージェントスペース向けオペレータアプリへのアクセスのみを持つ場合、Bearer Token の使用を希望する場合があります。

ユーザーは、複数のエージェントスペースを使用したり、エージェントスペース管理の管理者権限を持つ場合、SigV4 の使用を希望する場合があります。

Bearer 準備完了 SigV4 準備完了 操作
あり あり 「Bearer Token と AWS 認証情報の両方が設定されています。DevOps Agent ではどちらを使いたいですか?Bearer Token(単一エージェントスペース)または AWS 認証情報 / SigV4(複数エージェントスペース・管理ツール対応)?」
あり なし 「Bearer Token が設定されています。DevOps Agent を Bearer Token(単一エージェントスペース)で設定しますか?それとも AWS 認証情報 / SigV4(複数エージェントスペース・管理ツール対応)を設定しますか?」
なし あり 「有効な AWS 認証情報があります。DevOps Agent を SigV4(複数エージェントスペース・管理ツール対応)で設定しますか?それとも Bearer Token(単一エージェントスペース)を設定しますか?」
なし なし 「Bearer Token も AWS 認証情報も設定されていません。Bearer Token(単一エージェントスペース)または AWS 認証情報 / SigV4(複数エージェントスペース・管理ツール対応)で接続しますか?」 その後、ユーザーが選んだ方式を案内します。

ユーザーが Bearer Token をセットアップしたい場合は、AWS ドキュメント DevOps Agent リモートサーバへの接続 を参照するか、このドキュメント内のステップを案内してアクセストークンを作成させます。

ユーザーが選択を確認するまで、ステップ 3 に進まないでください。


ステップ 3: 接続の確認

「aws-devops-agent」MCP サーバが既に実行されている場合は、ツールをリストアップできるか確認します。できれば、接続の確認が完了です。

それ以外の場合は、以下に進みます。

.mcp.json を書き込む前に確認します。これにより、本番環境のエンドポイントに対して認証情報が機能することを確認するか、既存の MCP サーバ設定を検証します。

Bearer Token による確認

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"
結果 意味 操作
HTTP 200 + result.tools 配列 成功 ステップ 4 に進む
HTTP 401 トークンが無効または期限切れ ユーザーに「オペレータウェブアプリで新しいトークンを作成してください」と伝える
HTTP 403 トークンのスコープが不足 ユーザーに「トークンは agent:read + agent:operate スコープが必要です」と伝える
接続拒否 / タイムアウト エンドポイントに到達不可 SigV4 が利用可能な場合はフォールバックを提案。それ以外は利用不可と報告

SigV4 による確認

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"
'

注意: 初回実行時は uvx が mcp-proxy-for-aws-cli とその依存関係をダウンロードするため、10~15 秒かかる場合があります。その後の実行はほぼ瞬時です。

結果 意味 操作
2 行目に result.tools が含まれる 成功 ステップ 4 に進む
出力なし / タイムアウト 認証情報が無効またはエンドポイントに到達不可 aws sts get-caller-identity をもう一度確認
stderr に ExpiredTokenException AWS セッション認証情報が期限切れ ユーザーに「再認証してください(aws sso login または認証情報をリフレッシュ)」と伝える
AccessDeniedException IAM 権限が不足 ユーザーには DevOps Agent 権限を持つロールが必要

ステップ 4: 確認と .mcp.json への書き込み

書き込む前に、ユーザーに確認します:

「接続を確認しました。次に [Bearer Token / SigV4] MCP サーバをプラグインの .mcp.json に追加します。実行しますか?」

ユーザーが確認した後にのみ書き込みます。1 つのサーバエントリのみを書き込みます。両方は書き込みません。MCP 設定を ${CLAUDE_PLUGIN_ROOT}/.mcp.json にインストールします。また、ワークスペースレベルで MCP サーバをインストールすることも提案できます。インストールオプションは以下の通りです:

  • プラグイン範囲:${CLAUDE_PLUGIN_ROOT}/.mcp.json(デフォルト)
  • プロジェクト範囲:.mcp.json(プロジェクトディレクトリ内、バージョン管理対象)
  • プロジェクト固有:.claude/settings.local.json(プロジェクトディレクトリ内)

Bearer Token 設定

{
  "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 設定

<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>"
      ]
    }
  }
}

フォールバック(aws-mcp)

主要な aws-devops-agent エンドポイントに到達不可な場合かつ SigV4 認証情報が利用可能な場合にのみ追加します:

{
  "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"
      ]
    }
  }
}

SigV4 のみの場合:新しい MCP 設定を書き込んだ後、ユーザーに MCP サーバが正常に書き込まれたことを知らせます。次のステップに進みます。


ステップ 5: マルチスペースルーティング(SigV4 のみ)

SigV4 セットアップが成功した後、AgentSpace ルーティングを検出・設定します:

  1. 新しく接続した MCP 経由で list_agent_spaces を呼び出し、利用可能なスペースを検出する
  2. リストをユーザーに提示する
  3. 複数のスペースが存在する場合は、ルーティングガイドを .claude/aws-agents-for-devsecops.md に書き込みます:
# AWS DevOps Agent — ルーティングガイド

| スペース | エージェントスペース ID | 用途 |
|-------|----------------|---------|
| <名前> | <ID> | <ユーザーに確認> |
  1. ユーザーに「特定のスペースを対象とする場合は、すべてのツール呼び出しで agent_space_id を渡してください」と指示します。
原文(English)を表示

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 ready SigV4 ready Action
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)?"
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)?"
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)?"
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.

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"
Result Meaning Action
HTTP 200 + result.tools array Success Proceed to Step 4
HTTP 401 Token invalid or expired Tell user to create a new token in the Operator Web App
HTTP 403 Token scope insufficient Tell user token needs agent:read + agent:operate scopes
Connection refused / timeout Endpoint unreachable If 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.

Result Meaning Action
Second line contains result.tools Success Proceed to Step 4
No output / timeout Credentials invalid or endpoint unreachable Check aws sts get-caller-identity again
ExpiredTokenException in stderr AWS session expired Tell user to re-authenticate (aws sso login or refresh creds)
AccessDeniedException Missing IAM permissions User 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

Error Cause Fix
No tools visible Token not set or Claude Code not restarted Set DEVOPS_AGENT_TOKEN + DEVOPS_AGENT_REGION, restart
HTTP 401 Token invalid/expired Create new token in Operator Web App
chat/investigate missing Token scope is agent:read only Create token with agent:operate scope
Connection refused / timeout Endpoint unreachable Check network; if SigV4 available, offer aws-mcp fallback
ExpiredTokenException AWS session credentials expired aws sso login or refresh credentials
AccessDeniedException (SigV4) Missing IAM permissions Use a role with DevOps Agent access
Proxy won't start uvx not installed brew install uv (macOS) or install per platform
Tools appear but calls timeout Normal for chat (5-30s) Ensure "timeout": 120000 in mcp.json

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。