AWS Athena

AWS Athena

An MCP server for AWS Athena to run SQL queries on Glue Catalog.

38
Stars
15
Forks
0
Releases

Overview

An MCP server that enables AI assistants to run SQL queries on AWS Athena and retrieve results. It connects to Athena using configured AWS credentials and outputs results to a user-specified S3 path. The server can be integrated into an MCP configuration by defining an entry under mcpServers with command 'npx' and args ['-y','@lishenxydlgzs/aws-athena-mcp']. It supports optional AWS settings (region, profile, access keys, session token) and optional server options such as ATHENA_WORKGROUP, QUERY_TIMEOUT_MS, MAX_RETRIES, and RETRY_DELAY_MS. Core tools provided include run_query to submit SQL against a database, get_status to monitor query progress, get_result to fetch results, list_saved_queries to enumerate named queries, and run_saved_query to execute a previously saved query. The README includes usage examples for listing databases, showing tables, describing table schemas, previewing rows, and performing advanced queries with filtering and aggregation. To use, configure credentials (via AWS CLI, environment variables, or IAM role), specify OUTPUT_S3_PATH for results, and ensure appropriate Athena and S3 permissions. Requires Node.js >= 16.

Details

Owner
lishenxydlgzs
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

run_query

Submit a SQL query to AWS Athena, specifying database, query, and optional maxRows; returns full results or a queryExecutionId if timeout is reached.

get_status

Check the state of a running or completed query; returns state, stateChangeReason, submissionDateTime, completionDateTime, and statistics.

get_result

Retrieve results for a completed query; supports maxRows and returns full results or an error if the query has not finished or failed.

list_saved_queries

List all saved (named) queries in Athena for the configured workgroup and region; returns an array of queries with id, name, and optional description.

run_saved_query

Run a previously saved query by its ID with optional database override and maxRows; returns the same results behavior as run_query.

Tags

MCPAWS AthenaSQLAthenaGlue CatalogS3Query executionSaved queriesWorkGroupAWS credentials