AWS MCP Server
A read-only Model Context Protocol server that exposes over 60 AWS tools across services like EC2, S3, and IAM for AI agent interaction. It features multi-region support, resource caching, and audit logging to provide secure, AI-ready access to AWS infrastructure data.
README
☁️ AWS MCP Server
Read-only Model Context Protocol server for AWS resources — multi-region, caching, audit, and AI-ready.
📋 Overview
This MCP server exposes 60+ read-only tools across AWS services: identity, EC2, S3, IAM, Cost Explorer, CloudWatch, GuardDuty, CloudTrail, ELB, WAF, Route53, ECS, EKS, RDS, Lambda, and more.
| Flow | Description |
|---|---|
| 🔌 | MCP client connects to this server |
| 🛠️ | Server invokes AWS APIs (read-only) |
| 📤 | Returns resources, metrics, cost data to the AI agent |
🛠️ Tech Stack
| Layer | Technology | Purpose |
|---|---|---|
| ☁️ MCP Server | TypeScript, AWS SDK v3 | Protocol handler, tool dispatch |
| 📦 Runtime | Node.js (v18+) | Execution |
| 🔐 Auth | AWS credentials (keys, profiles, SSO) | AWS API calls |
🗣️ Languages
| Language | Used In |
|---|---|
| TypeScript | MCP server, tools, CLI, libs |
| JSON | Config (mcp-config.json), MCP schema |
📁 Project Structure
├── src/
│ ├── index.ts # MCP server entry, tool dispatch, resources, prompts
│ ├── load-env.ts # Loads .env before other modules
│ ├── clients.ts # Shared AWS clients (one per service)
│ ├── cli.ts # Local CLI for testing tools
│ ├── integration.test.ts
│ └── lib/ # config, cache, retry, audit, rate-limit, webhook, etc.
├── docs/ # TOOLS.md, IAM_PERMISSIONS.md, CONFIG.md, TROUBLESHOOTING.md
├── mcp-config.json.example # Optional: webhook, rate limit, defaults (copy to mcp-config.json)
├── Dockerfile # Container image for running the server
└── .env # AWS credentials (copy from .env.example)
⚡ Capabilities
| Feature | Description |
|---|---|
| Multi-region | region parameter on EC2, VPCs, RDS, Lambda tools |
| Pagination | max_results on list_iam_users, list_s3_buckets, list_ecs_clusters, list_dynamodb_tables, list_cloudformation_stacks |
| MCP resources | Browse aws://region/service/id (identity, EC2, S3, cost, RDS, Lambda, GuardDuty) |
| MCP prompts | AI guidance for cost, security, and resource-list queries |
| Caching | Optional in-memory cache (TTL via MCP_AWS_CACHE_TTL) |
| Retry | Exponential backoff for throttled AWS calls |
| Audit log | Log tool invocations when MCP_AWS_AUDIT_LOG=true |
| Dry-run | Mock data when MCP_AWS_DRY_RUN=true (no AWS calls) |
| LocalStack | Set AWS_ENDPOINT_URL=http://localhost:4566 |
| Health check | aws_health_check tool to verify credentials |
| IAM policy | get_iam_policy_for_tools generates least-privilege policy |
| CLI | npm run cli -- get_aws_caller_identity for local testing |
| Config file | mcp-config.json for webhook, rate limit, defaults |
| estimate_cost | Rough cost estimate for EC2, Lambda, RDS, S3 |
| scan_secrets_risks | Find Secrets Manager secrets needing attention |
| Tag filter | tag_filter on list_ec2_instances, list_rds_instances |
| SSO / cross-account | See docs/SSO_AND_CROSS_ACCOUNT.md |
📖 Documentation: TOOLS.md · IAM_PERMISSIONS.md · CONFIG.md · TROUBLESHOOTING.md
🚀 Quick Start
# 1. Configure environment
cp .env.example .env # Add AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
# 2. Install and build
npm install
npm run build
# 3. Test locally (dry-run, no AWS calls)
MCP_AWS_DRY_RUN=true npm run cli -- get_aws_caller_identity
MCP Client Configuration
{
"mcpServers": {
"aws-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY",
"AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_KEY",
"AWS_REGION": "us-east-1"
}
}
}
}
📦 Sharing with Your Team
Option A: Git
- Push to a private repo.
- Team clones, runs
npm install && npm run build. - Point MCP client at
dist/index.js(absolute path).
Option B: Package (.tgz)
npm pack # Creates mcp-server-aws-1.0.0.tgz
npm install -g mcp-server-aws-1.0.0.tgz
Then configure MCP client with "command": "mcp-server-aws".
Option C: Docker
docker build -t mcp-server-aws .
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION mcp-server-aws
🔧 Development
npm run dev # Watch mode
npm run typecheck # TypeScript check (no emit)
npm run cli -- <tool> [--arg key=value] # Test tools locally
npm run lint # ESLint
npm run format # Prettier
npm test # Unit + integration tests (28 tests)
Release: Push a tag (e.g. v1.0.1) to trigger a GitHub release with built artifacts.
👤 Author
Sergio Sediq
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。