https://github.com/myagizmaktav/minio-mcp
257
A Model Context Protocol (MCP) server for interacting with MinIO object storage. This server runs inside Docker and provides tools for uploading, downloading, and managing files in MinIO buckets.
Pull the Docker image:
docker pull foxsnow/minio-mcp
Create a .env file in the mcp/minioMcp directory:
# MinIO Server Configuration
MINIO_ENDPOINT=your-minio-server.com
MINIO_PORT=9000
MINIO_USERNAME=your-access-key
MINIO_PASSWORD=your-secret-key
MINIO_USE_SSL=false
# MCP Server Configuration
MCP_PORT=5055
# Permissions (true/false)
MINIO_CAN_READ=true
MINIO_CAN_EDIT=true
MINIO_CAN_DELETE=true
MINIO_CAN_CREATE=true
ā ļø Security Note: The .env file is automatically excluded from git via .gitignore. Never commit credentials to version control!
cd mcp/minioMcp
docker-compose up -d
docker-compose down
Add this configuration to your ~/.cursor/mcp.json:
{
"mcpServers": {
"minio-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/Users/your-username/path/to/downloads:/downloads",
"-e",
"MINIO_ENDPOINT=your-minio-server.com",
"-e",
"MINIO_PORT=443",
"-e",
"MINIO_USERNAME=your-username",
"-e",
"MINIO_PASSWORD=your-password",
"-e",
"MINIO_USE_SSL=true",
"-e",
"MINIO_CAN_READ=true",
"-e",
"MINIO_CAN_EDIT=true",
"-e",
"MINIO_CAN_DELETE=true",
"-e",
"MINIO_CAN_CREATE=true",
"-e",
"DOWNLOAD_PATH=/downloads",
"foxsnow/minio-mcp"
]
}
}
}
| Argument | Description |
|---|---|
run -i --rm | Run container interactively and remove it when stopped |
-v /host/path:/downloads | Mount your local folder to container's /downloads folder |
-e MINIO_ENDPOINT | MinIO server address (without http/https) |
-e MINIO_PORT | MinIO server port (typically 9000 or 443) |
-e MINIO_USERNAME | MinIO access key / username |
-e MINIO_PASSWORD | MinIO secret key / password |
-e MINIO_USE_SSL | Use HTTPS connection (true or false) |
-e MINIO_CAN_READ | Allow read operations (true or false) |
-e MINIO_CAN_EDIT | Allow edit operations (true or false) |
-e MINIO_CAN_DELETE | Allow delete operations (true or false) |
-e MINIO_CAN_CREATE | Allow create/upload operations (true or false) |
-e DOWNLOAD_PATH | Container's download directory (use /downloads) |
This MCP server runs inside Docker, which means it has LIMITED filesystem access:
/downloads directory-v flag maps your host directory to container's /downloads/downloads/myfile.jpg
/downloads/documents/report.pdf
/downloads/subfolder/image.png
/Users/username/Documents/file.jpg ā Host path - not accessible
C:\Users\file.jpg ā Windows path - not accessible
~/Downloads/file.jpg ā Home directory - not accessible
First, copy your file to the folder you mounted in Docker:
# Example: If you mounted /Users/username/minio-downloads:/downloads
cp /path/to/your/file.jpg /Users/username/minio-downloads/
Use the MCP tool with the container's path (/downloads/filename):
// In Cursor AI Chat
Upload /downloads/file.jpg to bucket "my-bucket"
Example:
File location on host: /Users/john/minio-downloads/photo.jpg
File location in container: /downloads/photo.jpg
Use in MCP: /downloads/photo.jpg ā
Downloaded files are automatically saved to the /downloads directory inside the container, which is mapped to your host folder.
Example:
Download object "report.pdf" from bucket "documents"
ā File saved to: /downloads/report.pdf
ā Available on host at: /Users/username/minio-downloads/report.pdf
list_buckets - List all bucketsmake_bucket - Create a new bucketbucket_exists - Check if bucket existsremove_bucket - Remove an empty bucketlist_objects - List objects in a bucketfput_object - Upload a file from /downloads directoryput_object - Upload text/string contentupload_folder - Upload entire folder from /downloadsget_object - Download small text files/downloads directorystat_object - Get object metadatacopy_object - Copy objects within MinIOremove_object - Delete an objectremove_objects - Delete multiple objectspresigned_get_object - Generate temporary download URLpresigned_put_object - Generate temporary upload URL# 1. Copy image to downloads folder
cp ~/Pictures/photo.jpg /Users/username/minio-downloads/
# 2. In Cursor AI, ask:
"Upload /downloads/photo.jpg to bucket 'photos' as 'vacation-2024.jpg'"
# 1. Copy files to a subfolder
mkdir -p /Users/username/minio-downloads/documents
cp ~/Documents/*.pdf /Users/username/minio-downloads/documents/
# 2. In Cursor AI, ask:
"Upload all files from /downloads/documents to bucket 'my-docs'"
"Download the file 'report.pdf' from bucket 'documents'"
The file will appear in your mounted downloads folder:
/Users/username/minio-downloads/report.pdf
Cause: The file is not in the mounted /downloads directory.
Solution:
-v /host/path:/downloads/downloads/filenameCause: Docker doesn't have permission to access the mounted folder.
Solution:
# Give Docker access to the folder
chmod -R 755 /path/to/your/downloads
Check:
/downloads)mcp.jsonMINIO_CAN_* flags to restrict operations{
"minio-mcp": {
"args": [
// ... other args ...
"-e",
"MINIO_CAN_READ=true",
"-e",
"MINIO_CAN_EDIT=false",
"-e",
"MINIO_CAN_DELETE=false",
"-e",
"MINIO_CAN_CREATE=false"
]
}
}
{
"mcpServers": {
"minio-production": {
// ... production config ...
},
"minio-development": {
// ... development config ...
}
}
}
cd mcp/minioMcp
docker build -t minio-mcp .
docker run -i --rm \
-v $(pwd)/downloads:/downloads \
-e MINIO_ENDPOINT=your-server.com \
-e MINIO_PORT=443 \
-e MINIO_USERNAME=your-username \
-e MINIO_PASSWORD=your-password \
-e MINIO_USE_SSL=true \
-e MINIO_CAN_READ=true \
-e MINIO_CAN_EDIT=true \
-e MINIO_CAN_DELETE=true \
-e MINIO_CAN_CREATE=true \
minio-mcp
npm run build
# Build for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 \
-t foxsnow/minio-mcp:latest \
-t foxsnow/minio-mcp:v1.0.0 \
--push .
Issues and pull requests are welcome at the GitHub repository.
This project is licensed under the Apache License 2.0.
Content type
Image
Digest
sha256:a7d610619ā¦
Size
71.3 MB
Last updated
11 months ago
docker pull foxsnow/minio-mcp