AWS Bedrock KB Retrieval is an open-source server based on the MCP protocol, designed to help users access Amazon Bedrock knowledge bases. It provides a variety of tools to discover, query, and manage knowledge bases.
Main capabilities include:
- Discover knowledge bases: list all available knowledge bases, search by name or tag, and list the data sources associated with each knowledge base.
- Natural language queries: retrieve information using conversational queries and obtain relevant passages and citation information.
- Data source filtering: filter results by data source, including including, excluding, or prioritizing specific data sources.
- Agentic retrieval: for managed knowledge bases, plan multi-step retrieval strategies and generate answers with citations, support searching multiple knowledge bases in a single call, and optionally output a simplified trace of planning and retrieval steps.
- Access ACL-protected content: by passing the user_id parameter, retrieve content from data sources that support ACLs (such as SharePoint, OneDrive, Confluence), and results are filtered to content the user is authorized to view.
- Support vector and managed knowledge bases: automatically detect the knowledge base type and send the corresponding retrieval configuration.
- Reranking: use Amazon Bedrock's reranking capability to improve the relevance of retrieval results.
Usage:
- Installation requirements: uv and Python 3.10 need to be installed.
- AWS requirements: configure AWS CLI credentials and an AWS_PROFILE with permissions to access Amazon Bedrock and knowledge bases; have at least one Amazon Bedrock knowledge base tagged with mcp-multirag-kb=true; the IAM role/user needs permissions to list and describe knowledge bases, access data sources, and query knowledge bases.
- Reranking requirements: to use reranking, the IAM role and the knowledge base service role need bedrock:Rerank and bedrock:InvokeModel permissions, and ensure the reranking model is enabled in the corresponding region.
- Agentic retrieval requirements: requires bedrock:AgenticRetrieveStream permission, and only supports managed knowledge bases.
- Configuration: configure the server in the MCP client configuration file, for example for Kiro, edit ~/.kiro/settings/mcp.json. The configuration format for Windows users is slightly different.
Applicable scenarios:
- Applications that need to quickly retrieve information from Amazon Bedrock knowledge bases.
- Build question-answering systems or chatbots based on knowledge bases.
- Scenarios that require filtering or prioritizing retrieval results by data source.
- Need to access ACL-protected content and ensure users can only see authorized content.
Limitations:
- Agentic retrieval only supports managed knowledge bases.
- The reranking feature requires additional permissions and model access, and is only available in specific regions.
- Query responses do not include results with the IMAGE content type.
- AWS credentials and permissions need to be configured correctly.