alanta335/SpringBoot_Spotify_MCP_Server
If you are the rightful owner of SpringBoot_Spotify_MCP_Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server is a structured data exchange server designed to facilitate seamless integration with external services like Spotify.
Spring Boot Spotify MCP Server
Welcome to the Spring Boot Spotify MCP Server! š
This project is a demonstration server built with Spring Boot and the Model Context Protocol (MCP), designed to interact with Spotify's API. It provides a hands-on platform for learning about Spring Boot, MCP, and integrating with external music services.
š Features
- Spring Boot: Modern Java framework for rapid application development.
- Spotify Integration: Connects to Spotify's API to fetch user data, top tracks, and more.
- MCP Server: Implements the Model Context Protocol for structured data exchange.
- Modular Design: Clean separation of configuration, service, model, and mapping layers.
- Learning-Oriented: Ideal for experimenting with Spring Boot, REST clients, and Spotify integration.
šļø Project Structure
The project follows a standard Maven directory structure:
āāā src/
ā āāā main/
ā ā āāā java/
ā ā ā āāā com.example.mcp_server/
ā ā ā āāā config/ # Spring and REST client configuration
ā ā ā āāā enumeration/ # Enums for playback state, time range, etc.
ā ā ā āāā mapper/ # Map Spotify API responses to internal models
ā ā ā āāā model/ # Domain and response models
ā ā ā āāā service/ # Business logic and Spotify API interaction
ā ā ā āāā McpServerApplication.java
ā ā āāā resources/
ā ā āāā application.yaml # Application configuration
ā āāā test/
ā āāā java/
ā āāā com.example.mcp_server/
ā āāā McpServerApplicationTests.java
āāā pom.xml # Maven build file
āāā README.md # Project documentation
š Getting Started
- Clone the repository
- Configure Spotify API credentials in
application.yaml
- Build and run the server:
./mvnw spring-boot:run
- Access the API endpoints as documented in your controllers/services.
š ļø Technologies Used
- Java 17+
- Spring Boot
- Spring Web
- Model Context Protocol (MCP)
- Spotify Web API
- MapStruct (for mapping DTOs)
š License
This project is licensed under the MIT License.
š¤ Contributing
Contributions are welcome! Please open issues or submit pull requests for improvements.
Happy coding! š