Labsco
MCP SERVER

AWS Athena MCP Server

by ColeMurray

Run SQL against AWS Athena from an assistant, and get the query execution id back when the query outlives the timeout.

Relational SQL Databases
Summary
Long queries do not fail — they hand back an id you can come back to.

That is the detail that makes Athena workable from a conversation: a query that outruns the timeout returns its execution id, and the assistant polls the status and collects the rows later instead of losing the work. The response also carries data scanned in bytes, so you can see what a query cost before running a wider one.

What it is

A small Athena client over MCP: run a query, poll it, fetch its results, and browse the Glue-backed schema behind it.

What you get
  • run_query — execute SQL against a named database with a max_rows cap; on timeout it returns the query execution id instead of failing
  • get_status — the current state of a query: QUEUED, RUNNING, SUCCEEDED, FAILED or CANCELLED
  • get_result — fetch the rows for a completed query by its execution id
  • list_tables — every table in a database
  • describe_table — column names, types and comments, plus index and key detail
  • Results carry the execution metadata Athena charges on: data scanned in bytes, execution time, and the S3 output location
Requirements

An S3 path for query results in ATHENA_S3_OUTPUT_LOCATION — the one required setting. AWS_REGION, ATHENA_WORKGROUP and ATHENA_TIMEOUT_SECONDS are optional. AWS credentials come from the standard chain: environment variables, an AWS CLI profile, or an instance role. Install from PyPI as aws-athena-mcp and run it with uvx. The README lists the minimum Athena, S3 and Glue permissions.

Setup effort

One command plus a key — uv tool install aws-athena-mcp, then supply credentials