s3-select-mcp

raycblai/s3-select-mcp

3.3

If you are the rightful owner of s3-select-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This MCP server provides tools to query S3 objects using S3 Select with natural language queries.

Tools
  1. s3-select___list_s3_files

    List all files in the configured S3 bucket

  2. s3-select___translate_to_s3_select_query

    Convert natural language to S3 Select SQL

  3. s3-select___execute_s3_select_query

    Run an S3 Select query on a specific file

  4. s3-select___natural_language_s3_select

    Search across files using natural language

S3 Select MCP Server

This MCP server provides tools to query S3 objects using S3 Select with natural language queries.

Features

  • List files in an S3 bucket
  • Translate natural language queries to S3 Select SQL queries
  • Execute S3 Select queries on specific files
  • Search across multiple files with a single natural language query

Setup

  1. Install the required dependencies:
pip install -r requirements.txt
  1. Configure AWS credentials:

Make sure you have the bedrockuser profile configured in your AWS credentials file.

  1. Start the MCP server:
python s3_select_mcp_server.py
  1. Register the MCP server with Amazon Q CLI:
q mcp add s3-select http://localhost:8080

Usage

Once the server is running and registered with Amazon Q, you can use the following tools:

  • s3-select___list_s3_files: List all files in the configured S3 bucket
  • s3-select___translate_to_s3_select_query: Convert natural language to S3 Select SQL
  • s3-select___execute_s3_select_query: Run an S3 Select query on a specific file
  • s3-select___natural_language_s3_select: Search across files using natural language

Example Queries

  • "Find all records where age is greater than 30"
  • "Show me sales data from January 2023"
  • "List customers from California with purchases over $1000"

Configuration

The server is configured to use:

  • AWS Profile: bedrockuser
  • AWS Region: us-west-2
  • S3 Bucket: amazon-q-280792572112-artifacts
  • S3 Prefix: s3-select-data

To change these settings, modify the constants at the top of the s3_select_mcp_server.py file.