MinIO MCP Server
A Model Context Protocol (MCP) server that provides a bridge between MCP-compatible clients and MinIO object storage. It exposes MinIO operations as MCP tools for seamless bucket management and object operations.
README
MinIO MCP Server
A Model Context Protocol (MCP) server that provides a bridge between MCP-compatible clients and MinIO object storage. This server exposes MinIO operations as MCP tools for seamless bucket management and object operations.
Features
- 7 MCP Tools organized by domain for comprehensive MinIO operations:
Bucket Management
list_buckets: List all available buckets with creation datesget_bucket_info: Get detailed bucket information (metadata, policies, object count, total size, encryption)create_bucket: Create new buckets with name validation and existence checksdelete_bucket: Delete buckets (empty only) or force delete with all contents
Object Management
list_objects: List objects with filtering (prefix, recursive) and configurable limits (default 25)get_object_info: Get detailed object metadata (size, content-type, etag, version info, custom metadata)delete_object: Delete objects from buckets with optional version support for versioned objects
Key Features
- FastMCP Integration: Built on FastMCP framework for robust MCP protocol support
- Comprehensive Validation: Input validation, error handling with appropriate HTTP status codes (400, 404, 409, 500)
- Async Architecture: Full async/await support for MCP protocol compliance
- Modular Design: Separated concerns with BucketTools and ObjectTools classes
- Extensive Testing: 100% test coverage with advanced mocking techniques
- Standardized Responses: Consistent error handling via TextContent entity
Quick Start
Prerequisites
- Python 3.11 or higher
- MinIO server (local or remote)
- UV package manager (recommended)
Installation
# Clone the repository
git clone <repository-url>
cd minio-mcp-server
# Install dependencies
uv sync
# Install in development mode
uv pip install -e .
Configuration
- Copy the example environment file:
cp .env.example .env
- Configure your MinIO connection in
.env:
MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_SECURE=false
MINIO_LOG_LEVEL=INFO
Running the Server
# Start the MCP server (stdio transport for Claude Desktop)
uv run python src/minio_mcp/server.py
# Test with MCP Inspector (interactive testing)
uv run mcp src/minio_mcp/server.py
# Alternative: Direct python execution
cd src/minio_mcp
python server.py
Using with Claude Desktop
To connect this MCP server with Claude Desktop:
1. Configure Claude Desktop
Edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add this configuration (adjust paths for your system):
{
"mcpServers": {
"minio-mcp-server": {
"command": "/Users/your_username/.local/bin/uv",
"args": [
"--directory",
"/path/to/your/minio-mcp-server",
"run",
"python",
"src/minio_mcp/server.py"
],
"env": {
"MINIO_ENDPOINT": "localhost:9000",
"MINIO_ACCESS_KEY": "minioadmin",
"MINIO_SECRET_KEY": "minioadmin",
"MINIO_SECURE": "false"
}
}
}
}
2. Restart Claude Desktop
After saving the configuration, completely restart Claude Desktop.
3. Test the Connection
Try commands like:
- "List all buckets in MinIO"
- "Show me information about the 'my-bucket' bucket"
- "List the first 10 objects in 'my-bucket'"
- "Get information about 'file.txt' in 'my-bucket'"
- "Delete 'old-file.txt' from 'my-bucket'"
Architecture
Core Components
- FastMCP Server (
server.py): Main MCP protocol handler using FastMCP framework - MinioClient (
infrastructure/minio_client.py): Infrastructure layer with MinIO client management and configuration - BucketTools (
tools/bucket_tools.py): Business logic for bucket operations with validation and error handling - ObjectTools (
tools/object_tools.py): Business logic for object operations with comprehensive metadata extraction - TextContent (
tools/entities.py): Standardized response entity for consistent error handling
Data Flow
MCP Client → FastMCP Server → BucketTools/ObjectTools → MinioClient → MinIO Server
Configuration Options
| Environment Variable | Description | Default |
|---|---|---|
MINIO_ENDPOINT |
MinIO server endpoint | Required |
MINIO_ACCESS_KEY |
Access key for authentication | Required |
MINIO_SECRET_KEY |
Secret key for authentication | Required |
MINIO_SECURE |
Use HTTPS (true/false) | true |
MINIO_LOG_LEVEL |
Logging level (DEBUG/INFO/WARNING/ERROR) | INFO |
MINIO_MAX_OBJECTS_LIST |
Maximum objects per list operation | 25 |
Development
Setting up a Test MinIO Server
docker run -p 9000:9000 -p 9001:9001 \
--name minio-test \
-e "MINIO_ROOT_USER=minioadmin" \
-e "MINIO_ROOT_PASSWORD=minioadmin" \
quay.io/minio/minio server /data --console-address ":9001"
Running Tests
# Run all tests
uv run pytest
# Run with coverage report
uv run pytest --cov=src/minio_mcp --cov-report=html
# Run specific test files
uv run pytest tests/tools/test_bucket_tools.py -v
uv run pytest tests/tools/test_object_tools.py -v
uv run pytest tests/infrastructure/test_minio_client.py -v
# Test specific functionality
uv run pytest -k "test_create_bucket" -v
Code Quality
# Lint and format check
uv run ruff check src tests
# Auto-format code
uv run ruff format src tests
# Type checking
uv run mypy src
License
[Add your license here]
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass and code quality checks succeed
- Submit a pull request
Support
For issues and questions, please check the documentation or open an issue in the repository.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。