freshcrate
Skin:/
Home > MCP Servers > mcp-proxy-for-aws

mcp-proxy-for-aws

AWS MCP Proxy Server

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

AWS MCP Proxy Server

README

MCP Proxy for AWS

Overview

The MCP Proxy for AWS package provides two ways to connect AI applications to MCP servers on AWS:

  1. Using it as a proxy - It becomes a lightweight, client-side bridge between MCP clients (AI assistants like Claude Desktop, Kiro CLI) and MCP servers on AWS. (See MCP Proxy)
  2. Using it as a library - Programmatically connect popular AI agent frameworks (LangChain, LlamaIndex, Strands Agents, etc.) to MCP servers on AWS. (See Programmatic Access)

When Do You Need This Package?

  • You want to connect to MCP servers on AWS (e.g., using Amazon Bedrock AgentCore) that use AWS IAM authentication (SigV4) instead of OAuth
  • You're using MCP clients (like Claude Desktop, Kiro CLI) that don't natively support AWS IAM authentication
  • You're building AI agents with popular frameworks like LangChain, Strands Agents, LlamaIndex, etc., that need to connect to MCP servers on AWS
  • You want to avoid building custom SigV4 request signing logic yourself

How This Package Helps

The Problem: The official MCP specification supports OAuth-based authentication, but MCP servers on AWS can also use AWS IAM authentication (SigV4). Standard MCP clients don't know how to sign requests with AWS credentials.

The Solution: This package bridges that gap by:

  • Handling SigV4 authentication automatically - Uses your local AWS credentials (from AWS CLI, environment variables, or IAM roles) to sign all MCP requests using SigV4
  • Providing seamless integration - Works with existing MCP clients and frameworks
  • Eliminating custom code - No need to build your own MCP client with SigV4 signing logic

Which Feature Should I Use?

Use as a proxy if you want to:

  • Connect MCP clients like Claude Desktop or Kiro CLI to MCP servers on AWS with IAM credentials
  • Add MCP servers on AWS to your AI assistant's configuration
  • Use a command-line tool that runs as a bridge between your MCP client and AWS

Use as a library if you want to:

  • Build AI agents programmatically using popular frameworks like LangChain, Strands Agents, or LlamaIndex
  • Integrate AWS IAM-secured MCP servers directly into your Python applications
  • Have fine-grained control over the MCP session lifecycle in your code

Prerequisites


MCP Proxy

The MCP Proxy serves as a lightweight, client-side bridge between MCP clients (AI assistants and developer tools) and IAM-secured MCP servers on AWS. The proxy handles SigV4 authentication using local AWS credentials and provides dynamic tool discovery.

Installation

Using PyPi

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

Note: The first run may take tens of seconds as uvx downloads and caches dependencies. Subsequent runs will start in seconds. Actual startup time depends on your network and hardware.

Using a 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

Docker images are published to the public AWS ECR registry.

You can use the pre-built image:

# Pull the latest image
docker pull public.ecr.aws/mcp-proxy-for-aws/mcp-proxy-for-aws:latest

# Or pull a specific version
docker pull public.ecr.aws/mcp-proxy-for-aws/mcp-proxy-for-aws:1.1.6

Or build the image locally:

# 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, if omitted we try to infer this from the url 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
--metadata Metadata to inject into MCP requests as key=value pairs (e.g., --metadata KEY1=value1 KEY2=value2) AWS_REGION is automatically injected based on --region if not provided 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
--tool-timeout Maximum seconds a tool call may take before being cancelled. When set, returns a graceful error to the agent instead of hanging indefinitely 300 No
--disable-telemetry Disables telemetry data collection False 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 Kiro CLI, edit ~/.kiro/settings/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",
      ]
    }
  }
}

Note

Cline users should not use --log-level argument because Cline checks the log messages in stderr for text "error" (case insensitive).

Using Docker

Using the pre-built public ECR image:

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

Or using a locally built image:

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

Programmatic Access

The MCP Proxy for AWS enables programmatic integration of IAM-secured MCP servers into AI agent frameworks. The library provides authenticated transport layers that work with popular Python AI frameworks.

