Amazon Bedrock KB Retrieval MCP Server

io.github.awslabs/bedrock-kb-retrieval-mcp-server

Overview

AWS Labs stdio MCP server for discovering and querying Amazon Bedrock Knowledge Bases, including data-source filtering and optional Bedrock reranking.

Documentation

Overview

Amazon Bedrock Knowledge Base Retrieval MCP Server is an AWS Labs stdio MCP server for discovering and querying Amazon Bedrock Knowledge Bases. It exposes tools to list available knowledge bases and data sources, retrieve passages with citations, filter by data source, and optionally use Amazon Bedrock reranking.

Install and launch

The documented default MCP client configuration uses uvx:

{
  "command": "uvx",
  "args": ["awslabs.bedrock-kb-retrieval-mcp-server@latest"],
  "env": {
    "AWS_PROFILE": "",
    "AWS_REGION": "us-east-1",
    "FASTMCP_LOG_LEVEL": "ERROR",
    "KB_INCLUSION_TAG_KEY": "mcp-multirag-kb",
    "BEDROCK_KB_RERANKING_ENABLED": "false"
  }
}

The README also documents a Windows uv tool run --from awslabs.bedrock-kb-retrieval-mcp-server@latest awslabs.bedrock-kb-retrieval-mcp-server.exe variant and a locally built Docker image flow after docker build -t awslabs/bedrock-kb-retrieval-mcp-server ..

Configuration

Runtime configuration is via environment variables. AWS_PROFILE selects the AWS CLI profile; AWS access key environment variables can also be used through boto3 credential resolution. AWS_REGION selects the Bedrock region. KB_INCLUSION_TAG_KEY filters discoverable knowledge bases by tag key; the source default is mcp-multirag-kb, and matching knowledge bases must have that tag value set to true. BEDROCK_KB_RERANKING_ENABLED defaults to false; values true, 1, yes, or on enable reranking by default.

Tools

  • ListKnowledgeBases: discovers tagged Amazon Bedrock Knowledge Bases and lists their data sources.
  • QueryKnowledgeBases: queries a specified knowledge base with natural language, supports number_of_results, optional data_source_ids, optional reranking, and reranking model choice AMAZON or COHERE.

Prerequisites

Requires uv, Python 3.10+, configured AWS credentials with access to Amazon Bedrock and Knowledge Bases, and at least one Bedrock Knowledge Base tagged with the configured inclusion tag. IAM permissions must allow listing/describing knowledge bases, listing data sources, querying knowledge bases, and reading tags. Reranking requires bedrock:Rerank, bedrock:InvokeModel, Bedrock model access, and a supported region.

Limitations

The server runs with stdio transport. The changelog notes SSE support was removed in version 1.0.0. Query results with IMAGE content type are skipped. Reranking is only available in specific AWS regions and requires additional permissions and model access; source currently permits reranking only in us-west-2, us-east-1, ap-northeast-1, ca-central-1, and eu-central-1.