An MCP server that enables users to retrieve information from AWS Knowledge Bases using RAG (Retrieval-Augmented Generation) via Bedrock Agent Runtime.
An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime.
query
(string): The search query for retrieval.knowledgeBaseId
(string): The ID of the AWS Knowledge Base.n
(number, optional): Number of results to retrieve (default: 3).You have two options for configuring AWS credentials:
AWS_SESSION_TOKEN
environment variable.The server now supports AWS SSO credentials:
aws configure sso
You can optionally specify one or more knowledge base IDs to use by default:
knowledgeBaseId
parameter becomes optional in the tool.Add this to your claude_desktop_config.json
:
{ "mcpServers": { "aws-kb-retrieval": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "AWS_ACCESS_KEY_ID", "-e", "AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION", "-e", "AWS_KB_IDS", "mcp/aws-kb-retrieval-server" ], "env": { "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", "AWS_SESSION_TOKEN": "YOUR_OPTIONAL_SESSION_ID_FOR_SSO_TEMPORARY_CREDENTIALS_HERE", "AWS_REGION": "YOUR_AWS_REGION_HERE", "AWS_KB_IDS": "["kb-12345", "kb-67890"]" } } } }
{ "mcpServers": { "aws-kb-retrieval": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "AWS_REGION", "-e", "AWS_KB_IDS", "-v", "${HOME}/.aws:/root/.aws", "mcp/aws-kb-retrieval-server" ], "env": { "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", "AWS_SESSION_TOKEN": "YOUR_OPTIONAL_SESSION_ID_FOR_SSO_TEMPORARY_CREDENTIALS_HERE", "AWS_REGION": "YOUR_AWS_REGION_HERE", "AWS_KB_IDS": "["kb-12345", "kb-67890"]" } } } }
{ "mcpServers": { "aws-kb-retrieval": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-aws-kb-retrieval" ], "env": { "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", "AWS_SESSION_TOKEN": "YOUR_OPTIONAL_SESSION_ID_FOR_SSO_TEMPORARY_CREDENTIALS_HERE", "AWS_REGION": "YOUR_AWS_REGION_HERE", "AWS_KB_IDS": "["kb-12345", "kb-67890"]" } } } }
{ "mcpServers": { "aws-kb-retrieval": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-aws-kb-retrieval" ], "env": { "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", "AWS_SESSION_TOKEN": "YOUR_OPTIONAL_SESSION_ID_FOR_SSO_TEMPORARY_CREDENTIALS_HERE", "AWS_REGION": "YOUR_AWS_REGION_HERE", "AWS_KB_IDS": "["kb-12345", "kb-67890"]" } } } }
{ "mcpServers": { "aws-kb": { "command": "node", "args": [ "/path/to/mcp-aws-kb/dist/index.js" ], "env": { "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE", "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE", "AWS_SESSION_TOKEN": "YOUR_OPTIONAL_SESSION_ID_FOR_SSO_TEMPORARY_CREDENTIALS_HERE", "AWS_REGION": "YOUR_AWS_REGION_HERE", "AWS_KB_IDS": "["kb-12345", "kb-67890"]" }, "disabled": false, "autoApprove": [ "retrieve_from_aws_kb" ], "timeout": 120 } } }
Docker:
docker build -t mcp/aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile .
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
This README assumes that your server package is named @modelcontextprotocol/server-aws-kb-retrieval
. Adjust the package name and installation details if they differ in your setup. Also, ensure that your server script is correctly built and that all dependencies are properly managed in your package.json
.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!