Real-time US weather forecasts and alerts via MCP server integration using TypeScript and NWS API
MCP Weather Server is a TypeScript application designed to serve as a robust backend solution for real-time weather data and alerts, all powered by the Model Context Protocol (MCP) framework. Built with Node.js and leveraging the Model Context Protocol SDK, this server provides essential tools like US weather forecasts and active weather alerts through the National Weather Service (NWS) API. As part of the MCP ecosystem, it enables seamless integration with various AI applications such as Claude Desktop, Continue, Cursor, and others.
MCP Weather Server offers a suite of features designed to support a wide range of uses within an AI environment:
These capabilities are integrated through MCP, allowing MCP clients to leverage the server's tools effortlessly. The server is also designed as a command-line interface (CLI) tool, making it easy to deploy and use through terminal commands or AI-driven workflows.
The architecture of MCP Weather Server follows the MCP protocol structure, ensuring seamless communication with MCP clients like Claude Desktop:
The server's core implementation revolves around two primary weather tools:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The compatibility of the MCP Weather Server with various AI applications is shown in the following table. Note that some tools may be available, but specific features like prompts might not.
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
To set up MCP Weather Server and begin integrating it into your AI workflows, follow these steps:
Prerequisites:
Installation Steps:
# Clone the repository
git clone https://github.com/cskiro/MCP-Weather-Server.git
# Navigate to the project directory
cd MCP-Weather-Server
# Install dependencies
npm install
# Build the project
npm run build
# Make the CLI executable (optional if you prefer running through terminal)
chmod +x build/index.js
# Install globally for easy use of the command-line interface (CLI) tool
npm install -g .
Run the Server:
weather
MCP Weather Server can significantly enhance various AI workflows by providing seamless integration with different tools and applications. Here are two real-world scenarios:
Integrating MCP Weather Server into a smart home setup allows for advanced weather-related actions:
A fleet management system can utilize MCP Weather Server data for more efficient route planning and resource allocation during inclement weather:
MCP Weather Server supports integration into popular AI applications like Claude Desktop, Continue, and Cursor through the MCP protocol. By configuring your client to use the server for its weather tools, you can enhance various functionalities such as data retrieval and real-time updates.
For example, in a scenario where a business uses Continue for chatbot interactions, integrating MCP Weather Server ensures that users receive accurate and timely weather forecasts directly from the chat interface. This integration is facilitated by configuring your MCP client with the appropriate API keys and paths.
The server's performance and compatibility are crucial for ensuring smooth operation within AI-driven workflows:
MCP Weather Server comes with several configuration options and security best practices:
API_KEY
for securing sensitive information.A: Yes, MCP Weather Server is designed to support simultaneous integration with multiple MCP clients such as Claude Desktop and Continue. Each client can access the same set of tools via the defined protocol.
A: The service relies on official data from the NWS API, which is verified regularly to provide accurate weather updates. Additionally, the server includes mechanisms to handle edge cases and outliers in incoming data, ensuring reliability.
A: Currently, the server focuses on providing weather-related information like forecasts and alerts. However, it sets a strong foundation for future updates that could include other meteorological parameters and services if needed.
A: The current version of MCP Weather Server is designed to support US-based locations only due to the limitations imposed by the NWS data source. However, there are plans for expansion into international markets with future updates.
A: While the server supports integration via an MCP protocol and command-line interface, it currently does not host a dedicated user-friendly dashboard. All interactions and functionalities will be through MCP clients or command execution in the CLI.
Contributions are warmly welcomed to enhance the functionality and usability of MCP Weather Server. To contribute:
npm install
, and build via npm run build
.npm test
before making changes.For more details on the MCP ecosystem and resources, visit MCP Official Documentation. Join communities like GitHub Discussions to connect with other developers and access further information.
By leveraging the power of MCP Weather Server, you can significantly enhance your AI applications' weather-related functionalities, making them more robust and user-friendly.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration