AWS Knowledge Base Retrieval MCP Server
Supports deployment as a Docker container with options for using IAM Access Keys or AWS SSO authentication methods.
Retrieves information from the AWS Knowledge Base using Bedrock Agent Runtime, supporting RAG (Retrieval-Augmented Generation) with customizable result counts and providing both raw context and structured metadata from search queries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AWS Knowledge Base Retrieval MCP Serverretrieve best practices for securing S3 buckets from knowledge base kb-aws-security"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AWS Knowledge Base Retrieval MCP Server
An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime.
Features
RAG (Retrieval-Augmented Generation): Retrieve context from the AWS Knowledge Base based on a query and a Knowledge Base ID.
Supports multiple results retrieval: Option to retrieve a customizable number of results.
Related MCP server: DuckDB-RAG-MCP-Sample
Tools
retrieve_from_aws_kb
Perform retrieval operations using the AWS Knowledge Base.
Inputs:
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).
Response format:
The response now returns two separate content items:
A text item containing the raw context from the knowledge base.
A JSON item containing the structured RAG sources with metadata (id, fileName, snippet, and score).
This separation allows for more flexible processing of the results.
Configuration
Setting up AWS Credentials
You have two options for configuring AWS credentials:
Option 1: IAM Access Keys
Obtain AWS access key ID, secret access key, and region from the AWS Management Console.
Ensure these credentials have appropriate permissions for Bedrock Agent Runtime operations.
Set the environment variables as shown in the configuration examples below.
For temporary credentials, you can also provide a session token using the
AWS_SESSION_TOKENenvironment variable.
Option 2: AWS SSO (Single Sign-On)
The server now supports AWS SSO credentials:
Configure AWS CLI with your SSO profile:
aws configure ssoSet only the AWS_REGION environment variable in the MCP server configuration.
The server will use the default credential provider chain, which includes SSO credentials.
Optional: Configure Default Knowledge Base IDs
You can optionally specify one or more knowledge base IDs to use by default:
Create an array of knowledge base IDs in JSON format.
Set this as the AWS_KB_IDS environment variable in your configuration.
When this is configured, the
knowledgeBaseIdparameter becomes optional in the tool.
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
Docker with IAM Access Keys
{
"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\"]"
}
}
}
}Docker with AWS SSO
{
"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\"]"
}
}
}
}NPX with IAM Access Keys
{
"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\"]"
}
}
}
}NPX with AWS SSO
{
"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\"]"
}
}
}
}Local Repository (from cloned/built repo)
{
"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
}
}
}Building
Docker:
docker build -t mcp/aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile .License
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.
Available Tools
1 toolretrieve_from_aws_kbC
Performs retrieval from the AWS Knowledge Base using the provided query and Knowledge Base ID.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The query to perform retrieval on | |
| knowledgeBaseId | Yes | The ID of the AWS Knowledge Base | |
| n | No | Number of results to retrieve |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieval but fails to describe key traits like authentication requirements, rate limits, error handling, or what the retrieval entails (e.g., returns text snippets, metadata). This leaves significant gaps in understanding how the tool behaves in practice.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function and inputs without any fluff. It's front-loaded with the core purpose and appropriately sized for the task, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete. It doesn't explain what the retrieval returns (e.g., format, content), error conditions, or operational details like latency or costs. For a tool with 3 parameters and missing structured data, this leaves the agent under-informed about critical context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters (query, knowledgeBaseId, n). The description adds no additional meaning beyond what's in the schema, such as examples or constraints. This meets the baseline for high schema coverage but doesn't enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('performs retrieval') and the resource ('from the AWS Knowledge Base'), making the purpose immediately understandable. It specifies the required inputs (query and Knowledge Base ID), which helps distinguish it from generic retrieval tools. However, without sibling tools, it doesn't need to differentiate further, so it's not a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It merely states what the tool does without indicating appropriate scenarios or limitations, leaving the agent without usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined and distinct by default.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions.
One tool is too few for a server focused on AWS Knowledge Base retrieval, as it lacks essential operations like listing knowledge bases, managing queries, or handling configurations, making the scope feel incomplete and limiting.
The tool set is severely incomplete for the domain of AWS Knowledge Base operations. It only provides retrieval, missing critical functions such as creating, updating, or deleting knowledge base entries, which are necessary for a full workflow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The AWS Knowledge MCP server is a fully managed remote Model Context Protocol server that provides real-time access to official AWS content in an LLM-compatible format. It offers structured access to AWS documentation, code samples, blog posts, What's New announcements, Well-Architected best practices, and regional availability information for AWS APIs and CloudFormation resources. Key capabilities include searching and reading documentation in markdown format, getting content recommendations, listing AWS regions, and checking regional availability for services and features.
MCP server for AI dialogue using various LLM models via AceDataCloud
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables AI models to retrieve information from Ragie's knowledge base through a simple 'retrieve' tool.13291MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables RAG (Retrieval-Augmented Generation) on markdown documents by converting them to embedding vectors and performing vector search using DuckDB.4Apache 2.0
- FlicenseNot gradedqualityDmaintenanceAn MCP server that implements Retrieval-Augmented Generation to efficiently retrieve and process important information from various sources, providing accurate and contextually relevant responses.
- FlicenseNot gradedqualityCmaintenanceAn MCP server integrating LangChain, RAG, and Agent to provide knowledge retrieval and tool invocation through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sammcj/mcp-aws-kb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server