DummyJSON User Management MCP server

Java-based user management server that integrates with DummyJSON API to provide retrieval, search, creation, updating, and deletion operations for user data.
Back to servers
Setup instructions
Provider
Amit Wani
Release date
Mar 19, 2025
Language
Java
Stats
2 stars

This MCP server implemented with Spring Boot and Java 21 provides user management tools for AI assistants through the Model Context Protocol (MCP). It offers a robust set of features including user management operations and supports both Standard I/O and Server-Sent Events transports.

Prerequisites

  • Java 21 or higher
  • Maven

Installation

  1. Clone the repository
git clone https://github.com/yourusername/mcp-spring-java.git
cd mcp-spring-java
  1. Build the project
mvn clean package
  1. Run the application
java -jar target/mcp-spring-java-0.0.1-SNAPSHOT.jar

Configuration

The server is configured through application.yml with these default settings:

  • Port: 8090
  • Server name: my-dummy-users-server
  • Communication mode: Synchronous
  • Transports: STDIO and SSE (Server-Sent Events)
  • SSE endpoint: /mcp/message

Available Tools

The MCP server provides several user management tools:

  • getAllUsers - Retrieves users with pagination
  • getAllUsersDefault - Gets users with default pagination
  • getUserById - Fetches a single user by ID
  • searchUsers - Searches for users by query
  • addUser - Creates a new user
  • updateUser - Updates an existing user
  • deleteUser - Removes a user

Testing with Postman

To test the MCP server endpoints:

  1. Start the MCP server

  2. Configure a Postman request:

  3. Use this JSON format for the request body:

{
  "message": {
    "toolCalls": [
      {
        "id": "call-123",
        "name": "[TOOL_NAME]",
        "parameters": {
          "[PARAMETER_NAME]": "[PARAMETER_VALUE]"
        }
      }
    ]
  }
}

Example Requests

Getting All Users (Default Pagination)

{
  "message": {
    "toolCalls": [
      {
        "id": "call-123",
        "name": "getAllUsersDefault",
        "parameters": {}
      }
    ]
  }
}

Retrieving a User by ID

{
  "message": {
    "toolCalls": [
      {
        "id": "call-123",
        "name": "getUserById",
        "parameters": {
          "id": 1
        }
      }
    ]
  }
}

Searching for Users

{
  "message": {
    "toolCalls": [
      {
        "id": "call-123",
        "name": "searchUsers",
        "parameters": {
          "query": "John"
        }
      }
    ]
  }
}

Using with MCP Clients

To configure this server in MCP client applications, use the following configuration:

{
  "mcpServers": {
    "dummy-user-server": {
      "command": "java",
      "args": [
        "-Dspring.ai.mcp.server.stdio=true",
        "-Dspring.main.web-application-type=none",
        "-Dlogging.pattern.console=",
        "-jar",
        "path/to/mcp-spring-java-0.0.1-SNAPSHOT.jar"
      ]
    }
  }
}

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "dummy-user-server" '{"command":"java","args":["-Dspring.ai.mcp.server.stdio=true","-Dspring.main.web-application-type=none","-Dlogging.pattern.console=","-jar","path/to/mcp-spring-java-0.0.1-SNAPSHOT.jar"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "dummy-user-server": {
            "command": "java",
            "args": [
                "-Dspring.ai.mcp.server.stdio=true",
                "-Dspring.main.web-application-type=none",
                "-Dlogging.pattern.console=",
                "-jar",
                "path/to/mcp-spring-java-0.0.1-SNAPSHOT.jar"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "dummy-user-server": {
            "command": "java",
            "args": [
                "-Dspring.ai.mcp.server.stdio=true",
                "-Dspring.main.web-application-type=none",
                "-Dlogging.pattern.console=",
                "-jar",
                "path/to/mcp-spring-java-0.0.1-SNAPSHOT.jar"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later