Wasabi 云存储 MCP 服务器

一款 MCP 服务器,向 Claude Code 及其他 MCP 兼容客户端提供 Wasabi 云存储管理能力,包括存储桶操作、对象操作与预签名 URL 生成。

  • by danielrosehill
  • TypeScript
  • 混合部署
  • 更新于
在 GitHub 查看 danielrosehill/Wasabi-S3-MCP

使用说明

Wasabi MCP Server

A Model Context Protocol (MCP) server for interacting with Wasabi cloud storage. This server provides tools for managing Wasabi buckets and objects through the MCP interface, enabling integration with Claude Code and other MCP-compatible applications.

v2.0 - Streamable HTTP Transport

This version uses the modern Streamable HTTP transport instead of stdio, making it suitable for:

  • Running as a standalone HTTP server
  • Connecting via MCP aggregators
  • Integration with tools that support HTTP-based MCP servers

Features

Consolidated Tools (3 tools instead of 10)

Tool Actions Description
bucket list, create, delete, location Manage Wasabi buckets
object list, upload, download, delete, metadata Manage objects in buckets
presign get, put Generate presigned URLs for temporary access

Installation

From NPM

npm install -g wasabi-mcp

From Source

git clone https://github.com/danielrosehill/Wasabi-S3-MCP.git
cd Wasabi-S3-MCP
npm install
npm run build

Configuration

Environment Variables

The server requires the following environment variables:

Variable Description Example
WASABI_ACCESS_KEY_ID Your Wasabi access key AKIAIOSFODNN7EXAMPLE
WASABI_SECRET_ACCESS_KEY Your Wasabi secret key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
WASABI_REGION Wasabi region eu-central-2
WASABI_ENDPOINT Wasabi endpoint URL s3.eu-central-2.wasabisys.com
PORT Server port (optional) 3000 (default)
MCP_HOST Bind address (optional) 127.0.0.1 (default)
MCP_AUTH_TOKEN Bearer token clients must send. Optional on loopback, required on any other MCP_HOST a long random string

Wasabi Regions

Common Wasabi regions and their endpoints:

Region Endpoint
us-east-1 s3.us-east-1.wasabisys.com
us-east-2 s3.us-east-2.wasabisys.com
us-central-1 s3.us-central-1.wasabisys.com
us-west-1 s3.us-west-1.wasabisys.com
eu-central-1 s3.eu-central-1.wasabisys.com
eu-central-2 s3.eu-central-2.wasabisys.com
eu-west-1 s3.eu-west-1.wasabisys.com
eu-west-2 s3.eu-west-2.wasabisys.com
ap-northeast-1 s3.ap-northeast-1.wasabisys.com
ap-northeast-2 s3.ap-northeast-2.wasabisys.com
ap-southeast-1 s3.ap-southeast-1.wasabisys.com
ap-southeast-2 s3.ap-southeast-2.wasabisys.com

Running the Server

Start the Server

# Set environment variables first, then:
npm start

# Or run directly:
PORT=3000 node dist/index.js

The server will start on http://127.0.0.1:3000/mcp with a health check at http://127.0.0.1:3000/health.

Network exposure and authentication

The object tool reads and writes local files (local_path on upload and download) and bucket can delete buckets, so the server binds to 127.0.0.1 by default. To listen on another address, set MCP_HOST and MCP_AUTH_TOKEN; the server refuses to start on a non-loopback address without a token. Clients then send Authorization: Bearer <token> on every request (/health stays open).

MCP_HOST=0.0.0.0 MCP_AUTH_TOKEN=a-long-random-string npm start

Each MCP session gets its own server instance, so any number of clients can connect. Before 2.1.0, the server listened on all interfaces with no authentication, and a second client's initialize crashed the process.

Usage with Claude Code

JSON Configuration

Add to your Claude Code MCP settings (~/.config/claude-code/settings.json or project-level):

{
  "mcpServers": {
    "wasabi": {
      "url": "http://127.0.0.1:3000/mcp",
      "transport": "streamable-http"
    }
  }
}

Note: You must start the server separately before using with Claude Code.

