AWS Athena MCP Server

AWS Athena MCP Server

aws-athena-mcp-server•byvipink1203

An MCP server for AWS Athena that lets AI agents query Athena and explore database metadata, built for integration with n8n AI agents.

License: MIT•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Executes SQL queries against Athena and retrieves the results, with options for database, catalog, workgroup, output location, and result limits.
  • •Lists available databases in a catalog and lists tables within a specified database.
  • •Retrieves table metadata including column definitions.
  • •Is configurable via environment variables and containerized for deployment, including Kubernetes-ready EKS manifests.

BEST FOR

  • •n8n AI agents that need to query AWS Athena data.
  • •Teams deploying a containerized Athena access service to Kubernetes or EKS.

ABOUT AWS-ATHENA-MCP-SERVER

AWS Athena MCP Server is cataloged as an MCP server attributed to vipink1203. An MCP server for AWS Athena that lets AI agents query Athena and explore database metadata, built for integration with n8n AI agents. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for AWS Athena MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which tools does the server expose to AI agents?

It exposes execute_query, list_databases, list_tables, and get_table_metadata tools.

What is required to run Athena queries?

An S3 output location for query results, supplied via ATHENA_OUTPUT_LOCATION, is required.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4e88f28e9eca · 采集于 2026-11-13 11:46:20 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

AWS Athena MCP Server

A Model Context Protocol (MCP) server for AWS Athena, designed to integrate with n8n AI agents.

Overview

This MCP server provides a standardized way for n8n AI agents to query AWS Athena and retrieve data. It implements the Model Context Protocol, allowing n8n agents to:

  1. List available databases and tables
  2. Get table schemas and metadata
  3. Execute SQL queries and retrieve results

Features

  • Simple API for interacting with Athena from n8n AI agents
  • Built-in health checks and monitoring
  • Configurable through environment variables
  • Containerized for easy deployment
  • Kubernetes-ready with sample EKS manifests

Prerequisites

  • AWS account with Athena access
  • AWS credentials with appropriate permissions
  • Docker for local development/testing
  • Kubernetes/EKS for production deployment

Environment Variables

The server is configured using the following environment variables:

VariableDescriptionDefault
AWS_REGIONAWS region for Athenaus-east-1
ATHENA_CATALOGAthena catalog nameAwsDataCatalog
ATHENA_DATABASEDefault database to useNone
ATHENA_WORKGROUPAthena workgroup to useprimary
ATHENA_OUTPUT_LOCATIONS3 location for query resultsNone (required)
HOSTHost to bind the server0.0.0.0
PORTPort to listen on8050

Available Tools

The MCP server provides the following tools to n8n AI agents:

execute_query

Execute SQL queries against Athena and retrieve results.

Parameters:

  • query (string, required): SQL query to execute
  • database (string, optional): Database name
  • catalog (string, optional): Catalog name
  • output_location (string, optional): S3 location for results
  • workgroup (string, optional): Workgroup name
  • max_results (integer, optional): Maximum number of results to return
  • max_wait_seconds (integer, optional): Maximum time to wait for query completion

list_databases

List available databases in a catalog.

Parameters:

  • catalog (string, optional): Catalog name

list_tables

List tables in a specific database.

Parameters:

  • database (string, required): Database name
  • catalog (string, optional): Catalog name

get_table_metadata

Get metadata for a specific table, including column definitions.

Parameters:

  • table (string, required): Table name
  • database (string, required): Database name
  • catalog (string, optional): Catalog name

Local Development

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/aws-athena-mcp-server.git
cd aws-athena-mcp-server
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure AWS credentials:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_REGION=your_region
export ATHENA_OUTPUT_LOCATION=s3://your-bucket/folder/
  1. Run the server:
python main.py

The server will be available at http://localhost:8050.

Docker Setup

Building the Docker Image

docker build -t athena-mcp-server:latest .

Running the Docker Container

docker run -p 8050:8050 \
  -e AWS_REGION=us-east-1 \
  -e ATHENA_OUTPUT_LOCATION=s3://your-bucket/folder/ \
  -e AWS_ACCESS_KEY_ID=your_access_key \
  -e AWS_SECRET_ACCESS_KEY=your_secret_key \
  athena-mcp-server:latest

Deploying to AWS EKS

Prerequisites

  • AWS CLI configured with appropriate permissions
  • kubectl installed and configured to connect to your EKS cluster
  • Docker installed for building images

Deployment Steps

  1. Build and push the Docker image to ECR:
# Create ECR repository if it doesn't exist
aws ecr create-repository --repository-name athena-mcp-server

# Get ECR login command
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com

# Build and tag the image
docker build -t ${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/athena-mcp-server:latest .

# Push the image to ECR
docker push ${AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com/athena-mcp-server:latest
  1. Create IAM role for the EKS service account:
# Create IAM policy
aws iam create-policy \
  --policy-name AthenaQueryPolicy \
  --policy-document file://k8s/aws-policy.json

# Create IAM role for service account (IRSA)
eksctl create iamserviceaccount \
  --name athena-mcp-server \
  --namespace default \
  --cluster your-eks-cluster \
  --attach-policy-arn arn:aws:iam::${AWS_ACCOUNT_ID}:policy/AthenaQueryPolicy \
  --approve \
  --override-existing-serviceaccounts
  1. Update Kubernetes manifest placeholders with actual values:
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
export AWS_REGION=us-east-1
export ATHENA_DEFAULT_DATABASE=your_database
export ATHENA_WORKGROUP=primary
export ATHENA_OUTPUT_LOCATION=s3://your-bucket/athena-results/

# Replace variables in YAML files
envsubst < k8s/deployment.yaml > k8s/generated/deployment.yaml
envsubst < k8s/serviceaccount.yaml > k8s/generated/serviceaccount.yaml
  1. Apply Kubernetes manifests:
kubectl apply -f k8s/generated/serviceaccount.yaml
kubectl apply -f k8s/generated/deployment.yaml
kubectl apply -f k8s/generated/service.yaml
  1. Verify deployment:
kubectl get pods -l app=athena-mcp-server
kubectl get service athena-mcp-server
  1. (Optional) Create an ingress resource if you need external access.

Integration with n8n

To use this MCP server with n8n:

  1. Deploy the MCP server to your infrastructure
  2. Configure the n8n AI Agent node with the appropriate System Prompt (see docs/n8n_system_prompt_template.md)
  3. Connect to the MCP server endpoint from n8n

n8n AI Agent System Prompt Template

Use the template in docs/n8n_system_prompt_template.md for the n8n AI Agent node System Prompt. This template guides the AI in:

  • Understanding database schema
  • Formulating efficient SQL queries
  • Executing queries via the MCP server
  • Presenting results clearly

Customize the template with your specific Athena database structure and common query patterns.

Documentation

Additional documentation can be found in the docs/ directory:

  • n8n_system_prompt_template.md: Template for n8n AI Agent system prompt
  • implementation_guide.md: Detailed implementation guide
  • architecture.md: Architecture diagram and explanation
  • troubleshooting.md: Solutions for common issues
  • n8n_integration_example.md: Example n8n workflow
  • examples/: Directory with example prompts for specific use cases

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for AWS Athena MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/aws-athena-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage