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
.env
file exists and has correct credentialsCheck if port 8000 is already in use
Can't connect to S3/IAM
Verify
S3_ENDPOINT
andIAM_ENDPOINT
are correctCheck
S3_ACCESS_KEY
andS3_SECRET_KEY
are validTest connection:
uv run python test_list_buckets.py
ClickHouse tools not showing
Set
CLICKHOUSE_HOST
in.env
Verify ClickHouse is running and accessible
Check logs for connection errors
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides team information retrieval capabilities through HTTP streaming transport. Built with FastMCP 2.0+ and includes ngrok integration for easy testing and development.