By default, the library resolves AWS credentials automatically from the standard boto3 credential chain (environment variables, shared credentials file, etc.). You can optionally pass credentials programmatically via the credentials parameter. When provided, these take precedence over the aws_profile parameter. Note that aws_region must be explicitly specified when using credentials.

from botocore.credentials import Credentials
from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

creds = Credentials(access_key="...", secret_key="...", token="...")

mcp_client = aws_iam_streamablehttp_client(
    endpoint=mcp_url,
    aws_region=region,
    aws_service=service,
    credentials=creds,  # Optional: explicitly pass AWS credentials
)

Integration Patterns

The library supports two integration patterns depending on your framework:

Pattern 1: Client Factory Integration

Use with: Frameworks that accept a factory function that returns an MCP client, e.g. Strands Agents, Microsoft Agent Framework. The aws_iam_streamablehttp_client is passed as a factory to the framework, which handles the connection lifecycle internally.

Example - Strands Agents:

from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

mcp_client_factory = lambda: aws_iam_streamablehttp_client(
    endpoint=mcp_url,    # The URL of the MCP server
    aws_region=region,   # The region of the MCP server
    aws_service=service  # The underlying AWS service, e.g. "bedrock-agentcore"
)

with MCPClient(mcp_client_factory) as mcp_client:
    mcp_tools = mcp_client.list_tools_sync()
    agent = Agent(tools=mcp_tools, ...)

Example - Microsoft Agent Framework:

from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

mcp_client_factory = lambda: aws_iam_streamablehttp_client(
    endpoint=mcp_url,    # The URL of the MCP server
    aws_region=region,   # The region of the MCP server
    aws_service=service  # The underlying AWS service, e.g. "bedrock-agentcore"
)

mcp_tools = MCPStreamableHTTPTool(name="MCP Tools", url=mcp_url)
mcp_tools.get_mcp_client = mcp_client_factory

async with mcp_tools:
    agent = ChatAgent(tools=[mcp_tools], ...)

Pattern 2: Direct MCP Session Integration

Use with: Frameworks that require direct access to the MCP sessions, e.g. LangChain, LlamaIndex. The aws_iam_streamablehttp_client provides the authenticated transport streams, which are then used to create an MCP ClientSession.

Example - LangChain:

from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

mcp_client = aws_iam_streamablehttp_client(
    endpoint=mcp_url,    # The URL of the MCP server
    aws_region=region,   # The region of the MCP server
    aws_service=service  # The underlying AWS service, e.g. "bedrock-agentcore"
)

async with mcp_client as (read, write, session_id_callback):
    async with ClientSession(read, write) as session:
        mcp_tools = await load_mcp_tools(session)
        agent = create_langchain_agent(tools=mcp_tools, ...)

Example - LlamaIndex:

from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

mcp_client = aws_iam_streamablehttp_client(
    endpoint=mcp_url,    # The URL of the MCP server
    aws_region=region,   # The region of the MCP server
    aws_service=service  # The underlying AWS service, e.g. "bedrock-agentcore"
)

async with mcp_client as (read, write, session_id_callback):
    async with ClientSession(read, write) as session:
        mcp_tools = await McpToolSpec(client=session).to_tool_list_async()
        agent = ReActAgent(tools=mcp_tools, ...)

Running Examples

Explore complete working examples for different frameworks in the ./examples/mcp-client directory:

Available examples:

Run examples individually:

cd examples/mcp-client/[framework]  # e.g. examples/mcp-client/strands
uv run main.py

Installation

The client library is included when you install the package:

pip install mcp-proxy-for-aws

For development:

git clone https://github.com/aws/mcp-proxy-for-aws.git
cd mcp-proxy-for-aws
uv sync

Troubleshooting

Authentication errors

We try to autodetect the service from the url, sometimes this fails, ensure that --service is set correctly to the service you are attempting to connect to. Otherwise the SigV4 signing will not be able to be verified by the service you connect to, resulting in this error. Also ensure that you have valid IAM credentials on your machine before retrying.

