AWS CLI MCP Server

io.github.musaddiq-dev由 GitHub 帳號 musaddiq-dev 發布v0.1.2更新於 Oct 24, 2026

Python MCP server for AWS CLI inspection and operations

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理透過 AWS CLI 執行指令、建議指令、查詢區域並檢查呼叫者身分。

可以做什麼
以 shell 風格解析參數且不經 shell 展開來執行 AWS CLI 指令,保留引號參數並攔截 shell 運算子。依自然語言請求建議常用 AWS CLI 指令。列出可用的 AWS 區域並回傳目前呼叫者身分。驗證設定,並將日誌寫入 stderr 與本機日誌檔。
適用情境
適合在桌面 MCP 用戶端中讓助理透過 AWS CLI 檢視或操作 AWS 帳戶,例如查詢區域、確認目前生效的身分,或在人工審核下執行限定範圍的指令。建議用於非生產環境或最小權限設定,且能接受指令執行風險時使用。
執行需求
以 uvx 從 PyPI 套件 mdev-aws-mcp-server 執行的本機程序。需要 Python 3.12+、PATH 中可用的 AWS CLI v2,以及透過 profile、SSO、環境變數或 IAM 角色設定的 AWS 憑證。選用設定包括 AWS_PROFILE、AWS_REGION、AWS_MCP_WORKING_DIR、AWS_MCP_REQUIRE_CONFIRMATION 和 AWS_MCP_LOG_LEVEL。
安裝前請注意
此伺服器使用程序可用的憑證執行 AWS CLI 指令,因此可能修改或刪除 AWS 資源。攔截 shell 運算子和標示危險指令不能取代 IAM 最小權限與人工審核。請使用限定範圍的 profile,避免長期存取金鑰,將 call_aws 保持為手動核准,且不要透過網路暴露此伺服器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AWS CLI MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

bash
uvx mdev-aws-mcp-server

For local development from source:

bash
git clone https://github.com/musaddiq-dev/aws-cli-mcp-server.gitcd aws-cli-mcp-serverpython -m venv .venvsource .venv/bin/activatepip 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.

bash
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

bash
mdev-aws-mcp-server

From a local checkout before PyPI publication, run:

bash
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:

json
{  "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:

json
{  "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

bash
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:

json
{  "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

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

Smoke Check

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

Manual AWS check, if credentials are configured:

bash
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

來源:README.md,提交 989a081

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分