experiment-java-mcp-server

experiment-java-mcp-server

0

The project is a Spring Boot application that provides weather information using the Model Context Protocol (MCP). It offers mock weather data for AI assistants and is designed for easy setup and integration.

Overview

This project implements a weather service that provides mock weather data for different locations using the Model Context Protocol (MCP). It is designed as a Spring Boot application and integrates seamlessly with AI assistants.

Features

  • Get current weather information for any location
  • Mock weather data generation with realistic parameters
  • MCP integration for AI assistant compatibility
  • Spring Boot application with easy setup and configuration

Technologies

  • Java 17
  • Spring Boot 3.2.0
  • Spring AI MCP Server
  • Maven
  • Lombok

Prerequisites

  • Java 17 or higher
  • Maven 3.6 or higher
  • Node.js and npm (for MCP Inspector)

Installation

  1. Clone the repository.
  2. Build the project using Maven.

Running the Application

Start the Spring Boot application using Maven. The default port is 8080.

Configuring MCP in IDE Tools

Configure the MCP server using the provided SSE endpoint for integration with AI assistants.

Using the MCP Inspector

Test and debug the MCP server with the MCP Inspector tool by connecting using the provided SSE endpoint.

API Documentation

Weather Service

Get Weather
  • Tool Name: getWeather
  • Parameters: location (String)

Contributing

Contributions are welcome through Pull Requests.

License

Licensed under the MIT License.