For long-running sessions, consider using long-lived credentials:

  • Use an AWS profile via --profile
  • Use IAM Identity Center and run aws sso login before starting the proxy

Client hangs on tool calls

If your MCP client hangs waiting for a tool call response (e.g., due to expired credentials or an unresponsive endpoint), use --tool-timeout to set a maximum duration in seconds for each tool call. When the timeout is exceeded, the proxy returns a graceful error to the agent instead of hanging indefinitely.

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

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.

Release History

VersionChangesUrgencyDate
v1.6.0## Added - Per-call AWS profile override middleware for dynamic credential switching (#266) ## Fixed - Always read fresh credentials from disk on every request instead of caching and refreshing reactively on auth errors (#294) - Prevent credential_process hang on Windows in stdio transport mode (#293)High5/29/2026
v1.5.0## Added - `--skip-auth` flag to allow unsigned requests when AWS credentials are unavailable (#260)High5/22/2026
v1.4.2## What's Changed * fix: pass-through server capabilities by @arnewouters in https://github.com/aws/mcp-proxy-for-aws/pull/264 **Full Changelog**: https://github.com/aws/mcp-proxy-for-aws/compare/v1.4.1...v1.4.2High4/30/2026
v1.4.1## What's Changed * chore(deps): update uv: bump pypdf from 6.10.0 to 6.10.1 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/249 * chore(deps): update uv: bump python-multipart from 0.0.20 to 0.0.26 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/250 * chore(deps): update uv: bump langsmith from 0.4.59 to 0.7.31 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/251 * chore(deps): update uv: bump authlib from 1.6.6 to 1.6.9 by @depeHigh4/29/2026
v1.4.0## What's Changed ### Fixes - fix: refresh stale credentials on auth failure without restart (#245) - fix(auth): remove sensitive credential logging (#242) - fix: remove fast fail credential check from create_aws_session (#233) - fix: disable SBOM upload to immutable GitHub release (#247) - fix: increase test timeout for integration tests (#165) ### Chores - chore: schedule dependabot PRs at 7 AM monday (#246) - chore: bump version to 1.4.0 (#248) - chore(deps): update uv dependencies (#243, #High4/15/2026
v1.3.0## What's Changed * fix: grant contents write for SBOM release asset upload by @anasstahr in https://github.com/aws/mcp-proxy-for-aws/pull/236 * chore(deps): update uv: bump langchain-core from 1.2.1 to 1.2.28 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/235 * chore(deps): update uv: bump requests from 2.32.5 to 2.33.0 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/209 * chore(deps): update uv: bump pygments from 2.19.2 to 2.20.0 by @dependabot[bHigh4/10/2026
v1.2.0## What's Changed * docs: update MCP client examples from Amazon Q Developer CLI to Kiro CLI by @mazyu36 in https://github.com/aws/mcp-proxy-for-aws/pull/149 * chore(deps): update uv: bump python-multipart from 0.0.20 to 0.0.22 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/152 * chore(deps): update uv: bump filelock from 3.20.0 to 3.20.3 by @dependabot[bot] in https://github.com/aws/mcp-proxy-for-aws/pull/145 * chore(deps): update uv: bump virtualenv from 20.35.4 to 20High4/9/2026
v1.1.6## What's Changed * chore: Add support for Python 3.14 by @clareliguori in https://github.com/aws/mcp-proxy-for-aws/pull/134 * Add ownership verification for EKS/ECS MCPs for registry by @djtung in https://github.com/aws/mcp-proxy-for-aws/pull/105 ## New Contributors * @clareliguori made their first contribution in https://github.com/aws/mcp-proxy-for-aws/pull/134 * @djtung made their first contribution in https://github.com/aws/mcp-proxy-for-aws/pull/105 **Full Changelog**: https://Low1/29/2026
v1.1.5## What's Changed * Add ownership verification for aws-mcp by @awsjjzhou in https://github.com/aws/mcp-proxy-for-aws/pull/116 * fix: reuse the boto3 session to sign request by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/122 * chore: Run integ test on pull request by @arangatang in https://github.com/aws/mcp-proxy-for-aws/pull/121 * chore: add automated license header checks to pre-commit by @detti456 in https://github.com/aws/mcp-proxy-for-aws/pull/123 * chore: Disable integ tLow12/15/2025
v1.1.4## What's Changed * fix: connect remote mcp client immediately in the initialize middleware by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/114, this should fix the experience in ClaudeCode and Cursor if the user has invalid AWS credentials. **Full Changelog**: https://github.com/aws/mcp-proxy-for-aws/compare/v1.1.3...v1.1.4Low12/4/2025
v1.1.3## What's Changed * docs: update README for uvx latency by @awsjjzhou in https://github.com/aws/mcp-proxy-for-aws/pull/94 * fix: write initialize error to stdout by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/95 * fix: use factory to refresh session once it is finished by @arnewouters in https://github.com/aws/mcp-proxy-for-aws/pull/97 * fix: do not write result to stdout by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/98 * bump: version 1.1.1 โ†’ 1.1.2 by @wzxxing Low12/4/2025
v1.1.2## What's Changed * docs: update README for uvx latency by @awsjjzhou in https://github.com/aws/mcp-proxy-for-aws/pull/94 * fix: write initialize error to stdout by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/95 * fix: use factory to refresh session once it is finished by @arnewouters in https://github.com/aws/mcp-proxy-for-aws/pull/97 * fix: do not write result to stdout by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/98 ## New Contributors * @awsjjzhou made tLow11/27/2025
v1.1.1## What's Changed * fix: pass connected client to proxy to reuse session by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/88 * Revert "test(Increase-timeout-of-integrationt-test.): Increase timeouโ€ฆ by @wzxxing in https://github.com/aws/mcp-proxy-for-aws/pull/89 * bump: version 1.1.0 โ†’ 1.1.1 by @arangatang in https://github.com/aws/mcp-proxy-for-aws/pull/91 **Full Changelog**: https://github.com/aws/mcp-proxy-for-aws/compare/v1.1.0...v1.1.1Low11/19/2025
v1.1.0## What's Changed * docs: Remove --endpoint from DEVELOPMENT.md by @arangatang in https://github.com/aws/mcp-proxy-for-aws/pull/64 * fix: f-strings formatting in logging by @konippi in https://github.com/aws/mcp-proxy-for-aws/pull/67 * fix: correct log_level type annotation in add_logging_middleware by @mazyu36 in https://github.com/aws/mcp-proxy-for-aws/pull/68 * refactor(cli): extract argument parsing to separate module by @konippi in https://github.com/aws/mcp-proxy-for-aws/pull/70 * fiLow11/14/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

