langchain4j-micronaut-mcp

langchain4j-micronaut-mcp

0

This project is a simple MCP Server implemented using Micronaut, which provides weather information for specified cities based on the Model Context Protocol. It supports various operations like initialize, and tool listing, and is designed to handle client connections via HTTP SSE.

A simple MCP Server with Micronaut

This project implements a simple Model Context Protocol (MCP) server using Micronaut technology, providing weather information for given cities through HTTP SSE transport. Key operations supported include initializing connections and handling tool requests.

Features

  • Provides dummy weather data for specified cities.
  • Implements MCP protocol operations: initialize, notifications/initialize, tools/list, and tools/call.

Controllers

  • SseController: Manages Server-Sent Events (SSE) connections for clients at endpoint /mcp/sse.
  • PostController: Handles incoming MCP command requests at endpoint /mcp/post.

Testing

The McpWeatherClientTest class is used to test the server's functionality, including tool discovery and execution via LangChain4j's AI assistant.