Skip to main content
Glama

AWS MCP

模型上下文协议 (MCP)服务器,使 Claude 等 AI 助手能够与您的 AWS 环境进行交互。这允许在对话过程中使用自然语言查询和管理您的 AWS 资源。想想 Amazon Q 更好的替代方案吧。

AWS MCP

特征

  • 🔍 使用自然语言查询和修改 AWS 资源

  • ☁️ 支持多个 AWS 配置文件和 SSO 身份验证

  • 🌐 多区域支持

  • 🔐 安全凭证处理(没有凭证暴露给外部服务,使用您的本地凭证)

  • 🏃‍♂️ 使用您的 AWS 凭证进行本地执行

Related MCP server: AWS MCP Server

先决条件

安装

  1. 克隆存储库:

git clone https://github.com/RafalWilinski/aws-mcp
cd aws-mcp
  1. 安装依赖项:

pnpm install
# or
npm install

用法

  1. 打开 Claude 桌面应用程序并转到“设置”->“开发者”->“编辑配置”

克劳德·塞瑟斯

  1. 将以下条目添加到您的claude_desktop_config.json中:

{
  "mcpServers": {
    "aws": {
      "command": "npm", // OR pnpm
      "args": [
        "--silent",
        "--prefix",
        "/Users/<YOUR USERNAME>/aws-mcp",
        "start"
      ]
    }
  }
}

重要提示:将/Users/<YOUR USERNAME>/aws-mcp替换为您的项目目录的实际路径。

  1. 重启 Claude 桌面应用。你应该会看到如下内容:

Claude MCP 连接状态

  1. 首先选择一个 AWS 配置文件,或者通过询问以下问题来采取行动:

    • “列出可用的 AWS 配置文件”

    • “列出我账户中的所有 EC2 实例”

    • “显示 S3 存储桶及其大小”

    • “us-east-1 部署了哪些 Lambda 函数?”

    • “列出所有 ECS 集群及其服务”

与nvm一起使用

首先从源代码构建并添加以下配置:

{
  "mcpServers": {
    "aws": {
      "command": "/Users/<USERNAME>/.nvm/versions/node/v20.10.0/bin/node",
      "args": [
        "<WORKSPACE_PATH>/aws-mcp/node_modules/tsx/dist/cli.mjs",
        "<WORKSPACE_PATH>/aws-mcp/index.ts",
        "--prefix",
        "<WORKSPACE_PATH>/aws-mcp",
        "start"
      ]
    }
  }
}

故障排除

查看日志:

tail -n 50 -f ~/Library/Logs/Claude/mcp-server-aws.log
# or
tail -n 50 -f ~/Library/Logs/Claude/mcp.log

开发中的功能

  • [ ] MFA 支持

  • [ ] 缓存 SSO 凭证以防止过于急切地刷新它们

Available Tools

3 tools
list-credentialsB

List all AWS credentials/configs/profiles that are configured/usable on this machine

Inputs: no named parameters.

run-aws-codeC

Run AWS code

Inputs: code (required), reasoning (required), profileName, region.

select-profileA

Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication

Inputs: profile (required), region.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: list-credentials handles credential enumeration, run-aws-code executes AWS code, and select-profile manages profile selection and authentication. An agent can easily differentiate between these three functions.

    Naming Consistency5/5

    All tool names follow a consistent verb-noun pattern with hyphens (list-credentials, run-aws-code, select-profile), making them predictable and readable throughout the set.

    Tool Count2/5

    With only 3 tools, the server feels under-scoped for AWS operations, which typically involve many services and actions. This limited set may not support common workflows like managing resources (e.g., S3, EC2) or performing CRUD operations, making it insufficient for the domain.

    Completeness1/5

    The tool set is severely incomplete for AWS functionality, lacking core operations such as creating, updating, or deleting resources, querying service status, or handling specific AWS services. This will cause significant agent failures in typical AWS tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers