Spring AI MCP Weather STDIO Server - A Spring Boot starter project demonstrating how to build a Model Context Protocol (MCP) server that provides weather-related tools
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"spring-ai-mcp-weather": {
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-Dspring.main.web-application-type=none",
"-Dlogging.pattern.console=",
"-jar",
"/absolute/path/to/my-mcp-stdio-server-0.0.1-SNAPSHOT.jar"
],
"command": "java"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Spring Boot starter project demonstrating how to build a Model Context Protocol (MCP) server that provides weather-related tools using the National Weather Service (weather.gov) API. This project showcases the Spring AI MCP Server Boot Starter capabilities with STDIO transport implementation.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools / maps
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP server for accessing Figma plugin console logs and screenshots via Cloudflare Workers or local mode
MCP Security Weekly
Get CVE alerts and security updates for My Mcp Stdio Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Spring Boot starter project demonstrating how to build a Model Context Protocol (MCP) server that provides weather-related tools using the National Weather Service (weather.gov) API. This project showcases the Spring AI MCP Server Boot Starter capabilities with STDIO transport implementation.
For more information, see the MCP Server Boot Starter reference documentation.
The spring-ai-mcp-server-spring-boot-starter provides:
The spring-ai-mcp-server-spring-boot-starter provides:
src/
├── main/
│ ├── java/
│ │ └── org/springframework/ai/mcp/sample/server/
│ │ ├── McpServerApplication.java # Main application class with tool registration
│ │ └── WeatherService.java # Weather service implementation with MCP tools
│ └── resources/
│ └── application.properties # Server and transport configuration
└── test/
└── java/
└── org/springframework/ai/mcp/sample/client/
└── ClientStdio.java # Test client implementation
The server uses STDIO transport mode and is typically started automatically by the client. To build the server jar:
./mvnw clean install -DskipTests
The project demonstrates how to implement and register MCP tools using Spring's dependency injection and auto-configuration:
@Service
public class WeatherService {
@Tool(description = "Get weather forecast for a specific latitude/longitude")
public String getWeatherForecastBrazil(
double latitude, // Latitude coordinate
double longitude // Longitude coordinate
) {
// Implementation
}
@Tool(description = "Get weather alerts for a US state")
public String getAlerts(
String state // Two-letter US state code (e.g., CA, NY)
) {
// Implementation
}
}
@SpringBootApplication
public class McpServerApplication {
@Bean
public List<ToolCallback> weatherTools(WeatherService weatherService) {
return ToolCallbacks.from(weatherService);
}
}
The auto-configuration automatically registers these tools with the MCP server. You can have multiple beans producing lists of ToolCallbacks, and the auto-configuration will merge them.
@Tool(description = "Get weather forecast for a specific latitude/longitude")
public String getWeatherForecastBrazil(
double latitude, // Latitude coordinate
double longitude // Longitude coordinate
) {
// Returns detailed forecast including:
// - Temperature and unit
// - Wind speed and direction
// - Detailed forecast description
}
// Example usage:
CallToolResult forecast = client.callTool(
new CallToolRequest("getWeatherForecastBrazil",
Map.of(
"latitude", 47.6062, // Seattle coordinates
"longitude", -122.3321
)
)
);
@Tool(description = "Get weather alerts for a US state")
public String getAlerts(
String state // Two-letter US st
... [View full README on GitHub](https://github.com/cloud4java/my-mcp-stdio-server#readme)