Skip to main content

An AWS Labs Model Context Protocol (MCP) server for Bedrock Knowledge Base Retrieval

Project description

awslabs Bedrock Knowledge Base Retrieval MCP Server

A Model Context Protocol (MCP) server for accessing Amazon Bedrock Knowledge Bases.

Features

  • Discover knowledge bases and their data sources
  • Query knowledge bases with natural language
  • Filter results by data source
  • Rerank results

Prerequisites

Installation Requirements

  1. Install uv from Astral or the GitHub README
  2. Install Python using uv python install 3.13

AWS Requirements

  1. AWS CLI Configuration: You must have the AWS CLI configured with credentials and an AWS_PROFILE that has access to Amazon Bedrock and Knowledge Bases
  2. Amazon Bedrock Knowledge Base: You must have at least one Amazon Bedrock Knowledge Base with the tag key mcp-multirag-kb with a value of true
  3. IAM Permissions: Your IAM role/user must have appropriate permissions to:
    • List and describe knowledge bases
    • Access data sources
    • Query knowledge bases

Reranking Requirements

If you intend to use reranking functionality, your Bedrock Knowledge Base needs additional permissions:

  1. Your IAM role must have permissions for both bedrock:Rerank and bedrock:InvokeModel actions
  2. The Amazon Bedrock Knowledge Bases service role must also have these permissions
  3. Reranking is only available in specific regions: us-west-2, us-east-1, ap-northeast-1, and ca-central-1

For detailed instructions on setting up knowledge bases, see:

Installation

Add the server to your MCP client config (e.g. for Amazon Q CLI MCP, ~/.aws/amazonq/mcp.json):

{
  "mcpServers": {
    "awslabs.bedrock-kb-retrieval-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.bedrock-kb-retrieval-mcp-server"],
      "env": {
        "SHELL": "/usr/bin/zsh",
        "AWS_PROFILE": "your-profile-name"
      }
    }
  }
}

Limitations

  • Results with IMAGE content type are not included in the KB query response.
  • The reranking parameter requires additional permissions, Amazon Bedrock model access, and is only available in specific regions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233.tar.gz.

File metadata

File hashes

Hashes for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233.tar.gz
Algorithm Hash digest
SHA256 8da4ff0187f1c4d25ad47583426d6032bc7042656e24bc6885fb9e5caa386399
MD5 15b89312bacf2516b4d0d1abf4a2c1b8
BLAKE2b-256 b65d90e4e6f337170cc23a01077d8c27e1937d38bad147d3ee5ba5f4f4219fbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233.tar.gz:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233-py3-none-any.whl.

File metadata

File hashes

Hashes for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf991d8a1bca3e41f338af87a820916aa0bcb875a90f69e4d36ab4d348acaad
MD5 560976d5d63f5f0c31f6f5fbd7b2ff8a
BLAKE2b-256 a99a4bdf76b9f90e670def3b5dd56b624a389961f74b538c620cd3485f73ab54

See more details on using hashes here.

Provenance

The following attestation bundles were made for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10233-py3-none-any.whl:

Publisher: release.yml on awslabs/mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page