AWS CLI MCP server

Bridges AWS CLI with natural language interaction, enabling direct execution of AWS commands for resource management without leaving your conversation interface.
Back to servers
Provider
IcyKallen
Release date
Mar 24, 2025
Language
TypeScript
Stats
2 stars

This server provides an MCP (Model Context Protocol) interface that allows Claude to directly generate and execute AWS CLI commands. It acts as a bridge between the Claude AI model and your AWS resources, enabling you to perform AWS operations through natural language conversations.

Setup and Installation

Prerequisites

  • Node.js (v20 or later recommended)
  • npm or yarn
  • AWS CLI installed and configured with credentials
  • TypeScript

Installation Steps

  1. Clone the repository:

    git clone https://github.com/IcyKallen/aws-cli-mcp-server
    cd aws-cli-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    
  4. Verify AWS CLI configuration:

    aws configure
    
  5. Start the MCP server:

    npm start
    

Integration with Claude Desktop

To connect this server with Claude Desktop, add the following to your claude_desktop_config.json file:

{
  "mcpServers": {
    "aws-cli": {
      "command": "node",
      "args": [
        "/path/to/aws-cli-mcp-server/dist/index.js"
      ]
    }
  }
}

Using the MCP Server

The server provides several powerful tools for AWS CLI interactions:

Available Tools

  • execute-aws-command: Run AWS CLI commands

    • Parameters:
      • command: AWS service (e.g., s3, ec2, lambda)
      • subcommand (optional): Command to execute (e.g., ls, describe-instances)
      • options (optional): Command options as key-value pairs
  • get-service-details: View information about a specific AWS service

    • Parameters:
      • service: AWS service name (e.g., s3, ec2, lambda)

Available Resources

  • aws-services://list: Get a list of all available AWS services

Example Usage Scenarios

Listing S3 Buckets

Simply ask Claude:

I need to list my S3 buckets.

Creating an S3 Bucket

Ask Claude to create a new bucket:

Create a new S3 bucket named "my-test-bucket" in the us-west-2 region.

Exploring EC2 Service Capabilities

Ask Claude about EC2 commands:

What EC2 commands are available?

Security Considerations

The server executes AWS CLI commands with the same permissions as your configured AWS credentials. Be mindful that:

  • The server has the same level of access as your AWS credentials provide
  • Limit access to the server to trusted users
  • For production environments, consider implementing additional authentication mechanisms

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later