Weather MCP Server
Click on "Install 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., "@Weather MCP Serverget weather alerts for California"
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.
🌦️ Weather MCP Server and Client
Welcome to the Weather Model Context Protocol (MCP) Project! This project provides real-time weather intelligence by integrating with external APIs like the National Weather Service (NWS). It is built using the FastMCP framework and supports both server and client interactions.
🚀 Features
Weather Alerts: Fetch weather alerts for any US state.
Weather Forecasts: Get detailed weather forecasts for specific locations.
Asynchronous Operations: Fully asynchronous for high performance.
Modular Design: Clean separation of server, client, and utility logic.
LLM Integration: Summarize weather data using a language model (DistilGPT-2).
Related MCP server: Weather MCP Server
📂 Project Structure
server.py: The main server file that registers tools for fetching weather alerts and forecasts.client.py: A command-line client to interact with the server.app.py: A Streamlit-based web app for user-friendly interaction.agent.py: An advanced client integrating a language model for summarizing weather data.
🛠️ Setup Instructions
Clone the Repository:
git clone <repository-url> cd mcpInstall Dependencies: Ensure Python 3.8+ is installed, then run:
pip install -r requirements.txtRun the Server: Start the FastMCP server:
python server.pyInteract with the Client: Use the command-line client or the Streamlit app to interact with the server.
🖥️ Usage
Command-Line Client
List Available Tools:
python client.py list_toolsFetch Alerts:
python client.py get_alerts --state CAFetch Forecasts:
python client.py get_forecast --latitude 34.05 --longitude -118.25
Streamlit Web App
Run the app:
streamlit run app.pyUse the sidebar to select actions like "List Tools," "Get Alerts," or "Get Forecast."
LLM Integration
Summarize weather data using the language model:
python agent.py interact_with_llm --llm_action get_alerts --state CA python agent.py interact_with_llm --llm_action get_forecast --latitude 34.05 --longitude -118.25
🎥 Video Demonstration
Watch a quick demonstration of the Weather MCP Project in action:
🌐 External Dependencies
FastMCP: Framework for building MCP servers and clients.
httpx: For making asynchronous HTTP requests.
Streamlit: For building the web app.
Transformers: For integrating the DistilGPT-2 language model.
📋 Notes
Ensure the server is running before using the client or web app.
Follow the asynchronous programming model to avoid blocking operations.
❤️ Acknowledgments
FastMCP for the server-client framework.
National Weather Service (NWS) for providing weather data.
Hugging Face Transformers for the DistilGPT-2 model.
🤝 Contributing
We welcome contributions to the Weather MCP Project! Here's how you can help:
Report Bugs: If you encounter any issues, please open an issue on the GitHub repository.
Suggest Features: Have an idea for a new feature? Let us know by creating a feature request.
Submit Pull Requests: Fork the repository, make your changes, and submit a pull request for review.
Improve Documentation: Help us enhance the documentation by fixing typos, adding examples, or clarifying instructions.
Contribution Guidelines
Follow the project's coding conventions and structure.
Ensure all new code is covered by tests.
Use clear and concise commit messages.
Test your changes thoroughly before submitting.
Enjoy exploring the weather with Weather MCP! 🌤️
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Clement-Okolo/Weather-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server