Skip to content
Conduit

mcp server

aws-code-examples-mcp

AWS Docs Code Examples MCP Server

hugh-weston/aws-code-examples-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "aws-code-examples-mcp": {
      "command": "uvx",
      "args": [
        "aws-code-examples-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 24, 2026

AWS Docs Code Examples MCP Server

Model Context Protocol (MCP) server for AWS Docs Code Examples

This MCP server provides tools to access AWS code examples, search for content, and get recommendations.

Features

  • Read Documentation: Fetch and convert AWS documentation pages to markdown format
  • Search Documentation: Search AWS documentation using the official search API (global only)
  • Recommendations: Get content recommendations for AWS documentation pages (global only)
  • Search Code Examples: Search for AWS code examples across all services and programming languages
  • Read Code Examples: Retrieve complete source code and context for specific examples
  • Setup Code Examples: Download and prepare code examples for local development and testing
  • Get Available Services List: Get a list of available AWS services in China regions (China only)

Prerequisites

Installation Requirements

  1. Install uv from Astral or the GitHub README
  2. Install Python 3.10 or newer using uv python install 3.10 (or a more recent version)

Installation

Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit ~/.aws/amazonq/mcp.json):

{
  "mcpServers": {
    "aws-code-examples-mcp": {
      "command": "uvx",
      "args": ["/path/to/aws-code-examples-mcp"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR",
        "AWS_DOCUMENTATION_PARTITION": "aws",
        "AWS_REGION": "us-east-1",
        "CODE_EXAMPLES_S3_VECTOR_BUCKET": "code-examples-mcp-demo",
        "CODE_EXAMPLES_S3_VECTOR_INDEX": "text-index",
        "BEDROCK_TEXT_EMBEDDING_MODEL_ID": "amazon.titan-embed-text-v2:0",
        "SAGEMAKER_CODE_EMBEDDING_MODEL_ID": "nomic-embed-code-endpoint",
        "CODE_CONTENT_S3_BUCKET": "code-example-content-partitions"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Note: Set AWS_DOCUMENTATION_PARTITION to aws-cn to query AWS China documentation instead of global AWS documentation.

Basic Usage

Example:

Tools

read_documentation

Fetches an AWS documentation page and converts it to markdown format.

read_documentation(url: str) -> str

search_documentation (global only)

Searches AWS documentation using the official AWS Documentation Search API.

search_documentation(search_phrase: str, limit: int) -> list[dict]

recommend (global only)

Gets content recommendations for an AWS documentation page.

recommend(url: str) -> list[dict]

get_available_services (China only)

Gets a list of available AWS services in China regions.

get_available_services() -> str

Development

Install dependencies:

uv sync --dev

Run tests:

uv run pytest

Run the server:

uv run aws-code-examples-mcp

License

Apache-2.0

↑↓ navigate openesc close