Amazon Bedrock Knowledge Base Retrieval MCP Server logo

Amazon Bedrock Knowledge Base Retrieval MCP Server

by awslabs

The MCP server provides access to Amazon Bedrock Knowledge Bases, allowing users to discover, query, and filter information stored within. It enables natural language queries and retrieval of relevant passages with citation information.

View on GitHub

Last updated: N/A

What is Amazon Bedrock Knowledge Base Retrieval MCP Server?

This MCP server facilitates interaction with Amazon Bedrock Knowledge Bases. It allows users to discover available knowledge bases and their data sources, query them using natural language, filter results by data source, and optionally rerank results for improved relevance.

How to use Amazon Bedrock Knowledge Base Retrieval MCP Server?

To use the server, you need to install the prerequisites, including uv and Python 3.10. You must also configure the AWS CLI with credentials and an AWS_PROFILE that has access to Amazon Bedrock and Knowledge Bases. Ensure you have at least one Amazon Bedrock Knowledge Base with the tag key mcp-multirag-kb with a value of true. Finally, configure the MCP server with the appropriate command, arguments, and environment variables, as shown in the installation example.

Key features of Amazon Bedrock Knowledge Base Retrieval MCP Server

  • Discover knowledge bases and their data sources

  • Query knowledge bases with natural language

  • Filter results by data source

  • Rerank results

Use cases of Amazon Bedrock Knowledge Base Retrieval MCP Server

  • Retrieving information from a company's internal knowledge base using natural language queries.

  • Filtering search results to focus on specific data sources within a knowledge base.

  • Improving the relevance of search results by reranking them using Amazon Bedrock's reranking capabilities.

  • Exploring available knowledge bases and their data sources to understand the information landscape.

FAQ from Amazon Bedrock Knowledge Base Retrieval MCP Server

What are the prerequisites for using this server?

You need to install uv and Python 3.10, configure the AWS CLI with access to Amazon Bedrock and Knowledge Bases, and have at least one Amazon Bedrock Knowledge Base with the tag key mcp-multirag-kb with a value of true.

How do I configure the AWS CLI?

You need to configure the AWS CLI with credentials and an AWS_PROFILE that has access to Amazon Bedrock and Knowledge Bases.

What IAM permissions are required?

Your IAM role/user must have permissions to list and describe knowledge bases, access data sources, and query knowledge bases. If using reranking, additional permissions for bedrock:Rerank and bedrock:InvokeModel are required.

How do I enable reranking?

Enable model access for the available reranking models in the specified region and ensure the IAM role has permissions for bedrock:Rerank and bedrock:InvokeModel actions.

Are there any 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.