MCP HubMCP Hub
JavaProgrammerLB

unsplash-mcp-server

by: JavaProgrammerLB

java version unsplash mcp server

5created 20/03/2025
Visit
Java
Unsplash

📌Overview

Purpose: This framework aims to simplify the process of searching for pictures from Unsplash using a custom MCP server built in Java.

Overview: The Unsplash MCP Server provides an efficient way to search for images from Unsplash and serves as a practical educational tool for developers looking to learn how to implement a MCP server in Java.

Key Features:

  • Image Search Functionality: Enables users to easily find and retrieve images from Unsplash, streamlining the image search process for various applications.

  • Java Implementation: Offers a hands-on example of how to build an MCP server using Java, fostering learning and development skills for aspiring programmers.


Unsplash MCP Server

With this MCP server, you can easily search pictures from unsplash. This project also serves as a reference for learning how to write an MCP Server with Java.

Example: search two house pictures from Unsplash and write them to a document.

Feature

How to use

  1. Clone this project:

    git clone https://github.com/JavaProgrammerLB/unsplash-mcp-server.git
    
  2. Build:

    cd unsplash-mcp-server
    mvn clean package
    
  3. Get Unsplash Access Key:

    • Visit unsplash
    • Create an Unsplash application
    • Find the access key in the Unsplash application detail page
  4. Configure MCP Server:

    {
      "mcpServers": {
        "unsplash": {
          "command": "java",
          "args": [
            "-Dspring.ai.mcp.server.stdio=true",
            "-Dspring.main.web-application-type=none",
            "-Dlogging.pattern.console=",
            "-jar",
            "/ABSOLUTE/PATH/target/unsplash-mcp-server-1.0.jar"
          ],
          "env": {
            "UNSPLASH_ACCESS_KEY": "${YOUR UNSPLASH ACCESS KEY}"
          }
        }
      }
    }
    

Thanks