{
  "name": "aws-athena",
  "display_name": "AWS Athena",
  "description": "A MCP server for AWS Athena to run SQL queries on Glue Catalog.",
  "repository": {
    "type": "git",
    "url": "https://github.com/lishenxydlgzs/aws-athena-mcp"
  },
  "homepage": "https://github.com/lishenxydlgzs/aws-athena-mcp",
  "author": {
    "name": "lishenxydlgzs"
  },
  "license": "MIT",
  "categories": [
    "Databases"
  ],
  "tags": [
    "athena",
    "sql",
    "aws"
  ],
  "installations": {
    "npm": {
      "type": "npm",
      "command": "npx",
      "args": [
        "-y",
        "@lishenxydlgzs/aws-athena-mcp"
      ],
      "env": {
        "OUTPUT_S3_PATH": "${OUTPUT_S3_PATH}",
        "AWS_REGION": "${AWS_REGION}",
        "AWS_PROFILE": "${AWS_PROFILE}",
        "AWS_ACCESS_KEY_ID": "${AWS_ACCESS_KEY_ID}",
        "AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}",
        "AWS_SESSION_TOKEN": "${AWS_SESSION_TOKEN}",
        "QUERY_TIMEOUT_MS": "${QUERY_TIMEOUT_MS}",
        "MAX_RETRIES": "${MAX_RETRIES}",
        "RETRY_DELAY_MS": "${RETRY_DELAY_MS}"
      }
    }
  },
  "examples": [
    {
      "title": "Show All Databases",
      "description": "Lists all databases in Athena",
      "prompt": "{\"database\": \"default\", \"query\": \"SHOW DATABASES\"}"
    },
    {
      "title": "List Tables in a Database",
      "description": "Shows all tables in the default database",
      "prompt": "{\"database\": \"default\", \"query\": \"SHOW TABLES\"}"
    },
    {
      "title": "Get Table Schema",
      "description": "Fetches the schema of the asin_sitebestimg table",
      "prompt": "{\"database\": \"default\", \"query\": \"DESCRIBE default.asin_sitebestimg\"}"
    },
    {
      "title": "Table Rows Preview",
      "description": "Shows some rows from my_database.mytable",
      "prompt": "{\"database\": \"my_database\", \"query\": \"SELECT * FROM my_table LIMIT 10\", \"maxRows\": 10}"
    },
    {
      "title": "Advanced Query with Filtering and Aggregation",
      "description": "Finds the average price by category for in-stock products",
      "prompt": "{\"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}"
    }
  ],
  "arguments": {
    "OUTPUT_S3_PATH": {
      "description": "S3 bucket path for saving Athena query results.",
      "required": true,
      "example": "s3://your-bucket/athena-results/"
    },
    "AWS_REGION": {
      "description": "The AWS region to use for Athena queries, defaults to AWS CLI default region.",
      "required": false,
      "example": "us-east-1"
    },
    "AWS_PROFILE": {
      "description": "AWS CLI profile to use, defaults to 'default' profile.",
      "required": false,
      "example": "default"
    },
    "AWS_ACCESS_KEY_ID": {
      "description": "AWS access key for authentication, if not using IAM role or environment variables.",
      "required": false,
      "example": ""
    },
    "AWS_SECRET_ACCESS_KEY": {
      "description": "AWS secret key for authentication, if not using IAM role or environment variables.",
      "required": false,
      "example": ""
    },
    "AWS_SESSION_TOKEN": {
      "description": "Session token for temporary AWS credentials, if using temporary access.",
      "required": false,
      "example": ""
    },
    "QUERY_TIMEOUT_MS": {
      "description": "Timeout setting for queries in milliseconds (default: 300000 ms).",
      "required": false,
      "example": "300000"
    },
    "MAX_RETRIES": {
      "description": "Number of retry attempts for failed queries (default: 100).",
      "required": false,
      "example": "100"
    },
    "RETRY_DELAY_MS": {
      "description": "Delay between retry attempts in milliseconds (default: 500 ms).",
      "required": false,
      "example": "500"
    }
  },
  "tools": [
    {
      "name": "run_query",
      "description": "Execute a SQL query using AWS Athena. Returns full results if query completes before timeout, otherwise returns queryExecutionId.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "database": {
            "type": "string",
            "description": "The Athena database to query"
          },
          "query": {
            "type": "string",
            "description": "SQL query to execute"
          },
          "maxRows": {
            "type": "number",
            "description": "Maximum number of rows to return (default: 1000)",
            "minimum": 1,
            "maximum": 10000
          },
          "timeoutMs": {
            "type": "number",
            "description": "Timeout in milliseconds (default: 60000)",
            "minimum": 1000
          }
        },
        "required": [
          "database",
          "query"
        ]
      }
    },
    {
      "name": "get_result",
      "description": "Get results for a completed query. Returns error if query is still running.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "queryExecutionId": {
            "type": "string",
            "description": "The query execution ID"
          },
          "maxRows": {
            "type": "number",
            "description": "Maximum number of rows to return (default: 1000)",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "required": [
          "queryExecutionId"
        ]
      }
    },
    {
      "name": "get_status",
      "description": "Get the current status of a query execution",
      "inputSchema": {
        "type": "object",
        "properties": {
          "queryExecutionId": {
            "type": "string",
            "description": "The query execution ID"
          }
        },
        "required": [
          "queryExecutionId"
        ]
      }
    }
  ]
}