Get the FREE Ultimate OpenClaw Setup Guide →

mcp-webmvc

MCP server from alexandredavi/mcp-webmvc-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alexandredavi-mcp-webmvc-server java -jar target/mcp-weather-starter-webmvc-server-0.0.1-SNAPSHOT.jar

How to use

This MCP server implements a weather service with two tools registered via Spring AI's @Tool annotation: getWeatherForecastByLocation and getAlerts. The server uses the WebMVC transport (SSE by default) to stream tool results or responses as events, and it can also be run in STDIO mode if configured. You can connect to the server either by starting it normally and using an SSE client, or by launching a STDIO-based client that interacts over standard input/output. The tools are designed to query weather information from the weather.gov API based on latitude/longitude or a US state code, respectively.

How to install

Prerequisites:

  • Java (JDK 11+)
  • Maven or the included Maven wrapper
  1. Install Java and Maven on your machine.
  2. Clone the repository and navigate to the project directory.
  3. Build the project using Maven:
./mvnw clean install -DskipTests
  1. Start the MCP server (the default JAR name is shown in the README):
java -jar target/mcp-weather-starter-webmvc-server-0.0.1-SNAPSHOT.jar
  1. (Optional) If you need STDIO transport, run with the STDIO properties enabled as described in the README:
java -Dspring.ai.mcp.server.stdio=true -Dspring.main.web-application-type=none -jar target/mcp-weather-starter-webmvc-server-0.0.1-SNAPSHOT.jar

Additional notes

Tips and notes:

  • The server exposes two tools automatically via the @Tool annotation: getWeatherForecastByLocation(latitude, longitude) and getAlerts(state).
  • By default, the server uses the WebMVC SSE transport; enable STDIO by setting spring.ai.mcp.server.stdio=true and adjusting the JVM arguments as shown in the README.
  • When running in STDIO mode, ensure the client is configured to connect via STDIO (the example in the README demonstrates how to prepare the mcp-servers-config.json and start the client).
  • The server configuration in application.properties controls name, version, transport settings, and change notifications. If you customize these, ensure the client configurations match the server transport settings.
  • If you encounter port conflicts, specify a different server port via Spring properties as you would with a typical Spring Boot application (e.g., --server.port=8081).

Related MCP Servers

Sponsor this space

Reach thousands of developers