AWS Documentation Model Context Protocol (MCP) Server

1.1.20 · active · verified Sun Apr 12

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

Install

Imports

Quickstart

This quickstart demonstrates how to run the AWS Documentation MCP Server as a Python module. Before running, ensure you have Python 3.10+ installed and your AWS CLI credentials are configured (e.g., `aws configure`). The server will use these credentials to interact with AWS services for documentation retrieval. Once running, it can be integrated with compatible MCP clients like Amazon Q Developer, Kiro, or Cursor.

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)

view raw JSON →