mcp-server-aws

MCP server providing tools for interacting with AWS services

TypeScript API/Service v1.0.0

Executive Summary

An MCP (Model Context Protocol) server that exposes AWS service operations as MCP tools, enabling AI assistants to interact with AWS infrastructure. Provides 7 tools covering EC2 instance listing, S3 bucket and object operations, Lambda function invocation, CloudWatch metrics retrieval, IAM role listing, and STS identity verification. Uses the AWS SDK v3 with individual service client packages and communicates via stdio transport for integration with MCP clients like Claude Desktop.

Overview

TypeScript
Language
API/Service
Category
8
Dependencies
7
MCP Tools
6
AWS Services
MIT
License

Architecture Diagram

MCP Client
Claude Desktop / IDE
| stdio transport |
MCP Server Entry
src/index.ts
v
ec2_list_instances
s3_list_buckets
s3_get_object
lambda_invoke
cloudwatch_get_metrics
iam_list_roles
sts_get_caller_identity
MCP Tool Handlers
v
EC2
S3
Lambda
CloudWatch
IAM
STS
AWS Services (via AWS SDK v3)

Component Breakdown

ToolFileAWS ServiceParameters
ec2_list_instancessrc/tools/ec2_list_instances.tsEC2region?, filters?
s3_list_bucketssrc/tools/s3_list_buckets.tsS3none
s3_get_objectsrc/tools/s3_get_object.tsS3bucket, key
lambda_invokesrc/tools/lambda_invoke.tsLambdafunction_name, payload?
cloudwatch_get_metricssrc/tools/cloudwatch_get_metrics.tsCloudWatchnamespace, metric_name, dimensions?, period?, start_time, end_time
iam_list_rolessrc/tools/iam_list_roles.tsIAMpath_prefix?, max_items?
sts_get_caller_identitysrc/tools/sts_get_caller_identity.tsSTSnone

Data Flow / Request Flow

  1. Client Connection -- MCP client (e.g., Claude Desktop) connects to the server via stdio transport.
  2. Tool Discovery -- Client discovers available tools via the MCP protocol handshake.
  3. Tool Invocation -- Client sends a tool call with name and parameters (validated via Zod schemas).
  4. AWS API Call -- The tool handler creates the appropriate AWS SDK v3 client and makes the API call.
  5. Response -- AWS response is serialized and returned to the MCP client via stdio.

Security Controls

ControlImplementation
AWS AuthenticationStandard AWS credential chain: env vars, profiles, IAM roles
Input ValidationZod schema validation for all tool parameters
Least PrivilegeEach tool requires only specific AWS IAM permissions
No Persistent StateServer is stateless; no credentials stored on disk
Transport Securitystdio transport (local process); Docker isolation for remote

Industry Adaptation

Healthcare

AI-assisted HIPAA-compliant infrastructure monitoring. EC2 instance auditing for PHI workloads. CloudWatch alerts for healthcare application SLAs.

Finance

Lambda invocation for real-time transaction processing. IAM role auditing for SOX compliance. CloudWatch metrics for trading system latency.

Government

GovCloud region support. IAM role compliance auditing. S3 bucket policy verification for classified data handling.

Retail

S3 catalog management. Lambda-based order processing triggers. EC2 fleet monitoring during peak sales events.

SaaS

Multi-region EC2 fleet management. S3 tenant data access. CloudWatch dashboards for service health monitoring.

Production Readiness Checklist

Configuration / Environment Variables

VariableRequiredDefaultDescription
AWS_ACCESS_KEY_IDYes*--AWS access key ID (*if not using profile/role)
AWS_SECRET_ACCESS_KEYYes*--AWS secret access key
AWS_REGIONNous-east-1AWS region
AWS_PROFILENo--AWS profile name

Deployment

Standalone

npm install
npm run build
npm start

Docker

docker build -t mcp-server-aws .
docker run \
  -e AWS_ACCESS_KEY_ID=xxx \
  -e AWS_SECRET_ACCESS_KEY=xxx \
  mcp-server-aws

Links

Repositorygithub.com/your-org/mcp-server-aws
READMEREADME.md
LicenseMIT License