AWS Documentation Model Context Protocol (MCP) Server
The AWS Documentation Model Context Protocol (MCP) Server is an open-source library from AWS Labs that provides real-time access to official AWS documentation for AI assistants and agents. It enables AI coding assistants to search, fetch, and get recommendations from up-to-date AWS documentation, reducing hallucinations and improving the accuracy of AI-generated content for cloud-native development. The MCP protocol itself is an open standard overseen by the Linux Foundation. The library is currently at version 1.1.20 and is actively maintained with a regular release cadence.
Warnings
- breaking Server-Sent Events (SSE) support was removed from all MCP servers in their latest major versions as of May 26, 2025. Applications that still rely on SSE for client-server communication must use previous major versions of the respective MCP server until they can migrate to alternative transport methods.
- gotcha The server requires AWS credentials to function, typically picked up from the default AWS CLI profile or `AWS_PROFILE` environment variable. It also runs in read-only mode by default, restricting operations to only perform read actions. Write-access (for mutating operations like `sam_deploy`) requires explicit configuration (e.g., `enable_write_access_mode`).
- gotcha The library explicitly requires Python 3.10 or newer. Attempting to run it with older Python versions will result in execution errors.
- gotcha Running multiple AWS-related MCP servers (e.g., `aws-api-mcp-server`, `aws-knowledge-mcp-server`) concurrently in the same MCP client configuration can lead to tool conflicts, ambiguous responses for AI agents, and reduced performance. It's recommended to remove conflicting server entries.
Install
-
pip install awslabs-aws-documentation-mcp-server
Imports
- Server Execution
python -m awslabs.aws_documentation_mcp_server.server
Quickstart
import os
import subprocess
import sys
# Configure AWS credentials (replace with your actual region/profile or ensure they are set in your environment)
os.environ['AWS_PROFILE'] = os.environ.get('AWS_PROFILE', 'default') # Use 'default' profile or env var
os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1') # Use 'us-east-1' or env var
print(f"Starting AWS Documentation MCP Server using profile: {os.environ['AWS_PROFILE']} in region: {os.environ['AWS_REGION']}")
print("Ensure your AWS credentials are configured (e.g., via `aws configure` or environment variables).")
print("The server will run until interrupted (Ctrl+C).")
try:
# Run the MCP server as a module
process = subprocess.run(
[sys.executable, "-m", "awslabs.aws_documentation_mcp_server.server"],
check=True
)
except subprocess.CalledProcessError as e:
print(f"Error starting server: {e}")
sys.exit(1)
except KeyboardInterrupt:
print("\nServer stopped by user.")
sys.exit(0)