MCP HubMCP Hub
RafalWilinski

aws-mcp

by: RafalWilinski

Talk with your AWS using Claude. Model Context Protocol (MCP) server for AWS. Better Amazon Q alternative.

209created 18/12/2024
Visit
AWS
Claude

πŸ“ŒOverview

Purpose: To facilitate natural language interactions with AWS resources through AI assistants like Claude.

Overview: The Model Context Protocol (MCP) server allows users to manage and query AWS infrastructure using conversational interfaces. This enhances the user experience by providing an alternative to traditional Amazon Q and streamlining resource management through simple language commands.

Key Features:

  • Natural Language Processing: Enables querying and modification of AWS resources using plain language, improving accessibility for users.

  • Multi-Profile and SSO Support: Facilitates the use of multiple AWS profiles and incorporates single sign-on authentication for enhanced security and convenience.

  • Multi-Region Functionality: Supports operations across various AWS regions, making it versatile for global applications.

  • Secure Credential Management: Utilizes local AWS credentials without exposing them to external services, ensuring a high level of security.

  • Local Execution: Runs on the user's machine using their own AWS credentials, allowing for efficient resource management without dependency on external servers.


AWS MCP

The Model Context Protocol (MCP) server enables AI assistants like Claude to interact with your AWS environment, allowing for natural language querying and management of AWS resources.

Features

  • πŸ” Query and modify AWS resources using natural language
  • ☁️ Support for multiple AWS profiles and SSO authentication
  • 🌐 Multi-region support
  • πŸ” Secure credential handling (local credentials used, not exposed)
  • πŸƒβ€β™‚οΈ Local execution with your AWS credentials

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/RafalWilinski/aws-mcp
    cd aws-mcp
    
  2. Install dependencies:

    pnpm install
    # or
    npm install
    

Usage

  1. Open Claude desktop app and go to Settings -> Developer -> Edit Config.

  2. Add the following entry to your claude_desktop_config.json:

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

    Replace /Users/<YOUR USERNAME>/aws-mcp with the actual path to your project directory.

  3. Restart the Claude desktop app.

  4. Start by selecting an AWS profile or jump to action by asking:

    • "List available AWS profiles"
    • "List all EC2 instances in my account"
    • "Show me S3 buckets with their sizes"
    • "What Lambda functions are deployed in us-east-1?"
    • "List all ECS clusters and their services"

Using with nvm

Build from source first and add the following config:

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

Troubleshooting

To see logs:

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

Features in Development

  • MFA support
  • Cache SSO credentials to prevent excessive refreshing