Skip to main content

MCP Proxy for AWS

Project description

MCP Proxy for AWS

Overview

The MCP Proxy for AWS serves as a lightweight, client-side bridge between MCP clients (AI assistants and developer tools) and backend AWS MCP servers.

The proxy handles SigV4 authentication using local AWS credentials and provides dynamic tool discovery, making it ideal for developers who want access to AWS Hosted SigV4 secured MCP Servers without complex gateway setups.

Prerequisites

Installation

Using PyPi

# Run the server
uvx mcp-proxy-for-aws@latest <SigV4 MCP endpoint URL>

Using Local Repository

git clone https://github.com/aws/mcp-proxy-for-aws.git
cd mcp-proxy-for-aws
uv run mcp_proxy_for_aws/server.py <SigV4 MCP endpoint URL>

Using Docker

# Build the Docker image
docker build -t mcp-proxy-for-aws .

Configuration Parameters

Parameter Description Default Required
endpoint MCP endpoint URL (e.g., https://your-service.us-east-1.amazonaws.com/mcp) N/A Yes
--- --- --- ---
--service AWS service name for SigV4 signing Inferred from endpoint if not provided No
--profile AWS profile for AWS credentials to use Uses AWS_PROFILE environment variable if not set No
--region AWS region to use Uses AWS_REGION environment variable if not set, defaults to us-east-1 No
--read-only Disable tools which may require write permissions (tools which DO NOT require write permissions are annotated with readOnlyHint=true) False No
--retries Configures number of retries done when calling upstream services, setting this to 0 disables retries. 0 No
--log-level Set the logging level (DEBUG/INFO/WARNING/ERROR/CRITICAL) INFO No
--timeout Set desired timeout in seconds across all operations 180 No
--connect-timeout Set desired connect timeout in seconds 60 No
--read-timeout Set desired read timeout in seconds 120 No
--write-timeout Set desired write timeout in seconds 180 No

Optional Environment Variables

Set the environment variables for the MCP Proxy for AWS:

# Credentials through profile
export AWS_PROFILE=<aws_profile>

# Credentials through parameters
export AWS_ACCESS_KEY_ID=<access_key_id>
export AWS_SECRET_ACCESS_KEY=<secret_access_key>
export AWS_SESSION_TOKEN=<session_token>

# AWS Region
export AWS_REGION=<aws_region>

Setup Examples

Add the following configuration to your MCP client config file (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json): Note Add your own endpoint by replacing <SigV4 MCP endpoint URL>

Running from local - using uv

{
  "mcpServers": {
    "<mcp server name>": {
      "disabled": false,
      "type": "stdio",
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp_proxy_for_aws",
        "run",
        "server.py",
        "<SigV4 MCP endpoint URL>",
        "--service",
        "<your service code>",
        "--profile",
        "default",
        "--region",
        "us-east-1",
        "--read-only",
        "--log-level",
        "INFO",
      ]
    }
  }
}

Using Docker

{
  "mcpServers": {
    "<mcp server name>": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "--volume",
        "/full/path/to/.aws:/app/.aws:ro",
        "mcp-proxy-for-aws",
        "<SigV4 MCP endpoint URL>"
      ],
      "env": {}
    }
  }
}

Development & Contributing

For development setup, testing, and contribution guidelines, see:

Resources to understand SigV4:

License

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License").

Disclaimer

This mcp-proxy-for-aws package is provided "as is" without warranty of any kind, express or implied, and is intended for development, testing, and evaluation purposes only. We do not provide any guarantee on the quality, performance, or reliability of this package. LLMs are non-deterministic and they make mistakes, we advise you to always thoroughly test and follow the best practices of your organization before using these tools on customer facing accounts. Users of this package are solely responsible for implementing proper security controls and MUST use AWS Identity and Access Management (IAM) to manage access to AWS resources. You are responsible for configuring appropriate IAM policies, roles, and permissions, and any security vulnerabilities resulting from improper IAM configuration are your sole responsibility. By using this package, you acknowledge that you have read and understood this disclaimer and agree to use the package at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_proxy_for_aws-1.0.0.tar.gz (259.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_proxy_for_aws-1.0.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_proxy_for_aws-1.0.0.tar.gz.

File metadata

  • Download URL: mcp_proxy_for_aws-1.0.0.tar.gz
  • Upload date:
  • Size: 259.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for mcp_proxy_for_aws-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cfd96543acbc1c7bc5e613c89b7eb549a85047d1222b5ea8e938bba71b712936
MD5 ce1819cfb61d77f3ab599d7c44606d3b
BLAKE2b-256 e57dbc972434b11293e964c96e57291bb0c1ac4413421fbba1a934807a6ceb60

See more details on using hashes here.

File details

Details for the file mcp_proxy_for_aws-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_proxy_for_aws-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71e43616a77711754e323328275d2c2d11e2581984dfaecc1191246205ec7130
MD5 45477ad625a9b39fdf347a42c5c75d50
BLAKE2b-256 13b0baebbe29f9eaef7ea236cb21b97545551213521833c5948464f3fe73f479

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page