sample-getting-started-with-strands-agents-courseLearn to build AI agents with Strands framework. Covers LLM integration via Amazon Bedrock/Anthropic, AWS service connections, tool implementation with MCP/A2A protocols, and agent evaluation using Lamain@2026-06-05
mcpOfficial MCP Servers for AWS2026.06.20260603172743
hybrid-orchestrator๐Ÿค– Implement hybrid human-AI orchestration patterns in Python to coordinate agents, manage sessions, and enable smooth AI-human handoffs.master@2026-06-02
sqltools_mcp๐Ÿ”Œ Access multiple databases seamlessly with SQLTools MCP, a versatile service supporting MySQL, PostgreSQL, SQL Server, DM8, and SQLite without multiple servers.main@2026-06-07
kagglerun๐Ÿš€ Run Python on Kaggle's free GPUs directly from your terminal without the need for a browser, streamlining your data science workflow.master@2026-06-07

More from aws

bedrock-agentcore-sdk-pythonPython SDK for transforming any AI agent into a production-ready application. Framework-agnostic primitives for runtime, memory, authentication, and tools with AWS-managed infrastructure.

More in MCP Servers

agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.
ProxmoxMCP-PlusEnhanced Proxmox MCP server with advanced virtualization management and full OpenAPI integration.
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.
mcp-compressorAn MCP server wrapper for reducing tokens consumed by MCP tools.