SpringBoot_Spotify_MCP_Server

alanta335/SpringBoot_Spotify_MCP_Server

3.2

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

  1. Clone the repository
  2. Configure Spotify API credentials in application.yaml
  3. Build and run the server:
    ./mvnw spring-boot:run
    
  4. 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! šŸŽ‰