mcp-python-tutorial
If you are the rightful owner of mcp-python-tutorial and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Python-based weather service built on the Model Context Protocol (MCP) that provides weather forecasts and alerts using the National Weather Service (NWS) API.
The Weather Service is a Python-based application that functions as a Model Context Protocol (MCP) server. It leverages the FastMCP framework to provide seamless integration with MCP-compatible applications. The service offers a user-friendly interface to access weather data, including forecasts and alerts, through well-defined tool endpoints. By utilizing the National Weather Service (NWS) API, it ensures accurate and up-to-date weather information. Additionally, it employs OpenStreetMap's Nominatim service for geocoding, allowing users to look up coordinates for US cities. The server is designed with robust error handling and logging mechanisms, ensuring reliability and ease of maintenance. It operates over stdio transport, making it versatile and adaptable for various deployment scenarios.
Features
- Get weather forecasts by city and state
- Get weather forecasts using coordinates
- Get active weather alerts for any US state
- Lookup coordinates for US cities
Tools
get_weather_by_city
Get a detailed weather forecast for a specific US city and state.
get_forecast
Get weather forecast for either a city/state combination or coordinates.
get_alerts
Get active weather alerts for a US state.
get_coordinates
Look up the latitude/longitude coordinates for a US city.