bedrock-kb
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Bedrock Knowledge Base Server (Strands)
Note: This README is written for Amazon Q CLI version 1.14.1. Command syntax may differ in other versions.
A minimal Model Context Protocol (MCP) server that connects to AWS Bedrock Knowledge Base for Strands-specific documentation queries.
⚠️ Important: Tool and Server Naming
This server provides:
Server Name:
bedrock-kbTool Name:
query_strands_knowledge_base
Critical: If you're running multiple MCP servers, each MUST have unique server names and tool names to avoid conflicts in Q CLI. Simply pointing to different knowledge bases is NOT sufficient - the tool names must be different.
Related MCP server: Amazon Bedrock Knowledge Base MCP Server
Quick Setup
1. Install Dependencies
pip install -r requirements.txt2. Configure Environment Variables
Copy the example environment file and fill in your values:
cp .env.example .envEdit .env with your AWS Bedrock Knowledge Base details:
BEDROCK_KB_ID=your-knowledge-base-id-here
AWS_REGION=your-aws-region
BEDROCK_MODEL_ARN=arn:aws:bedrock:your-region::foundation-model/anthropic.claude-3-sonnet-20240229-v1:03. Configure AWS Credentials
Ensure your AWS credentials are configured via:
AWS CLI:
aws configureEnvironment variables:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYIAM roles (if running on EC2)
Required permissions:
bedrock:RetrieveAndGenerate
4. Run the Server
python src/mcp_bedrock_kb/server.pyIntegration with Amazon Q CLI
Method 1: Using Q CLI MCP Commands (Recommended)
Add the MCP server using Q CLI:
q mcp add --name bedrock-kb --command python --args /path/to/your/mcp-bedrock-kb/src/mcp_bedrock_kb/server.py --env BEDROCK_KB_ID=your-knowledge-base-id --env AWS_REGION=your-aws-region --env BEDROCK_MODEL_ARN=arn:aws:bedrock:your-region::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0Replace /path/to/your/mcp-bedrock-kb/ with the actual path to your cloned repository and your-knowledge-base-id with your actual Bedrock Knowledge Base ID.
Verify the server is added:
q mcp listTest the integration:
q chat
# In the chat, you can now use: query_knowledge_base("your question here")Method 2: Manual Configuration File Editing
Locate your Q CLI configuration file:
# Configuration is typically at:
~/.aws/amazonq/mcp.jsonEdit the configuration file to add the MCP server:
{
"mcpServers": {
"bedrock-kb": {
"command": "python",
"args": ["/path/to/your/mcp-bedrock-kb/src/mcp_bedrock_kb/server.py"],
"env": {
"BEDROCK_KB_ID": "your-knowledge-base-id-here",
"AWS_REGION": "your-aws-region",
"BEDROCK_MODEL_ARN": "arn:aws:bedrock:your-region::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0"
}
}
}
}Restart Q CLI to load the new configuration:
q chatUsage with MCP Clients
The server provides one tool:
query_strands_knowledge_base: Query the configured Strands Bedrock Knowledge Base
Available Tool
query_strands_knowledge_base(query: str) -> str
Queries the configured AWS Bedrock Knowledge Base for Strands documentation
Returns relevant information based on the query
Automatically handles retrieval and generation using the configured model
Example Usage in Q CLI
Once integrated, you can use the Strands knowledge base tool in your Q CLI conversations:
User: Can you query the Strands knowledge base about best practices?
Q: I'll query the Strands knowledge base for information about best practices.
query_strands_knowledge_base("best practices and implementation patterns")
Based on the Strands knowledge base, here are the key best practices...Troubleshooting
Common Issues
"Server not found" error:
Verify the path to
server.pyis correctEnsure Python can find the required dependencies
Check that the virtual environment is activated if using one
AWS permissions error:
Verify AWS credentials are configured
Ensure the IAM user/role has
bedrock:RetrieveAndGeneratepermissionCheck that the Knowledge Base ID exists and is accessible
Environment variables not loaded:
Ensure
.envfile is in the correct locationVerify environment variable names match exactly
For manual config, ensure env vars are in the JSON configuration
Debugging
Enable debug logging by setting:
export MCP_DEBUG=1Check Q CLI logs:
q chat --verboseTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search and query nTop's knowledge base and engineering guides from AI applications.
Search the Cerebrium docs: deployment, cerebrium.toml, hardware, endpoints. Also sends feedback.
Search and read the Claude Platform documentation and API reference.
Retrieve information from the Medusa documentation to assist you with your Medusa development.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to query and retrieve information from Amazon Bedrock Knowledge Base using the Retrieve API, returning search results with content, location, and relevance scores.1MIT
- AlicenseAqualityDmaintenanceEnables management of Amazon Bedrock Knowledge Bases including creation, data source configuration, document ingestion, and RAG (Retrieval-Augmented Generation) queries with support for multiple embedding models and custom parsing/chunking strategies.13MIT
- FlicenseNot gradedqualityDmaintenanceEnables searching a knowledge base and asking grounded questions with hybrid retrieval, reranking, and cited answers.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query documents in a Bedrock Knowledge Base through the MCP protocol, with tools for semantic search and agentic retrieval.MIT