MCP HubMCP Hub
modelcontextprotocol

aws-kb-retrieval-server

by: modelcontextprotocol

An MCP server implementation for retrieving information from the AWS Knowledge Base using the Bedrock Agent Runtime.

0created 19/11/2024
Visit
AWS
Bedrock

📌Overview

Purpose: To facilitate the retrieval of information from the AWS Knowledge Base using the Bedrock Agent Runtime.

Overview: The AWS Knowledge Base Retrieval MCP Server provides a solution for accessing content from the AWS Knowledge Base by utilizing Retrieval-Augmented Generation (RAG) techniques. This implementation allows users to specify queries and customize the number of results retrieved, streamlining the knowledge retrieval process.

Key Features:

  • RAG (Retrieval-Augmented Generation): Enables users to extract context by querying the AWS Knowledge Base, improving the relevance of retrieved data.

  • Supports multiple results retrieval: Gives users the flexibility to specify a custom number of results, enhancing the ability to find pertinent information efficiently.


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 retrieval of a customizable number of results.

Tools

retrieve_from_aws_kb

Perform retrieval operations using the AWS Knowledge Base.

Inputs:

  • query (string): The search query.
  • 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 the following 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"
      }
    }
  }
}

NPX

{
  "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"
      }
    }
  }
}

Building

Build the Docker image with:

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

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software under the terms of this license. See the LICENSE file in the project repository for details.


This README assumes your server package is named @modelcontextprotocol/server-aws-kb-retrieval. Adjust package names and installation details as needed, and ensure all dependencies are managed properly in your package.json.