Weather MCP is a modular, MCP-compatible service that delivers real-time weather and geolocation data using the OpenWeather API. Built with the Model Context Protocol (MCP) SDK, it’s designed for seamless integration with AI-native environments like Claude Desktop and Ollama (with Qwen 2.5), enabling context-aware applications to access live weather insights effortlessly.
Before getting started, make sure the following tools are installed on your system:
git clone https://github.com/aldotestino/weather-mcp.git
cd weather-mcp
Install all necessary packages using pnpm:
pnpm install
Weather MCP requires a valid OpenWeather API key. The API key should be set in the env object of your MCP configuration JSON file:
{
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}💡 Tip: Use the provided
mcp.config.example.jsonfile as a template.
Compile the TypeScript source code:
pnpm run build
- macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- Windows
code $env:AppData\Claude\claude_desktop_config.json
Add or modify the "mcpServers" section like so:
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"/absolute/path/to/weather-mcp/build/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}📁 Replace
/absolute/path/to/...with the actual path to your local project directory.
Save the file and restart Claude Desktop for changes to take effect.
go install github.com/mark3labs/mcphost@latest
Run the server with your local config:
mcphost -m ollama:qwen2.5 --config "./mcp.config.json"
💡 Tip: Add the MCP Server configuration to
~/.mcp.jsonto omit the--configparameter.