Amazon Bedrock Knowledge Base Retrieval MCP Server
MCP server for accessing Amazon Bedrock Knowledge Bases
Features
Discover knowledge bases and their data sources
- Find and explore all available knowledge bases
- Search for knowledge bases by name or tag
- List data sources associated with each knowledge base
Query knowledge bases with natural language
- Retrieve information using conversational queries
- Get relevant passages from your knowledge bases
- Access citation information for all results
Filter results by data source
- Focus your queries on specific data sources
- Include or exclude specific data sources
- Prioritize results from specific data sources
Rerank results
- Improve relevance of retrieval results
- Use Amazon Bedrock reranking capabilities
- Sort results by relevance to your query
Prerequisites
Installation Requirements
- Install
uvfrom Astral or the GitHub README - Install Python using
uv python install 3.10
AWS Requirements
- 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
- Amazon Bedrock Knowledge Base: You must have at least one Amazon Bedrock Knowledge Base with the tag key
mcp-multirag-kbwith a value oftrue - 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:
- Your IAM role must have permissions for both
bedrock:Rerankandbedrock:InvokeModelactions - The Amazon Bedrock Knowledge Bases service role must also have these permissions
- 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:
- Create a knowledge base
- Managing permissions for Amazon Bedrock knowledge bases
- Permissions for reranking in Amazon Bedrock
Installation
Here are some ways you can work with MCP across AWS, and we'll be adding support to more products including Amazon Q Developer CLI soon: (e.g. for Amazon Q Developer CLI MCP, ~/.aws/amazonq/mcp.json):
{
"mcpServers": {
"awslabs.bedrock-kb-retrieval-mcp-server": {
"command": "uvx",
"args": ["awslabs.bedrock-kb-retrieval-mcp-server@latest"],
"env": {
"AWS_PROFILE": "your-profile-name",
"AWS_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "ERROR"
},
"disabled": false,
"autoApprove": []
}
}
}
Limitations
- Results with
IMAGEcontent type are not included in the KB query response. - The
rerankingparameter requires additional permissions, Amazon Bedrock model access, and is only available in specific regions.
Release files for awslabs.bedrock-kb-retrieval-mcp-server 0.0.2025141004
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004.tar.gz | 48.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.1 kB
Release files / awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004.tar.gz
| Download URL | awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004.tar.gz |
|---|---|
| Size | 48.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96389d0dc8b704951d7dab9e3b14df381178b156254d5f575c7e12ce1d6bb19a
|
|
BLAKE2b-256 checksum How to use checksums |
9d1f85f98b3cf37c12dfd889765f992d5d2b4101123d865639bae9329bf44ccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.
Transparency logRelease files / awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004-py3-none-any.whl
| Download URL | awslabs_bedrock_kb_retrieval_mcp_server-0.0.2025141004-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fe58f270cb4254e4206a0bd9fc244744b6350a6e066cb9c12e967bb67ddae8a
|
|
BLAKE2b-256 checksum How to use checksums |
12f56cd71ff9164ba546e919551fd558aabe778a3eb4d7ba86a8acae40f8b79e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2025.
Transparency log