Tasks MCP server

Lightweight Spring Boot task management server providing RESTful API for creating, tracking, and managing tasks with integrated tool interactions and comprehensive testing.
Back to servers
Provider
Gopinath MR
Release date
Mar 07, 2025
Language
Java

This lightweight MCP server template built on SpringBoot allows you to create and expose custom features for integration with MCP clients. It comes with a sample task feature to help you understand the implementation pattern.

Installation

Prerequisites

  • Java JDK (version 8 or higher)
  • Gradle or Maven for building the project

Building the Project

  1. Clone the repository to your local machine
  2. Navigate to the project directory and build using Gradle:
cd mcp-server-template
./gradlew build

This will create a JAR file in the build/libs directory with the name format your-app-name-0.0.1-SNAPSHOT.jar.

Configuration

Setting Up with MCP Client

To integrate your MCP server with the Claude desktop client:

  1. Open the Claude desktop configuration file located at:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    
  2. Add the following configuration section to the JSON file:

"your-app-name": {
  "command": "/usr/bin/java",
  "args": [
    "-Dspring.profiles.active=default",
    "-Dspring.main.web-application-type=none",
    "-jar",
    "/path/to/your/project/build/libs/your-app-name-0.0.1-SNAPSHOT.jar"
  ]
}
  1. Replace /path/to/your/project with the actual path to your project directory
  2. Replace your-app-name with your application's name

Using the Server

Testing Features via REST Endpoints

The server exposes features through REST endpoints, allowing you to test functionality outside the MCP client:

  1. Start the server with web support enabled:
java -Dspring.profiles.active=default -jar build/libs/your-app-name-0.0.1-SNAPSHOT.jar
  1. Access the sample task feature at http://localhost:8080/task (default port is 8080)

Example Task Feature

The template includes a sample task feature that demonstrates:

  • Basic MCP protocol implementation
  • Request/response handling
  • Error management

You can use this as a reference when implementing your own features.

Creating New Features

When adding new features to your MCP server:

  1. Study the example task feature structure
  2. Create new controllers and services following the same pattern
  3. Implement the necessary MCP protocol handlers
  4. Test your feature using both the REST endpoint and through the Claude client

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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