Alternative: Run Server with Environment Variables

Create a .env file:

WASABI_ACCESS_KEY_ID=your_access_key
WASABI_SECRET_ACCESS_KEY=your_secret_key
WASABI_REGION=eu-central-2
WASABI_ENDPOINT=s3.eu-central-2.wasabisys.com
PORT=3000

Then start the server:

npm start

API Reference

bucket

Manage Wasabi buckets.

Parameters:

  • action (string, required): One of list, create, delete, location
  • name (string): Bucket name (required for create, delete, location)

Examples:

// List all buckets
{ "action": "list" }

// Create a bucket
{ "action": "create", "name": "my-new-bucket" }

// Delete a bucket
{ "action": "delete", "name": "my-bucket" }

// Get bucket location
{ "action": "location", "name": "my-bucket" }

object

Manage objects in Wasabi buckets.

Parameters:

  • action (string, required): One of list, upload, download, delete, metadata
  • bucket (string, required): Bucket name
  • key (string): Object key/path (required for upload, download, delete, metadata)
  • local_path (string): Local file path (required for upload and download)
  • prefix (string): Filter prefix for list action
  • max_keys (number): Maximum objects to return (default: 1000)
  • content_type (string): MIME type for upload

Examples:

// List objects
{ "action": "list", "bucket": "my-bucket" }

// List with prefix
{ "action": "list", "bucket": "my-bucket", "prefix": "reports/", "max_keys": 100 }

// Upload a file
{ "action": "upload", "bucket": "my-bucket", "key": "docs/report.pdf", "local_path": "/home/user/report.pdf" }

// Download a file
{ "action": "download", "bucket": "my-bucket", "key": "docs/report.pdf", "local_path": "/home/user/downloads/report.pdf" }

// Delete an object
{ "action": "delete", "bucket": "my-bucket", "key": "docs/old-report.pdf" }

// Get metadata
{ "action": "metadata", "bucket": "my-bucket", "key": "docs/report.pdf" }

presign

Generate presigned URLs for temporary access.

Parameters:

  • bucket (string, required): Bucket name
  • key (string, required): Object key/path
  • operation (string): get (download) or put (upload). Default: get
  • expires_in (number): URL expiration in seconds (default: 3600)
  • content_type (string): Content-Type for PUT operations

Examples:

// Generate download URL
{ "bucket": "my-bucket", "key": "docs/report.pdf" }

// Generate download URL with custom expiration
{ "bucket": "my-bucket", "key": "docs/report.pdf", "expires_in": 7200 }

// Generate upload URL
{ "bucket": "my-bucket", "key": "uploads/new-file.pdf", "operation": "put", "content_type": "application/pdf" }

Usage Examples with Claude

Once configured, use natural language with Claude Code:

List Buckets

List all my Wasabi buckets

Create a Bucket

Create a new Wasabi bucket called "my-backup"

Upload a File

Upload ~/documents/report.pdf to bucket "my-backup" with key "reports/2025/report.pdf"

Download a File

Download "reports/2025/report.pdf" from bucket "my-backup" to ~/Downloads/

Generate Presigned URL

Generate a presigned URL for "reports/2025/report.pdf" in "my-backup" that expires in 2 hours

List Objects with Prefix

List all objects in "my-backup" bucket that start with "reports/"

Security Notes

  • Never commit credentials to version control
  • Use environment variables or secure credential management
  • Presigned URLs provide temporary access - treat them as sensitive
  • Consider using IAM policies to restrict bucket/object access

Troubleshooting

Server doesn't start

  • Verify all environment variables are set
  • Check that your Wasabi credentials are valid
  • Ensure the endpoint matches your region

Connection errors

  • Verify the endpoint URL is correct for your region
  • Check network connectivity to Wasabi
  • Confirm your credentials have appropriate permissions

Upload/Download fails

  • Verify the file path exists and is accessible
  • Check bucket permissions
  • Ensure the bucket exists

License

MIT

Author

Daniel Rosehill (public@danielrosehill.com)

Contributing

Issues and pull requests welcome at GitHub.