MCP Connector

Retrieve AWS Knowledge Base Data

AWS KB Retrieval MCP Server queries an AWS Bedrock Knowledge Base by search query and Knowledge Base ID, returning RAG context results.

Works with aws

84
Spark score
out of 100
Updated May 2025
Source checked Sep 20, 2026
Version 1.0.0
Models
universal

Add to Favorites

Why it matters

Leverage AWS Knowledge Base for RAG to retrieve relevant information. This asset enables context retrieval from your AWS KB based on user queries.

Outcomes

What it gets done

01

Connect to AWS Knowledge Base

02

Retrieve context using RAG

03

Customize number of results

04

Search AWS KB with provided query

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

retrieve_from_aws_kb

Perform retrieval operations using the AWS Knowledge Base with customizable result count.

Overview

AWS KB Retrieval MCP Server

A single-tool MCP server that retrieves RAG context from an AWS Bedrock Knowledge Base via the Bedrock Agent Runtime, given a query and a Knowledge Base ID. Reach for it when an MCP client needs to query an existing populated AWS Bedrock Knowledge Base for grounding context; note it ships from Anthropic's archived reference-servers repository, not an actively maintained standalone project.

What it does

AWS KB Retrieval MCP Server is a single-purpose MCP server that retrieves context from an AWS Bedrock Knowledge Base via the Bedrock Agent Runtime, for retrieval-augmented generation (RAG). It exposes one tool, retrieve_from_aws_kb, that runs a retrieval query against a specified Knowledge Base ID and returns a configurable number of results.

When to use - and when NOT to

Use it when you want an MCP client to pull grounding context from an existing AWS Bedrock Knowledge Base by query, instead of hand-implementing Bedrock Agent Runtime retrieval calls yourself. This connector lives in the official modelcontextprotocol/servers-archived repository - it has been archived upstream, so treat it as a reference implementation rather than an actively maintained project. It assumes you already have a populated Bedrock Knowledge Base; it doesn't create, ingest into, or manage one, and it requires AWS credentials (access key, secret key, region) with Bedrock Agent Runtime permissions.

Capabilities

retrieve_from_aws_kb takes a required query string, a required knowledgeBaseId string identifying the AWS Knowledge Base, and an optional n number (default 3) controlling how many results to retrieve.

How to install

{
  "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_REGION": "YOUR_AWS_REGION_HERE"
      }
    }
  }
}

A Docker variant sets command to docker, with args for run, -i, --rm, then a repeated -e flag for each of AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION before the mcp/aws-kb-retrieval-server image name - passing those three AWS variables through from the host environment rather than hardcoding them in the config's env block. VS Code has one-click install buttons for both the npx and Docker variants, plus a manual path: paste the config into User Settings (JSON) via Ctrl+Shift+P -> Preferences: Open Settings (JSON), or into a shareable .vscode/mcp.json (which omits the wrapping mcp key). The VS Code config style prompts for credentials at connect time instead of storing them in the file, using inputs entries with ids aws_access_key, aws_secret_key, and aws_region, the first two marked password: true so VS Code masks them, referenced in the server's env block as ${input:aws_access_key}, ${input:aws_secret_key}, and ${input:aws_region}. To build the Docker image from source: docker build -t mcp/aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile .

Who it's for

Teams already using an AWS Bedrock Knowledge Base who want an MCP client to query it directly for RAG context, and who are comfortable adopting a reference server from the archived modelcontextprotocol/servers-archived repository rather than an actively maintained standalone project. MIT licensed.

Source README

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.

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).

Configuration

Setting up AWS Credentials

  1. Obtain AWS access key ID, secret access key, and region from the AWS Management Console.
  2. Ensure these credentials have appropriate permissions for Bedrock Agent Runtime operations.

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Docker
{
  "mcpServers": {
    "aws-kb-retrieval": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "AWS_ACCESS_KEY_ID",
        "-e",
        "AWS_SECRET_ACCESS_KEY",
        "-e",
        "AWS_REGION",
        "mcp/aws-kb-retrieval-server"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "YOUR_ACCESS_KEY_HERE",
        "AWS_SECRET_ACCESS_KEY": "YOUR_SECRET_ACCESS_KEY_HERE",
        "AWS_REGION": "YOUR_AWS_REGION_HERE"
      }
    }
  }
}
{
  "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_REGION": "YOUR_AWS_REGION_HERE"
      }
    }
  }
}

Usage with VS Code

For quick installation, use one of the one-click install buttons below...

Install with NPX in VS Code Install with NPX in VS Code Insiders

Install with Docker in VS Code Install with Docker in VS Code Insiders

Manual Installation

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "aws_access_key",
        "description": "AWS Access Key ID",
        "password": true
      },
      {
        "type": "promptString",
        "id": "aws_secret_key",
        "description": "AWS Secret Access Key",
        "password": true
      },
      {
        "type": "promptString",
        "id": "aws_region",
        "description": "AWS Region"
      }
    ],
    "servers": {
      "aws-kb-retrieval": {
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-aws-kb-retrieval"],
        "env": {
          "AWS_ACCESS_KEY_ID": "${input:aws_access_key}",
          "AWS_SECRET_ACCESS_KEY": "${input:aws_secret_key}",
          "AWS_REGION": "${input:aws_region}"
        }
      }
    }
  }
}

For Docker installation:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "aws_access_key",
        "description": "AWS Access Key ID",
        "password": true
      },
      {
        "type": "promptString",
        "id": "aws_secret_key",
        "description": "AWS Secret Access Key",
        "password": true
      },
      {
        "type": "promptString",
        "id": "aws_region",
        "description": "AWS Region"
      }
    ],
    "servers": {
      "aws-kb-retrieval": {
        "command": "docker",
        "args": ["run", "-i", "--rm", "mcp/aws-kb-retrieval-server"],
        "env": {
          "AWS_ACCESS_KEY_ID": "${input:aws_access_key}",
          "AWS_SECRET_ACCESS_KEY": "${input:aws_secret_key}",
          "AWS_REGION": "${input:aws_region}"
        }
      }
    }
  }
}

Building

Docker:

docker build -t mcp/aws-kb-retrieval -f src/aws-kb-retrieval-server/Dockerfile .

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.