MCP Weather Service
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weather Servicewhat's the weather in Singapore right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Weather Service
A FastMCP-based weather service for Singapore that provides current weather conditions and forecasts from the National Environment Agency (NEA) APIs.
Features
Current Weather Data: Temperature, rainfall, humidity, wind speed, and wind direction from all weather stations
Weather Forecasts: 2-hour, 24-hour, and 4-day forecasts for all areas in Singapore
Comprehensive API Integration: All data from official NEA weather APIs
Robust Error Handling: Retry logic, timeouts, and graceful degradation
Async Implementation: Efficient concurrent API calls
Related MCP server: Malaysian Weather MCP Server
Available Tools
The combined server (combinedserver.py) mounts two sub-servers, so tools are namespaced with weather_ and home_ prefixes.
Weather tools (namespace weather_)
weather_get_sg_weather_forecast
Fetches comprehensive weather forecasts including:
2-hour weather forecast for all areas in Singapore
24-hour weather forecast with detailed period breakdowns
4-day weather outlook with temperature, humidity, and wind information
weather_get_sg_current_weather
Fetches current weather data from all weather stations:
Temperature readings (°C)
Rainfall measurements (mm)
Humidity levels (%)
Wind speed (m/s)
Wind direction (degrees)
weather_health_check
Simple health status check for the weather service.
Home automation tools (namespace home_)
home_control_home_device
Turn a home device on or off by room name (master, boy, girl, living, study) and device name (Lights, TV, Fan).
home_health_check
Simple health status check for the home automation service.
API Endpoints Used
2-Hour Forecast:
https://api-open.data.gov.sg/v2/real-time/api/two-hr-forecast24-Hour Forecast:
https://api-open.data.gov.sg/v2/real-time/api/twenty-four-hr-forecast4-Day Outlook:
https://api-open.data.gov.sg/v2/real-time/api/four-day-outlookTemperature:
https://api-open.data.gov.sg/v2/real-time/api/air-temperatureRainfall:
https://api-open.data.gov.sg/v2/real-time/api/rainfallHumidity:
https://api-open.data.gov.sg/v2/real-time/api/relative-humidityWind Speed:
https://api-open.data.gov.sg/v2/real-time/api/wind-speedWind Direction:
https://api-open.data.gov.sg/v2/real-time/api/wind-direction
Installation
# Install dependencies
pip install -e .Usage
Start the server:
python combinedserver.pyThe MCP endpoint is available at http://localhost:3002/mcp
If you are connecting from another machine or container, use http://<your-host-ip>:3002/mcp instead.
Robustness Features
Retry Logic: Automatic retries for failed API calls (3 attempts with 2s delay)
Timeout Handling: Configurable timeouts (20s) for all API requests
Error Recovery: Graceful degradation when data is unavailable
Logging: Comprehensive logging for debugging and monitoring
Health Check: Built-in health status endpoint
Requirements
Python 3.13+
FastMCP 3.4.7+
httpx 0.28.1+
Docker Build Instructions
This project is used in a dev container environment, so the container build must be handled carefully during both development and production.
Build only the production stage image
docker build --target production -t mcpweather:latest .Run the production container with port mapping
docker run -d -p 3002:3002 --name my-product-app mcpweather:latestStarting the server without dev container
This uses Docker Compose to build and launch the server:
docker compose up -d --buildThis server cannot be deployed
Maintenance
Related MCP Connectors
Provide real-time and forecast weather information for locations in the United States using natura…
Provide real-time transportation data including bus arrivals, train service alerts, carpark availa…
US NWS weather alerts and 5-day forecasts for AI agents. $0.01 per call.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides current weather conditions, multi-day forecasts, and location search capabilities through integration with weather APIs, enabling natural language weather queries and comparisons.3-
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather forecasts for locations across Malaysia by fetching data directly from MET Malaysia's API. It enables AI assistants to query today's conditions and seven-day forecasts for states, districts, and towns.-
- AlicenseNot gradedqualityDmaintenanceReal-time Singapore government data for AI agents. Weather forecasts, air quality (PSI/PM2.5), HDB carpark availability, and taxi supply from data.gov.sg.4 npm2ISC
- FlicenseNot gradedqualityDmaintenanceWraps NEA's 2-hour weather forecast API to provide rain alerts for central Singapore areas, enabling automations for rain detection.1-