CA

colemurray/aws-athena-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

24 stars 12 forks 质量 83 趋势 30MIT

AWS Athena MCP 使用 FastMCP

概览

一个简单、干净的MCP(模型上下文协议)服务器,用于AWS Athena集成。通过标准化接口执行SQL查询、发现模式并管理查询执行。 - - 5分钟内启动 - - 模块化、经过充分测试、易于理解 - - 查询执行和模式发现 - - 完整类型提示和Pydantic模型 - - 为异步/等待性能打造 - - 开箱即用,配置最少 就是这样!服务器现在已经运行,准备接受MCP连接。 要将此 MCP 服务器与 Claude Desktop 一起使用: 如果你还没安装Claude Desktop,赶紧下载并安装。 将以下配置添加到您的claude_desktop_config.json中: - : ~/库/应用支持/Claude/claude_desktop_config.json - : %APPDATA%\Claude\claude_desktop_config.json 使用选项1(uvx)作为最常见的MCP设置模式。选项2(已安装工具)性能更好,因为它避免每次启动时的软件包解析。

概述(AI 翻译)

一个简单、干净的MCP(模型上下文协议)服务器,用于AWS Athena集成。通过标准化接口执行SQL查询、发现模式并管理查询执行。

✨ 特色

  • 简单设置 - 5分钟内开始运行
  • 简洁架构 - 模块化、经过充分测试、易于理解
  • 必备工具 - 查询执行与模式发现
  • 类型安全 - 完整类型提示和Pydantic模型
  • 异步支持 - 专为性能设计,支持异步/等待
  • 良好默认值 - 开箱即用,配置极少

🚀 快速启动

1.安装

2.配置

设置所需的环境变量:

3.跑

就是这样!服务器现在已经运行,准备接受MCP连接。

🤖 Claude桌面集成

要将此 MCP 服务器与 Claude Desktop 一起使用:

1.安装Claude桌面版

如果你还没安装Claude Desktop,赶紧下载并安装。

2.配置Claude Desktop

在你的claude_desktop_config.json中添加以下配置:

配置文件位置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

AWS Athena MCP Server

A simple, clean MCP (Model Context Protocol) server for AWS Athena integration. Execute SQL queries, discover schemas, and manage query executions through a standardized interface.

✨ Features

  • Simple Setup - Get running in under 5 minutes
  • Clean Architecture - Modular, well-tested, easy to understand
  • Essential Tools - Query execution and schema discovery
  • Type Safe - Full type hints and Pydantic models
  • Async Support - Built for performance with async/await
  • Good Defaults - Works out of the box with minimal configuration

🚀 Quick Start

1. Install

# From PyPI with uv (recommended for Claude Desktop)
uv tool install aws-athena-mcp

# From PyPI with pip
pip install aws-athena-mcp

# Or from source
git clone https://github.com/ColeMurray/aws-athena-mcp
cd aws-athena-mcp
pip install -e .

2. Configure

Set the required environment variables:

# Required
export ATHENA_S3_OUTPUT_LOCATION=s3://your-bucket/athena-results/

# Optional (with defaults)
export AWS_REGION=us-east-1
export ATHENA_WORKGROUP=primary
export ATHENA_TIMEOUT_SECONDS=60

3. Run

# Start the MCP server (if installed with uv tool install)
aws-athena-mcp

# Or run directly with uv (without installing)
uv tool run aws-athena-mcp

# Or run directly with uvx (without installing)
uvx aws-athena-mcp

# Or run directly with Python
python -m athena_mcp.server

That’s it! The server is now running and ready to accept MCP connections.

🤖 Claude Desktop Integration

To use this MCP server with Claude Desktop:

1. Install Claude Desktop

Download and install Claude Desktop if you haven’t already.

2. Configure Claude Desktop

Add the following configuration to your claude_desktop_config.json:

Location of config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Configuration (Option 1 - Using uvx - Recommended):

{
  "mcpServers": {
    "aws-athena-mcp": {
      "command": "uvx",
      "args": [
        "aws-athena-mcp"
      ],
      "env": {
        "ATHENA_S3_OUTPUT_LOCATION": "s3://your-bucket/athena-results/",
        "AWS_REGION": "us-east-1",
        "ATHENA_WORKGROUP": "primary",
        "ATHENA_TIMEOUT_SECONDS": "60"
      }
    }
  }
}

Configuration (Option 2 - Using installed tool):

{
  "mcpServers": {
    "aws-athena-mcp": {
      "command": "aws-athena-mcp",
      "env": {
        "ATHENA_S3_OUTPUT_LOCATION": "s3://your-bucket/athena-results/",
        "AWS_REGION": "us-east-1",
        "ATHENA_WORKGROUP": "primary",
        "ATHENA_TIMEOUT_SECONDS": "60"
      }
    }
  }
}

Configuration (Option 3 - Using uv tool run):

{
  "mcpServers": {
    "aws-athena-mcp": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "aws-athena-mcp"
      ],
      "env": {
在 GitHub 查看完整 README

安装

uvx aws-athena-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "aws-athena-mcp": { "command": "uvx", "args": [ "aws-athena-mcp" ], "env": { "ATHENA_S3_OUTPUT_LOCATION": "s3://your-bucket/athena-results/", "AWS_REGION": "us-east-1", "ATHENA_WORKGROUP": "primary", "ATHENA_TIMEOUT_SECONDS": "60" } } } }