Cover image
Try Now
2025-03-30

使用AWS CDK的普通AWS服务(位置,S3,Aurora PG数据API)的可部署MCP服务器。

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

AWS Common MCP Servers with CDK Deployment

This project provides deployable Model Context Protocol (MCP) servers for common AWS services, along with AWS Cloud Development Kit (CDK) code (Python) to provision the necessary infrastructure for running these servers, typically on ECS Fargate.

The goal is to offer reusable components that AI developers (e.g., using Amazon Bedrock, LangChain) can easily deploy into their AWS accounts to interact with AWS services through the standardized MCP interface.

Included MCP Servers

  1. AWS Location Service: (TypeScript) Exposes functionalities like searching places, getting place details, calculating routes, etc. Based on the aws-location-server.
  2. Amazon S3: (Python) Provides tools for basic S3 operations like listing buckets/objects, getting, putting, and deleting objects.
  3. Amazon Aurora PostgreSQL (via RDS Data API): (Python) Allows executing SQL statements against a specified Aurora PostgreSQL cluster using the secure RDS Data API.

Prerequisites

  • AWS Account
  • AWS CLI configured locally with appropriate permissions (for CDK deployment). Credentials should be set up via ~/.aws/credentials or environment variables.
  • Node.js and npm (for the Location Service server build process and CDK)
  • Python 3.9+ (for CDK and Python-based MCP servers)
  • AWS CDK CLI (npm install -g aws-cdk)
  • Docker (running locally for CDK to build container images)
  • Git

Specific Prerequisites for Aurora PostgreSQL Data API Server:

  • An existing Aurora PostgreSQL-Compatible cluster running in your target AWS region.
  • The cluster must have the RDS Data API enabled.
  • An AWS Secrets Manager secret containing the database credentials (username, password) for the cluster. The ARN of this secret is required for deployment.

Project Structure

aws-mcp-infra/
├── mcp_servers/             # Source code for the MCP servers
│   ├── location_service/    # TypeScript server for AWS Location Service
│   ├── s3/                  # Python server for S3
│   └── aurora_pg_data_api/  # Python server for Aurora PG Data API
├── cdk_deployment/          # AWS CDK code (Python)
│   ├── app.py               # CDK App entry point
│   ├── cdk.json             # CDK configuration
│   ├── requirements.txt     # CDK Python dependencies
│   └── aws_mcp_infra/       # CDK Stack definitions
│       ├── __init__.py
│       ├── location_service_stack.py
│       ├── s3_stack.py
│       └── aurora_pg_data_api_stack.py
├── .gitignore
└── README.md                # This file

Deployment

  1. Clone the Repository:
    git clone https://github.com/vAirpower/aws-common-mcp-servers.git
    cd aws-common-mcp-servers
    
  2. Configure Aurora Prerequisites (if deploying Aurora server):
    • Ensure your Aurora PostgreSQL cluster exists and has the Data API enabled.
    • Create a secret in AWS Secrets Manager (same region as deployment) containing the DB credentials (e.g., keys username, password).
    • Update the db_cluster_arn and db_secret_arn variables in cdk_deployment/aws_mcp_infra/aurora_pg_data_api_stack.py with your specific cluster ARN and the ARN of the secret you created.
  3. Install CDK Dependencies:
    cd cdk_deployment
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    
  4. Bootstrap CDK (if first time using CDK in this account/region):
    cdk bootstrap aws://ACCOUNT-NUMBER/REGION # Replace with your AWS account number and region
    
  5. Deploy Stacks: Deploy all stacks (creates VPC, Cluster, and all three services):
    cdk deploy --all --require-approval never
    
    Or deploy specific stacks:
    cdk deploy LocationServiceMcpStack S3McpStack AuroraPgDataApiMcpStack --require-approval never
    

Deployment will build the Docker images for each server, push them to ECR repositories created by CDK, and provision the ECS Fargate services.

Usage

Once deployed, the MCP servers run as tasks within ECS Fargate services. They are not publicly exposed by default. Interaction typically occurs from within your AWS environment:

  • From Lambda Functions / Bedrock Agents: Use the AWS SDK (e.g., boto3 for Python) to invoke the ECS tasks or potentially interact via AWS Systems Manager Session Manager (if configured). The exact mechanism depends on how the client application is designed to communicate with MCP servers running in ECS.
  • Local Testing (Requires Adaptation): To test these servers locally before deployment, you would typically run them directly (node build/index.js or python aurora_pg_data_api_server.py) after installing their respective dependencies (npm install or pip install -r requirements.txt) and ensuring your local environment has AWS credentials configured. For the Aurora server, you'd also need to set the DB_CLUSTER_ARN and DB_SECRET_ARN environment variables locally.

Cleanup

To remove all deployed resources, run:

cd cdk_deployment
source .venv/bin/activate
cdk destroy --all

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

    Reviews

    5 (1)
    Avatar
    user_iruabNst
    2025-04-16

    I'm thoroughly impressed with the aws-common-mcp-servers by vAirpower. This tool has streamlined my AWS management and MCP applications exceptionally well. The user interface is intuitive, and the setup was straightforward. It offers robust functionality, making server management hassle-free. Highly recommend checking it out on GitHub!