Bedrock KB

Provides knowledge-base management, data sourcing, ingestion, RAG queries, and S3 document handling for AWS Bedrock Knowledge Base.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "r3-yamauchi-bedrock-kb-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "bedrock-kb-mcp-server"
      ],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "your-profile-name",
        "FASTMCP_LOG_LEVEL": "INFO",
        "FASTMCP_STRUCTURED_LOG": "false"
      }
    }
  }
}

You can run a focused MCP server that exposes the Amazon Bedrock Knowledge Base management and retrieval features through a FastMCP-based interface. This server lets you create, list, and update knowledge bases and data sources, start ingestion jobs, run RAG queries, and manage S3 documents, all via an MCP client. It’s designed to work with AWS Bedrock services and S3 storage, providing structured validation, logging, and retry behavior to simplify integration with your workflows.

How to use

You interact with the server through an MCP client. Use the client to create knowledge bases and data sources, start and monitor ingestion jobs, perform RAG queries against knowledge bases, and upload or list documents stored in S3. The server exposes a set of tools that validate inputs, handle AWS interactions with retries, and return structured responses with status and metadata.

How to install

Prerequisites you need before you install and run the server:

  • Python 3.12 or newer

  • uvx (the MCP runner) installed on your system

Installation steps

uvx --from git+https://github.com/r3-yamauchi/bedrock-kb-mcp-server bedrock-kb-mcp-server

If you are setting up in a development environment, you can synchronize dependencies with extras as needed.

AWS credentials and environment setup

Configure credentials and region using one of these approaches.

Option 1: AWS profile (recommended)

export AWS_PROFILE=your-profile-name export AWS_REGION=us-east-1

Option 2: Direct environment variables

export AWS_ACCESS_KEY_ID=your-access-key-id export AWS_SECRET_ACCESS_KEY=your-secret-access-key export AWS_REGION=us-east-1

Option 3: If you have already configured AWS CLI with aws configure, you can rely on those settings.

Optional logging configuration

You can adjust logging behavior with environment variables. These affect how verbose the server is and whether logs are emitted in structured (JSON) form.

export FASTMCP_LOG_LEVEL=INFO export FASTMCP_STRUCTURED_LOG=false

Starting the server

Run the MCP server using the runtime command shown here.

uv run bedrock-kb-mcp-server

When the server starts successfully, you should see a startup log line indicating the server is running.

Verification and testing

Use an MCP client to connect to the server and issue tool calls. The server responds with structured results and status information for each operation.

Configuration and capabilities

The server provides a set of MCP tools to manage knowledge bases, data sources, ingestion jobs, RAG queries, and S3 documents. It validates inputs, handles AWS API errors, and normalizes S3 ARNs and IAM role ARNs. You can customize parsing, chunking, and embedding options when creating knowledge bases and data sources.

Troubleshooting and notes

If you encounter issues, set log level to DEBUG and review structured logs if enabled. Common problems include AWS credential errors, region mismatches, and permission issues on S3 buckets or IAM roles. Ensure your AWS credentials and permissions align with the actions you perform (creating knowledge bases, uploading documents, starting ingestion jobs, etc.).

If the server does not start, verify dependency installation, Python version, and the runtime command. Common fixes include re-running dependency synchronization and ensuring the environment variables are correctly exported.

Usage examples and workflow notes

Example workflows involve uploading documents to S3, creating a knowledge base (with S3 storage or S3 vectors), creating data sources, starting ingestion jobs, checking ingestion status, and performing RAG queries against the knowledge base. You can also upload and list S3 documents relevant to your knowledge base.

Available tools

create_knowledge_base

Create a new Knowledge Base with storage type, embedding options, parsing configuration, chunking settings, and IAM role handling.

list_knowledge_bases

List all Knowledge Bases with pagination support.

get_knowledge_base

Fetch detailed information for a specific Knowledge Base.

update_knowledge_base

Update name, description, or IAM role of a Knowledge Base.

create_data_source

Create a data source for a Knowledge Base with parsing and chunking options.

list_data_sources

List all data sources for a given Knowledge Base.

start_ingestion_job

Start a data ingestion job from a data source into a Knowledge Base.

get_ingestion_job

Retrieve the status and statistics of an ingestion job.

retrieve

Execute a RAG query against a Knowledge Base and obtain results.

upload_document_to_s3

Upload a local document to an S3 bucket.

list_s3_documents

List documents stored in an S3 bucket with optional prefix filtering.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational