- Spring Boot AI Cloudflare R2 MCP Server
Spring Boot AI Cloudflare R2 MCP Server
Spring Boot AI Cloudflare R2 MCP Server - 一个基于Spring Boot和Spring AI的Cloudflare R2对象存储MCP服务器实现
Content
Spring Boot AI Cloudflare R2 MCP Server
English | 简体中文
Introduction
Spring Boot AI Cloudflare R2 MCP Server is a Model Context Protocol (MCP) server implementation based on Spring Boot and Spring AI, providing integration with Cloudflare R2 object storage service.
Project Structure
src/main/java/com/lskun/mcp/
├── SpringBootAiCloudflareR2McpServerApplication.java (Application entry)
├── config/
│ └── McpConfiguration.java (MCP configuration class)
└── service/
└── R2ServiceClient.java (R2 service client)
Features
- Complete Cloudflare R2 object storage operation support
- Integration with Spring AI's MCP server
- Support for various file types (text, binary, etc.)
- Comprehensive test coverage
- Easy configuration and deployment
Prerequisites
- JDK 17 or above
- Maven 3.6 or above
- Cloudflare R2 account and credentials
Configuration
Create or modify application.properties with your R2 credentials:
r2.access-key-id=${R2_ACCESS_KEY_ID}
r2.secret-access-key=${R2_SECRET_ACCESS_KEY}
r2.endpoint=${R2_ENDPOINT}
Quick Start
- Clone the repository:
git clone https://github.com/lskun/spring-boot-ai-cloudflare-r2-mcp-server.git
- Set up environment variables:
export R2_ACCESS_KEY_ID=your_access_key_id
export R2_SECRET_ACCESS_KEY=your_secret_access_key
export R2_ENDPOINT=your_r2_endpoint
- Build the project:
mvn clean package
- Run integration tests:
# Run all tests in R2ServiceClientTest
mvn test -Dtest=R2ServiceClientTest
# Or run a specific test method
mvn test -Dtest=R2ServiceClientTest#testListBuckets
The test suite includes comprehensive tests for all R2 operations:
- Bucket operations (list, create, delete)
- Object operations (upload, download, list, delete)
- Content format handling (text, base64, file path)
- Object metadata management
API Reference
The service provides the following main functionalities:
- List buckets
- Create/Delete buckets
- Upload/Download objects
- List objects in bucket
- Get object metadata
- Delete objects
Development
The project uses Spring Boot 3.4.4 and Spring AI 1.0.0-M6. Main components include:
R2ServiceClient: Core service class for R2 operationsMcpConfiguration: MCP tool configuration- Integration tests for all operations
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
If you have any questions or suggestions, please feel free to create an issue.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp