langchain4j-micronaut-mcp

langchain4j-micronaut-mcp

3.1

If you are the rightful owner of langchain4j-micronaut-mcp 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.

A simple MCP server implemented with Micronaut, providing dummy weather information for a given city.

This project implements a simple Model Context Protocol (MCP) server using Micronaut, with HTTP Server-Sent Events (SSE) transport. It provides dummy weather information for a given city and implements a subset of the MCP protocol to handle requests for weather data. The server includes two main controllers: SseController for establishing SSE connections and PostController for handling incoming MCP command requests. The SseBroadcaster manages the SSE stream and sends responses back to the client. The project also includes an integration test class, McpWeatherClientTest, which verifies the server's functionality using LangChain4j's MCP client support.

Features

  • Implements MCP protocol operations: initialize, notifications/initialize, tools/list, tools/call.
  • Uses Micronaut framework for building the server.
  • Provides dummy weather information for a given city.
  • Supports HTTP Server-Sent Events (SSE) for persistent client-server connections.
  • Includes integration tests using LangChain4j's MCP client.