Skip to main content
Glama
README.md
# athena-mcp

An AWS Athena MCP Server using FastMCP. It provides secure access to AWS Athena operations with manual AWS credential authentication.

## Overview

This project provides a set of tools to interact with AWS Athena. These tools are built using the `mcp` library and `boto3`. The server uses manual AWS credential authentication, reading credentials from environment variables.

## Features

The following Athena operations are supported:

*   **Workgroups:**
    *   `list_work_groups`: List all Athena work groups.
    *   `get_work_group`: Get details about a work group.
*   **Databases:**
    *   `list_databases`: List databases in a data catalog.
*   **Tables:**
    *   `list_tables`: List tables in a database.
    *   `get_table_metadata`: Get metadata for a specific table.
*   **Queries:**
    *   `start_query_execution`: Execute a SQL query in Athena.
    *   `get_query_execution`: Get details about a query execution.
    *   `get_query_results`: Get results from a completed query.
    *   `stop_query_execution`: Stop a running query execution.
    *   `list_query_executions`: List recent query executions.
*   **Named Queries:**
    *   `create_named_query`: Create a named query.
    *   `list_named_queries`: List named queries.
    *   `get_named_query`: Get details about a named query.
    *   `delete_named_query`: Delete a named query.
*   **Data Catalogs:**
    *   `list_data_catalogs`: List data catalogs.

## Getting Started

### Prerequisites

*   Python >= 3.13
*   AWS account with Athena access

### Installation

1.  Clone the repository:
    ```bash
    git clone https://github.com/your-username/athena-mcp.git
    cd athena-mcp
    ```
2.  Install the dependencies:
    ```bash
    pip install -r requirements.txt
    ```

### Configuration

1.  Create a `.env` file in the root of the project and add your AWS credentials:
    ```
    AWS_ACCESS_KEY_ID=your-access-key
    AWS_SECRET_ACCESS_KEY=your-secret-key
    AWS_SESSION_TOKEN=your-session-token (optional)
    AWS_REGION=your-aws-region
    ```

### Usage

To start the server, run the following command:

```bash
athena-mcp
```

This will start the FastMCP server, and you can then use the provided tools to interact with AWS Athena.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

TDQS

A3.5/5.0

Scored across 15 tools

Disambiguation5/5

Each tool targets a distinct resource and action: work groups, catalogs, databases, tables, query executions, and named queries are clearly separated. Even similar tools like get_query_execution and get_query_results are unambiguous because one returns execution status and the other returns result rows.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, such as list_*, get_*, create_*, delete_*, start_*, and stop_*. This makes the API predictable and easy for an agent to navigate.

Tool Count5/5

Fifteen tools is well-scoped for an Athena MCP server covering catalog discovery, query execution, and named query management. Each tool earns its place and the count stays within the ideal range without redundancy.

Completeness4/5

The core Athena workflow is well covered: discover catalogs/databases/tables, run and manage query executions, and manage named queries. Minor gaps include the absence of update_named_query and limited work group/catalog management beyond listing and getting details.

Maintenance

ActivityInactive
ResponsivenessNo issues