An AWS Labs Model Context Protocol (MCP) server for Bedrock Knowledge Base Retrieval
Project description
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
- Install
uvfrom Astral or the GitHub README - Install Python using
uv python install 3.13
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
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
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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652.tar.gz.
File metadata
- Download URL: awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dda20769af79d5fcd220ee28f0dc9df45995edb28fb499bf1a7f79a30613563
|
|
| MD5 |
6dc9bb518cace886149e2ccd76fa31f3
|
|
| BLAKE2b-256 |
18ecbd45a5b489fd360546263bb402b56b1fdf5f40074d399d03460197bdd22d
|
Provenance
The following attestation bundles were made for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652.tar.gz:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652.tar.gz -
Subject digest:
6dda20769af79d5fcd220ee28f0dc9df45995edb28fb499bf1a7f79a30613563 - Sigstore transparency entry: 190696102
- Sigstore integration time:
-
Permalink:
awslabs/mcp@8eb51ada946c33d76f546b1f1c192fa73528f440 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8eb51ada946c33d76f546b1f1c192fa73528f440 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652-py3-none-any.whl.
File metadata
- Download URL: awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b21ee350b32507b02f2b6fd7490b8b0365efd286c4329ef3ae43155c1fa4e9
|
|
| MD5 |
6cfa6c1f4177773063dc1d07930fd38a
|
|
| BLAKE2b-256 |
354d2ce41918bf710f58d08350c48321de61e0b234971c5f1197ebb280c284fc
|
Provenance
The following attestation bundles were made for awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652-py3-none-any.whl:
Publisher:
release.yml on awslabs/mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
awslabs_bedrock_kb_retrieval_mcp_server-0.0.10652-py3-none-any.whl -
Subject digest:
c2b21ee350b32507b02f2b6fd7490b8b0365efd286c4329ef3ae43155c1fa4e9 - Sigstore transparency entry: 190696106
- Sigstore integration time:
-
Permalink:
awslabs/mcp@8eb51ada946c33d76f546b1f1c192fa73528f440 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8eb51ada946c33d76f546b1f1c192fa73528f440 -
Trigger Event:
workflow_dispatch
-
Statement type: