Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Aws Athena Mcp

    MCP server to run AWS Athena queries

    38 stars
    JavaScript
    Updated Oct 19, 2025

    Table of Contents

    • Usage
    • Usage Examples
    • Show All Databases
    • List Tables in a Database
    • Get Table Schema
    • Table Rows Preview
    • Advanced Query with Filtering and Aggregation
    • Checking Query Status
    • Getting Results for a Completed Query
    • Listing Saved Queries
    • Running a Saved Query
    • Requirements
    • License
    • Repository

    Table of Contents

    • Usage
    • Usage Examples
    • Show All Databases
    • List Tables in a Database
    • Get Table Schema
    • Table Rows Preview
    • Advanced Query with Filtering and Aggregation
    • Checking Query Status
    • Getting Results for a Completed Query
    • Listing Saved Queries
    • Running a Saved Query
    • Requirements
    • License
    • Repository

    Documentation

    @lishenxydlgzs/aws-athena-mcp

    smithery badge

    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.

    Usage

    1. Configure AWS credentials using one of the following methods:

    • AWS CLI configuration
    • Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
    • IAM role (if running on AWS)

    2. Add the server to your MCP configuration:

    json
    {
      "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
          }
        }
      }
    }

    3. The server provides the following tools:

    • run_query: Execute a SQL query using AWS Athena
    • Parameters:
    • database: The Athena database to query
    • query: SQL query to execute
    • maxRows: Maximum number of rows to return (default: 1000, max: 10000)
    • Returns:
    • If query completes within timeout: Full query results
    • If timeout reached: Only the queryExecutionId for later retrieval
    • get_status: Check the status of a query execution
    • Parameters:
    • queryExecutionId: The ID returned from run_query
    • Returns:
    • state: Query state (QUEUED, RUNNING, SUCCEEDED, FAILED, or CANCELLED)
    • stateChangeReason: Reason for state change (if any)
    • submissionDateTime: When the query was submitted
    • completionDateTime: When the query completed (if finished)
    • statistics: Query execution statistics (if available)
    • get_result: Retrieve results for a completed query
    • Parameters:
    • queryExecutionId: The ID returned from run_query
    • maxRows: Maximum number of rows to return (default: 1000, max: 10000)
    • Returns:
    • Full query results if the query has completed successfully
    • Error if query failed or is still running
    • list_saved_queries: List all saved (named) queries in Athena.
    • Returns:
    • An array of saved queries with id, name, and optional description
    • Queries are returned from the configured ATHENA_WORKGROUP and AWS_REGION
    • run_saved_query: Run a previously saved query by its ID.
    • Parameters:
    • namedQueryId: ID of the saved query
    • databaseOverride: Optional override of the saved query's default database
    • maxRows: Maximum number of rows to return (default: 1000)
    • timeoutMs: Timeout in milliseconds (default: 60000)
    • Returns:
    • Same behavior as run_query: full results or execution ID

    ---

    Usage Examples

    Show All Databases

    Message to AI Assistant:

    List all databases in Athena```
    MCP parameter:

    {

    "database": "default",

    "query": "SHOW DATABASES"

    }

    code
    ### List Tables in a Database
    Message to AI Assistant:

    MCP parameter:

    json
    {
      "database": "default",
      "query": "SHOW TABLES"
    }

    Get Table Schema

    Message to AI Assistant:

    What's the schema of the asin_sitebestimg table?```
    MCP parameter:

    {

    "database": "default",

    "query": "DESCRIBE default.asin_sitebestimg"

    }

    code
    ### Table Rows Preview
    Message to AI Assistant:

    MCP parameter:

    json
    {
      "database": "my_database",
      "query": "SELECT * FROM my_table LIMIT 10",
      "maxRows": 10
    }

    Advanced Query with Filtering and Aggregation

    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

    }

    code
    ### Checking Query Status

    {

    "queryExecutionId": "12345-67890-abcdef"

    }

    code
    ### Getting Results for a Completed Query

    {

    "queryExecutionId": "12345-67890-abcdef",

    "maxRows": 10

    }

    code
    ### Listing Saved Queries

    {

    "name": "list_saved_queries",

    "arguments": {}

    }

    code
    ### Running a Saved Query

    {

    "name": "run_saved_query",

    "arguments": {

    "namedQueryId": "abcd-1234-efgh-5678",

    "maxRows": 100

    }

    }

    code
    ---
    
    ## Requirements
    
    - Node.js >= 16
    - AWS credentials with appropriate Athena and S3 permissions
    - S3 bucket for query results
    - Named queries (optional) must exist in the specified `ATHENA_WORKGROUP` and `AWS_REGION`
    
    ---
    
    ## License
    
    MIT
    
    ## Repository
    
    [GitHub Repository](https://github.com/lishenxydlgzs/aws-athena-mcp)

    Similar MCP

    Based on tags & features

    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • RI

      Rijksmuseum Mcp

      JavaScript·
      59
    • WA

      Waha Mcp

      JavaScript00
    • WI

      Wizzy Mcp Tmdb

      JavaScript00
    • MC

      Mcp Server Playwright

      JavaScript·
      262

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k