mcpField
A
AWS CLI MCP Server

AWS CLI MCP Server

Local
github.com/musaddiq-devCloud & Infra0Updated 23w ago

About AWS CLI MCP Server

AWS CLI MCP Server lets MCP clients inspect and operate AWS through the AWS CLI, for users managing AWS resources. It combines command execution with suggestions and basic account and region lookups, with safeguards for shell operators and destructive-looking commands.

Key features

  1. 01Run AWS CLI commands
  2. 02Suggest commands from natural language
  3. 03List available AWS regions
  4. 04Check caller identity
  5. 05Flag destructive-looking operations

Use cases

  1. 01Inspect AWS account identity
  2. 02Find a command for an AWS task
  3. 03Run AWS CLI operations from an MCP client

MCP support

It exposes AWS CLI execution, command suggestions, region lookup, and caller identity tools to MCP clients over stdio. Commands run with the credentials available to the server process.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"musaddiq-dev-aws-cli": {
"command": "uvx",
"args": [
"mdev-aws-mcp-server"
],
"env": {
"AWS_REGION": "<AWS_REGION>",
"AWS_PROFILE": "<AWS_PROFILE>",
"AWS_MCP_WORKING_DIR": "<AWS_MCP_WORKING_DIR>",
"AWS_MCP_REQUIRE_CONFIRMATION": "<AWS_MCP_REQUIRE_CONFIRMATION>",
"AWS_MCP_LOG_LEVEL": "<AWS_MCP_LOG_LEVEL>"
}
}
}
}
Run commanduvx mdev-aws-mcp-server
Environment variables to set
AWS_REGIONDefault AWS region
AWS_PROFILEAWS credentials profile
AWS_MCP_WORKING_DIRWorking directory for file operations
AWS_MCP_REQUIRE_CONFIRMATIONEmit warnings for destructive-looking operations
AWS_MCP_LOG_LEVELApplication log level

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimdev-aws-mcp-server0.1.2

Tools

4

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
cli_commandstringYesThe complete AWS CLI command to execute. MUST start with 'aws'
max_resultsanyNoOptional limit for number of results (useful for pagination)

Details

From the project README

AWS MCP Server

A Python Model Context Protocol (MCP) server that lets MCP-compatible clients inspect and operate AWS through the AWS CLI. It supports command execution with validation, command suggestions, AWS region lookup, and caller identity checks.

Features

  • Execute AWS CLI commands without shell expansion, preserving quoted arguments with shell-style parsing
  • Suggest common AWS CLI commands from natural language requests
  • Return available AWS regions
  • Return the current caller identity
  • Support stdio transport for local MCP clients
  • Validate configuration and write logs to stderr plus a local log file

Safety Model

This server can execute AWS CLI commands using the credentials available to the process. It blocks shell operators by using subprocess.run(..., shell=False) and flags destructive-looking commands, but it cannot replace IAM least privilege or human review. Use scoped AWS profiles or roles, prefer non-production accounts for testing, and keep destructive commands on manual approval in your MCP client.

Requirements

Installation

When published to PyPI, install or run the server like a standard Python MCP package:

uvx mdev-aws-mcp-server

For local development from source:

git clone https://github.com/musaddiq-dev/aws-cli-mcp-server.git
cd aws-cli-mcp-server
python -m venv .venv
source .venv/bin/activate
pip install -e .

Configuration

Before running this server, install the AWS CLI using the official AWS CLI install guide, then configure credentials using the official AWS CLI sign-in guide and AWS CLI configuration guide. AWS recommends short-term credentials where possible; avoid long-term IAM user keys unless your use case requires them.

Copy the example environment file and adjust values as needed.

cp .env.example .env
VariableDescriptionDefault
AWS_REGIONDefault AWS regionus-east-1
AWS_PROFILEAWS credentials profiledefault
AWS_MCP_WORKING_DIRWorking directory for file operations/tmp/aws-mcp-work
AWS_MCP_REQUIRE_CONFIRMATIONEmit warnings for destructive-looking operationstrue
AWS_MCP_LOG_LEVELApplication log levelINFO

Running

mdev-aws-mcp-server

From a local checkout before PyPI publication, run:

python -m aws_mcp_server.server

MCP Client Configuration

For published installs, prefer uvx. MCP servers using stdio must write protocol messages only to stdout; this server writes logs to stderr and a local file under ~/.aws-mcp-server/logs.

Claude Desktop / Cursor / Windsurf / Cline

Most MCP clients accept this mcpServers JSON shape:

{
  "mcpServers": {
    "aws": {
      "command": "uvx",
      "args": ["mdev-aws-mcp-server"],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}

For local development from this repository, use the installed console script path instead:

{
  "mcpServers": {
    "aws": {
      "command": "/absolute/path/to/aws-cli-mcp-server/.venv/bin/mdev-aws-mcp-server",
      "args": [],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
Claude Code CLI
claude mcp add aws --env AWS_PROFILE=default --env AWS_REGION=us-east-1 -- uvx mdev-aws-mcp-server
VS Code MCP

VS Code uses the same command/args/env model in its MCP configuration:

{
  "servers": {
    "aws": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mdev-aws-mcp-server"],
      "env": {
        "AWS_PROFILE": "default",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}

Tools

ToolPurposeSafety
call_awsExecute an AWS CLI commandCan modify AWS resources
suggest_aws_commandsSuggest common AWS CLI commandsRead-only
get_aws_regionsList AWS regionsRead-only
get_caller_identityReturn current AWS identityRead-only

Development

pip install -e .
pip install -e '.[dev]'
pytest
ruff check .
ruff format .
pyright

Smoke Check

python -m py_compile src/aws_mcp_server/server.py src/aws_mcp_server/config.py src/aws_mcp_server/aws/executor.py
python -m pytest

Manual AWS check, if credentials are configured:

aws sts get-caller-identity

Distribution

This server is published through the standard Python MCP distribution path:

  • PyPI package: mdev-aws-mcp-server
  • MCP Registry name: io.github.musaddiq-dev/aws-cli-mcp-server
  • Runtime hint: uvx
  • Transport: stdio

The mcp-name marker at the top of this README is required for MCP Registry ownership verification. Users should prefer uvx mdev-aws-mcp-server in local MCP client configurations.

Security Notes

  • Do not commit .env, AWS credentials, profiles, access keys, or account-specific outputs.
  • Use least-privilege IAM permissions for the profile or role running this server.
  • Keep call_aws on explicit manual approval in your MCP client.
  • Do not expose this server over a network without adding authentication, TLS, and network controls.
  • Review generated command suggestions before executing them.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.