Skip to content

Conversation

@mengchen-tam
Copy link

Fixes #N/A

Summary

Changes

This PR adds support for streamable-http transport mode to the AWS Documentation MCP Server, enabling deployment in containerized environments such as Amazon ECS, Kubernetes, and behind load balancers.

Core Functionality:

  • Added FASTMCP_TRANSPORT environment variable to switch between stdio and streamable-http modes
  • Added FASTMCP_HOST and FASTMCP_PORT environment variables for HTTP server configuration
  • Modified server_aws.py and server_aws_cn.py to pass host/port to FastMCP constructor
  • Updated main() function to accept transport parameter

Docker Support:

  • Set FASTMCP_HOST=0.0.0.0 as default in Dockerfile for container networking
  • Enhanced docker-healthcheck.sh to support HTTP mode health checks

Documentation:

  • Added comprehensive HTTP transport mode documentation with Docker and MCP client examples
  • Documented all new environment variables

User experience

Before this change:

  • Users could only run aws-documentation-mcp-server locally with stdio transport
  • No support for containerized deployments or remote access
  • Cannot deploy behind load balancers or in multi-user environments

After this change:

  • Users can deploy the server in Docker containers with HTTP transport
  • Supports deployment on Amazon ECS, Kubernetes, and other container platforms
  • Can be accessed remotely through load balancers
  • Fully backward compatible - existing stdio configurations continue to work unchanged

Example usage:

# Docker with HTTP mode
docker run -d \
 -p 8000:8000 \
 -e FASTMCP_TRANSPORT=streamable-http \
 -e FASTMCP_HOST=0.0.0.0 \
 -e FASTMCP_PORT=8000 \
 mcp/aws-documentation:latest

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N): N

RFC issue number: N/A (This is a feature enhancement following existing patterns in aws-api-mcp-server)

Checklist:

  • Migration process documented (not needed - fully backward compatible)
  • Implement warnings (not needed - opt-in via environment variables)

Testing

Production tested:

  • Deployed and running in production on Amazon ECS Fargate
  • Serving requests through Application Load Balancer
  • Verified with multiple MCP clients (Kiro CLI)
  • Health checks working correctly
  • No issues observed after 10+ test iterations

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

- Add FASTMCP_TRANSPORT environment variable support to both server_aws.py and server_aws_cn.py
- Update docker-healthcheck.sh to support HTTP mode health checks
- Enable deployment as HTTP service in ECS/container environments
- Backward compatible with stdio mode (default)
…rfile

- Enable container to listen on all interfaces by default
- Required for ECS/Kubernetes deployments
- Read FASTMCP_HOST and FASTMCP_PORT from environment variables
- Pass to FastMCP() constructor for proper HTTP server binding
- Update healthcheck to accept 406 status (server running, needs headers)
- Tested: Server now listens on 0.0.0.0:8000 correctly
- Document streamable-http transport for ECS/container deployments
- Add environment variables for HTTP mode configuration
- Include Docker and MCP client configuration examples
- Add endpoint testing example
@github-actions
Copy link
Contributor

This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

@github-actions github-actions bot added the stale These are items that have been around for a long time without progress label Feb 10, 2026
@mengchen-tam
Copy link
Author

Still relevant, please let me know if anything needed on my end at the moment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale These are items that have been around for a long time without progress

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

1 participant