Weather MCP Server
About
# Weather MCP Server A Model Context Protocol (MCP) server implementation that provides weather alerts for US states, built using the MCP Python SDK. This project demonstrates how to create an MCP server with tools, resources, and Docker integration. [![MCP…
Details
- Author
- Jai-Keshav-Sharma
- Downloads
- 278
- Categories
- Media
Jump to
- Provides weather alerts for US states via the National Weather Service API
- Supports stdio and SSE (Server-Sent Events) transport
- Includes an LLM-powered CLI client using Groq
- Offers Docker containerization for easy deployment
- Integrates with Claude Desktop and Cursor IDE
- Built-in conversation memory support
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Weather MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies via pip install -r mcpserver/requirements.txt or pull the Docker image ksharma9719/weather-mcp-server. Run the server locally with python weather.py or in Docker with docker run -p 8000:8000 ksharma9719/weather-mcp-server. Invoke the included get_alerts tool by providing a two-letter US state code (e.g., CA). Connect using any of the provided client examples (stdio, SSE, or LLM‑powered CLI).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"weather mcp server": {
"Creating-Weather-MCP-Server": {
"command": "docker",
"args": [
"pull",
"ksharma9719/weather-mcp-server"
]
}
}
}
}
McpServers
{
"Creating-Weather-MCP-Server": {
"command": "docker",
"args": [
"pull",
"ksharma9719/weather-mcp-server"
]
}
}
Weather MCP Server
A Model Context Protocol (MCP) server implementation that provides weather alerts for US states, built using the MCP Python SDK. This project demonstrates how to create an MCP server with tools, resources, and Docker integration.
Features
- Weather alerts for US states using the National Weather Service API
- Support for both stdio and SSE (Server-Sent Events) transport
- Docker containerization
- Integration with Claude Desktop and Cursor IDE
- LLM-powered CLI client using Groq
- Built-in conversation memory support
Project Structure
Creating-MCP-server/
├── server/
│ ├── weather.py # Main MCP server implementation
│ ├── client.py # LLM-powered CLI client
│ └── weather.json # Server configuration
├── mcpserver/
│ ├── Dockerfile # Docker configuration
│ ├── requirements.txt # Python dependencies
│ ├── client-stdio.py # Standard I/O client example
│ ├── client-sse.py # SSE client example
│ └── server.py # Containerized server
Installation
Local Setup
1. Clone the repository:
git clone <repository-url>
cd Creating-MCP-server
2. Install dependencies:
pip install -r mcpserver/requirements.txt
Docker Setup
Pull the pre-built image:
docker pull ksharma9719/weather-mcp-server
Or build locally:
cd mcpserver
docker build -t weather-mcp-server .
Usage
Running the Server
Local Development
cd server
python weather.py
Using Docker
docker run -p 8000:8000 ksharma9719/weather-mcp-server
Client Examples
CLI Client with LLM Integration
cd server
python client.py
Standard I/O Client
cd mcpserver
python client-stdio.py
SSE Client
cd mcpserver
python client-sse.py
Available Tools
get_alerts
Get weather alerts for a US state.Parameters:
- state: Two-letter US state code (e.g., CA, TX, NY)
Example:
result = await session.call_tool("get_alerts", arguments={"state": "CA"})
Integration with Claude Desktop
1. Install the server in Claude Desktop:
mcp install weather.py
2. Optional: Specify a custom name:
mcp install weather.py --name "Weather Alerts Server"
Development
Prerequisites
- Python 3.11 or higher
- uv package manager
- Docker (optional)
Environment Variables
Create a .env file in the server directory:
GROQ_API_KEY=your_groq_api_key
Documentation
- Model Context Protocol SDK Documentation
- MCP Use Documentation
Contributing
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Model Context Protocol team for the excellent SDK
- National Weather Service for their public API
- Groq for their LLM API
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
