This repository provides a Model Context Protocol (MCP) server that allows AI assistants to execute SQL queries against AWS Athena databases. It retrieves query results, enabling AI to interact with your data.
A Model Context Protocol (MCP) server designed to enable AI assistants to interact with AWS Athena. It allows executing SQL queries against Athena databases and retrieving results, facilitating data analysis and exploration through AI interfaces.
Usage:
The server requires AWS credentials configured via AWS CLI, environment variables, or IAM role. It integrates into an MCP configuration by specifying the command to execute the package with necessary environment variables, including OUTPUT_S3_PATH
for storing query results and optional AWS configuration parameters.
Features:
The server provides three main tools: run_query
to execute SQL queries, get_status
to check query execution status, and get_result
to retrieve results of completed queries. The run_query
tool accepts parameters like database name, SQL query, and maximum rows to return. The other tools use the queryExecutionId
returned by run_query
.
Examples:
The README provides usage examples, including listing databases and tables, retrieving table schemas, previewing table rows, and executing advanced queries with filtering and aggregation.
Requirements:
The server requires Node.js >= 16, AWS credentials with Athena permissions, and an S3 bucket for storing query results.
lishenxydlgzs/aws-athena-mcp
February 25, 2025
March 21, 2025
TypeScript