by lishenxydlgzs
aws-athena-mcp is a Model Context Protocol (MCP) server that enables AI assistants to interact with AWS Athena. It allows AI assistants to execute SQL queries and retrieve results from AWS Athena databases.
aws-athena-mcp is a Model Context Protocol (MCP) server designed to enable AI assistants to interact with AWS Athena. It allows AI assistants to execute SQL queries against AWS Athena databases and retrieve results, effectively bridging the gap between AI and data stored in AWS Athena.
To use aws-athena-mcp, you need to follow these steps:
AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
), or an IAM role if running on AWS.aws-athena-mcp
server in your MCP configuration file, specifying the OUTPUT_S3_PATH
for query results and optionally configuring AWS region, profile, access keys, Athena WorkGroup, query timeout, and retry settings.run_query
: Execute SQL queries.get_status
: Check the status of a query execution.get_result
: Retrieve results for a completed query.list_saved_queries
: List all saved (named) queries in Athena.run_saved_query
: Run a previously saved query by its ID.maxRows
and timeoutMs
for queries.aws-athena-mcp can be used in various scenarios where AI assistants need to interact with data in AWS Athena, including:
What are the requirements to run aws-athena-mcp?
ATHENA_WORKGROUP
and AWS_REGION
.How do I configure AWS credentials?
AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
), or an IAM role.What is the OUTPUT_S3_PATH
used for?
OUTPUT_S3_PATH
is a required environment variable that specifies the S3 bucket where Athena query results will be stored.Can I specify a different Athena WorkGroup?
ATHENA_WORKGROUP
environment variable.How do I run a saved query?
run_saved_query
tool, providing the namedQueryId
of the saved query.What happens if a query times out?
run_query
tool will return only the queryExecutionId
for later retrieval of results.A Model Context Protocol (MCP) server for running AWS Athena queries. This server enables AI assistants to execute SQL queries against your AWS Athena databases and retrieve results.
Configure AWS credentials using one of the following methods:
AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
)Add the server to your MCP configuration:
{
"mcpServers": {
"athena": {
"command": "npx",
"args": ["-y", "@lishenxydlgzs/aws-athena-mcp"],
"env": {
// Required
"OUTPUT_S3_PATH": "s3://your-bucket/athena-results/",
// Optional AWS configuration
"AWS_REGION": "us-east-1", // Default: AWS CLI default region
"AWS_PROFILE": "default", // Default: 'default' profile
"AWS_ACCESS_KEY_ID": "", // Optional: AWS access key
"AWS_SECRET_ACCESS_KEY": "", // Optional: AWS secret key
"AWS_SESSION_TOKEN": "", // Optional: AWS session token
// Optional server configuration
"ATHENA_WORKGROUP": "default_workgroup", // Optional: specify the Athena WorkGroup
"QUERY_TIMEOUT_MS": "300000", // Default: 5 minutes (300000ms)
"MAX_RETRIES": "100", // Default: 100 attempts
"RETRY_DELAY_MS": "500" // Default: 500ms between retries
}
}
}
}
run_query
: Execute a SQL query using AWS Athena
get_status
: Check the status of a query execution
get_result
: Retrieve results for a completed query
list_saved_queries
: List all saved (named) queries in Athena.
Returns:
id
, name
, and optional description
ATHENA_WORKGROUP
and AWS_REGION
run_saved_query: Run a previously saved query by its ID.
Parameters:
namedQueryId
: ID of the saved querydatabaseOverride
: Optional override of the saved query's default databasemaxRows
: Maximum number of rows to return (default: 1000)timeoutMs
: Timeout in milliseconds (default: 60000)Returns:
run_query
: full results or execution IDMessage to AI Assistant:
List all databases in Athena
MCP parameter:
{
"database": "default",
"query": "SHOW DATABASES"
}
Message to AI Assistant:
Show me all tables in the default database
MCP parameter:
{
"database": "default",
"query": "SHOW TABLES"
}
Message to AI Assistant:
What's the schema of the asin_sitebestimg table?
MCP parameter:
{
"database": "default",
"query": "DESCRIBE default.asin_sitebestimg"
}
Message to AI Assistant:
Show some rows from my_database.mytable
MCP parameter:
{
"database": "my_database",
"query": "SELECT * FROM my_table LIMIT 10",
"maxRows": 10
}
Message to AI Assistant:
Find the average price by category for in-stock products
MCP parameter:
{
"database": "my_database",
"query": "SELECT category, COUNT(*) as count, AVG(price) as avg_price FROM products WHERE in_stock = true GROUP BY category ORDER BY count DESC",
"maxRows": 100
}
{
"queryExecutionId": "12345-67890-abcdef"
}
{
"queryExecutionId": "12345-67890-abcdef",
"maxRows": 10
}
{
"name": "list_saved_queries",
"arguments": {}
}
{
"name": "run_saved_query",
"arguments": {
"namedQueryId": "abcd-1234-efgh-5678",
"maxRows": 100
}
}
ATHENA_WORKGROUP
and AWS_REGION
MIT
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by daytonaio
Provides a secure, elastic sandbox environment for executing AI‑generated code with isolated runtimes and sub‑90 ms provisioning.
by awslabs
Specialized servers that expose AWS capabilities through the Model Context Protocol, allowing AI assistants and other applications to retrieve up‑to‑date AWS documentation, manage infrastructure, query services, and perform workflow automation directly from their context.
by awslabs
AWS MCP Servers allow AI agents to interact with and manage a wide range of AWS services using natural language commands. They enable AI-powered cloud management, automated DevOps, and data-driven insights within the AWS ecosystem.
by cloudflare
Remote Model Context Protocol endpoints that let AI clients read, process, and act on data across Cloudflare services such as Workers, Radar, Observability, and more.
by supabase-community
Enables AI assistants to interact directly with Supabase projects, allowing them to query databases, fetch configuration, manage tables, and perform other project‑level operations.
by Azure
azure-mcp is a server that implements the Model Context Protocol (MCP) to connect AI agents with Azure services. It allows developers to interact with Azure resources like Storage, Cosmos DB, and the Azure CLI using natural language commands within their development environment.
by Flux159
MCP Server for Kubernetes management commands, enabling interaction with Kubernetes clusters to manage pods, deployments, and services.
by strowk
Provides a Golang‑based server that enables interaction with Kubernetes clusters via prompts, allowing listing of contexts, namespaces, resources, nodes, pods, events, logs, and executing commands inside pods.
by jamsocket
Run arbitrary Python code securely in persistent, stateful sandboxes that remain available indefinitely.