Get the FREE Ultimate OpenClaw Setup Guide →

s3 -java

The MCP Server based on the S3 protocol can perform operations on Amazon S3 and other S3-compatible object storage services.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alexwangda-s3-mcp-server-java java -jar /path/to/your/s3-mcp-server-0.0.1-SNAPSHOT.jar --s3.endpoint=your_endpoint --s3s.accessKey=your_access_key --s3.secretKey=your_secret_key

How to use

This MCP server implements S3 protocol operations for Amazon S3 and S3-compatible storage, powered by Spring AI integration. It exposes typical S3-like actions such as bucket management (listing buckets and bucket details) and object operations (uploading and downloading objects, listing with prefixes, and creating virtual directories via markers). It also supports presigned URL generation for private object access and automatic URL generation during uploads. Use the provided CLI arguments to point the server at your S3-compatible endpoint and credentials, then leverage the MCP configuration to tell your orchestrator how to run the server. The included tool annotations enable AI-assisted invocation of core operations, with parameter validation to ensure correct inputs.

How to install

Prerequisites:

  • Java 17+
  • Maven 3.8+

Installation steps:

  1. Clone the repository git clone https://github.com/AlexWangDa/s3-mcp-server-java
  2. Build the project with Maven cd s3-mcp-server-java mvn clean install
  3. Run the server (example) java -jar target/s3-mcp-server-0.0.1-SNAPSHOT.jar
    --s3.endpoint=your_endpoint
    --s3s.accessKey=your_access_key
    --s3.secretKey=your_secret_key

Notes:

  • Replace the endpoint and credentials with your own S3-compatible service (AWS, MinIO, InspurOSS, etc.).
  • The JAR path in the command above will be created by the Maven build; adjust as needed for your environment.

Additional notes

Tips and common considerations:

  • Keep credentials secure; avoid hard-coding them in version control. Use environment variables or secret management where possible.
  • Ensure your S3 endpoint is reachable from the MCP server host (consider network and firewall rules).
  • If using a non-AWS S3-compatible service, verify compatibility of path-style access and any provider-specific quirks.
  • The server supports generating presigned URLs with a 15-minute default validity; adjust as needed via configuration if supported by your provider.
  • When listing objects, you can rely on pagination and NextMarker; ensure your client handles large result sets gracefully.
  • Validate inputs for bucket names and object keys to avoid API errors; leverage the Tool annotations if using Spring AI integration for validation feedback.

Related MCP Servers

Sponsor this space

Reach thousands of developers