ModelContextProtocolServer
@InnoBridge
MCP server to provide tools
Overview
What is ModelContextProtocolServer?
A Java implementation of the Model Context Protocol (MCP) server that exposes tools via SSE or stdio transport. It provides calculator and weather tools accessible through JSON-RPC over MCP, built with Spring Boot and Maven. Intended for developers integrating MCP tools into AI applications.
How to use ModelContextProtocolServer?
Build with Maven (./mvnw clean install) and run via stdio using Java with transport mode set to stdio and web application disabled. Alternatively, connect using SSE stream over HTTP. Invoke tools by sending JSON-RPC POST requests to the /mcp/message endpoint for SSE or directly over stdio.
Key features of ModelContextProtocolServer
- Supports SSE and stdio transport modes
- Includes calculator and weather tools
- Built with Spring Boot and Maven
- Communicates via JSON‑RPC over MCP
- Java‑based, portable across platforms
Use cases of ModelContextProtocolServer
- Provide a calculator tool for AI assistants via MCP
- Supply current weather data for any location in Celsius or Fahrenheit
- Serve as a reference Java MCP server implementation
- Enable local tool execution (stdio) or remote access (SSE)
FAQ from ModelContextProtocolServer
What transport modes are supported?
SSE (Server-Sent Events) over HTTP for remote connections, and stdio for direct invocation from a Java process.
What tools are included by default?
A calculator tool (supports operations like addition) and a get_current_weather tool that accepts location and temperature format (celsius/fahrenheit).
How do I build and run the server?
Build with ./mvnw clean install. Run via stdio using: java -Dtransport.mode=stdio -Dspring.main.web-application-type=none -Dspring.main.banner-mode=off -Dlogging.file.name=mcpserver.log -jar target/mcpserver-0.0.1-SNAPSHOT.jar.
Is there any authentication or authorization?
The README does not describe authentication; the server appears intended for development or local use without built‑in auth.