Provides analytics tools for querying S3 bucket operations data, including top buckets by operations, inbound traffic, and outbound traffic metrics stored in ClickHouse
S3 Butler
A Model Context Protocol (MCP) server that provides tools for S3 bucket management, IAM policy inspection, and ClickHouse analytics.
Quick Start
Your MCP server is now running at http://localhost:8000/mcp š
Environment Setup
Create a .env file with your credentials:
Available Tools
The server provides these MCP tools:
get_team_name- Returns the team namelist_buckets- Lists all S3 bucketsget_iam_policies_for_bucket- Shows IAM policies for a specific bucketget_top_buckets_by_operations- Analytics: most active buckets (requires ClickHouse)get_top_buckets_by_inbound_traffic- Analytics: buckets with most uploads (requires ClickHouse)get_top_buckets_by_outbound_traffic- Analytics: buckets with most downloads (requires ClickHouse)
Testing Your Server
Option 1: MCP Inspector (Recommended)
Option 2: Test Scripts
Remote Access with ngrok
To access your server remotely:
Development
Project Structure
Adding New Tools
Edit src/server.py and add your tool:
Code Quality
Troubleshooting
Server won't start
Check Python version:
python --version(needs 3.10+)Verify
.envfile exists and has correct credentialsCheck if port 8000 is already in use
Can't connect to S3/IAM
Verify
S3_ENDPOINTandIAM_ENDPOINTare correctCheck
S3_ACCESS_KEYandS3_SECRET_KEYare validTest connection:
uv run python test_list_buckets.py
ClickHouse tools not showing
Set
CLICKHOUSE_HOSTin.envVerify ClickHouse is running and accessible
Check logs for connection errors
This server cannot be installed