Skip to main content

A simple implementation of an AWS CLI MCP server with read/write tools for executing AWS CLI commands

Project description

AWS CLI MCP Server

A simple implementation of an AWS CLI MCP server.

Overview

This MCP server provides a bridge to execute AWS CLI commands through two main tools:

  • aws_cli_read: For read-only AWS operations (listing resources, describing configurations, etc.)
  • aws_cli_write: For write operations (creating/modifying/deleting AWS resources, pricing queries)

Features

  • Execute AWS CLI commands safely through MCP tools
  • Separate read and write permissions for better security control
  • Built-in timeout protection (5 minutes)
  • Error handling and output capture
  • Support for complex bash scripts and command consolidation
  • Automatic AWS profile management via environment variable

Usage

The server exposes two tools that can execute AWS CLI commands:

  1. Read Operations: Use aws_cli_read for queries and listing operations
  2. Write Operations: Use aws_cli_write for modifications and resource management

Both tools require:

  • script: The AWS CLI command or bash script to execute
  • reasoning: Explanation for why the operation is needed

Setup

AWS SSO Configuration

To use this server with AWS IAM Identity Center (SSO), you'll need to configure your AWS CLI with SSO authentication first follow this guide.

Run Server

Locally:

# Using uvx (recommended)
uvx --env AWS_PROFILE=your-sso-profile aws-cli-mcp-server

Using JSON configuration file with profile:

{
  "mcpServers": {
    "aws-cli-mcp-server": {
      "command": "uvx",
      "args": [
        "aws-cli-mcp-server"
      ],
      "env": {
        "AWS_PROFILE": your-sso-profile
      }
    }
  }
}

or with secret key:

{
  "mcpServers": {
    "aws-cli-mcp-server": {
      "command": "uvx", 
      "args": [
        "aws-cli-mcp-server"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "your-access-key",
        "AWS_SECRET_ACCESS_KEY": "your-secret-key",
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_cli_mcp_server-1.0.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cli_mcp_server-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file aws_cli_mcp_server-1.0.1.tar.gz.

File metadata

  • Download URL: aws_cli_mcp_server-1.0.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for aws_cli_mcp_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 01eab99d88883941d87bd5dd77a3d0fd106876a7750ada3927708130993bae4a
MD5 0df326df3f9f55dee7f5041e006c8b08
BLAKE2b-256 b25c2788108d5eb6e588a6761e56743af447bcea62976df73f27688ff6b140b9

See more details on using hashes here.

File details

Details for the file aws_cli_mcp_server-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_cli_mcp_server-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbded52cb80534de3de5cdc02dfd9bef141bec6d2d4430ca1433f5dbd4a822f6
MD5 e1e8f69bf6227d708f3a17830dff1ee8
BLAKE2b-256 87e5aedf5d9bbfc726225e3efe24c076a4849b9da410d79bbde0d660cb07bffe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page