
s3 mcp
通过模型上下文协议 (MCP) 将 AWS S3 接口作为工具提供给 LLM 代理使用。
Repository Info
About This Server
通过模型上下文协议 (MCP) 将 AWS S3 接口作为工具提供给 LLM 代理使用。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
🗂️ Simple S3 MCP Server
This server exposes an AWS S3 interface as tools for an LLM agent via the Model Context Protocol (MCP).
✅ Available Tools
| Tool | Description |
|---|---|
list_files | Lists all object keys in a bucket |
list_keys_with_metadata | Lists keys with storage class and region |
get_file_content | Returns content of UTF-8 .txt files |
upload_text | Uploads a text string as a file |
upload_file | Uploads a local file by path |
upload_report | Uploads multi-line report as .txt |
delete_file | Deletes a file from S3 |
download_and_preview | Downloads and prints .txt or .pdf |
check_authorization | Checks if AWS credentials are valid |
create_bucket | Creates a new S3 bucket |
⚠️ Common Problems and Fixes
1. ❌ SSE connection not established or 500 Internal Server Error
- Cause: Tool crashed due to large files or invalid UTF-8 content
- Fix: Use
get_file_contentonly for small.txtfiles
2. ❌ MCP error -32001: Request timed out
- Cause: Tool (e.g.
get_file_content) taking too long or file is large - Fix: Use truncated previews or limit to first few KB of content
3. ❌ Invalid bucket name or The specified key does not exist
- Fix: Ensure no trailing spaces in input fields
- Solution: All tools automatically apply
.strip()to inputs
4. 🧠 JSON formatting issues in upload_report
- Fix: Must enter
linesas valid JSON array:[ "Line 1", "Line 2" ]
- Create and activate virtual environment
- python3 -m venv venv
- source venv/bin/activate
- Install dependencies
- pip install -r requirements.txt
- Create your .env file
- AWS_ACCESS_KEY_ID=your_access_key
- AWS_SECRET_ACCESS_KEY=your_secret_key
- AWS_DEFAULT_REGION=us-east-1
🧪 Run the MCP Server in Dev Mode
- mcp dev s3_mcp_server.py
Quick Start
Clone the repository
git clone https://github.com/abhinavgkrishnan/s3-mcpInstall dependencies
cd s3-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.