get_result
Get results for a completed query. Returns error if query is still running.
Run Athena SQL and get the rows back when the query beats the timeout, or a queryExecutionId to pick it up later — plus the saved queries already sitting in the account.
LABSCO SUMMARY
The timeout is a parameter rather than a wall — run_query hands back rows when it can and a queryExecutionId when it cannot, and get_status and get_result pick it up from there, so an agent can start something expensive and come back to it. maxRows caps what lands in the conversation. The set is read-side: nothing here creates a table or saves a query, and results still land in the S3 path you configured.
A server over AWS Athena with 5 tools: run a query, poll it, read its result, and reach saved queries by ID.
OUTPUT_S3_PATH for the S3 location Athena writes results to, and an AWS account with an Athena database the caller can query. MIT licensed.
One command — npx -y @lishenxydlgzs/aws-athena-mcp
USE CASES
Run the SQL with a row cap so the reply stays readable, check the status when it does not come back inside the timeout, and collect the rows once it has finished.
List the named queries in the account, run the one you want by its ID, and point it at a different database when the same SQL has to answer for another environment.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
get_resultGet results for a completed query. Returns error if query is still running.
get_statusGet the current status of a query execution
list_saved_queriesList all saved (named) Athena queries available in your AWS account.
run_queryExecute a SQL query using AWS Athena. Returns full results if query completes before timeout, otherwise returns queryExecutionId.
run_saved_queryExecute a saved (named) Athena query by its query ID.
BEFORE YOU INSTALL
5 tools when we connected. run_query returns rows only if the query finishes within QUERY_TIMEOUT_MS (five minutes by default); otherwise collect results with get_status and get_result. Results cap at 10,000 rows per call.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the 5 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @lishenxydlgzs/aws-athena-mcp{
"mcpServers": {
"athena": {
"command": "npx",
"args": [
"-y",
"@lishenxydlgzs/aws-athena-mcp"
],
"env": {
"OUTPUT_S3_PATH": "s3://<YOUR_BUCKET>/athena-results/",
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "default",
"AWS_ACCESS_KEY_ID": "",
"AWS_SECRET_ACCESS_KEY": "",
"AWS_SESSION_TOKEN": "",
"ATHENA_WORKGROUP": "default_workgroup",
"QUERY_TIMEOUT_MS": "300000",
"MAX_RETRIES": "100",
"RETRY_DELAY_MS": "500"
}
}
}
}