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 Serverwhat's the 5-day forecast for Tokyo in imperial units?"
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 - Sample Implementation
Reference implementation for ASUS and OEM partners
A simple, production-ready MCP server demonstrating how to integrate external services with AI PCs using the Model Context Protocol.
🎯 Purpose
This sample MCP server demonstrates:
✅ How to create an MCP server from scratch
✅ How to expose tools (functions) to AI clients
✅ How to integrate external APIs (OpenWeather API)
✅ Production-ready error handling
✅ Clean, well-documented code
Perfect for: OEM partners building AI PC features, developers learning MCP, proof-of-concept projects
Related MCP server: Weather MCP Server
🌟 Features
Available Tools
get_current_weather- Get real-time weather for any cityTemperature, conditions, humidity, wind speed
Supports both Celsius and Fahrenheit
get_weather_forecast- Get 5-day forecastDaily high/low temperatures
Weather conditions per day
🚀 Quick Start
Prerequisites
Node.js >= 18.0.0
OpenWeather API key (free tier available)
Installation
# Clone or download this repository
cd weather-mcp-server
# Install dependencies
npm install
# Configure API key
cp .env.example .env
# Edit .env and add your OpenWeather API keyGet API Key
Visit OpenWeather API
Sign up for free account
Generate API key
Add to
.envfile
Run the Server
# Start the server
npm start
# Or with auto-reload during development
npm run dev📖 Usage Examples
Configure in Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/absolute/path/to/weather-mcp-server/index.js"],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}Test with AI Client
Once configured, you can ask your AI assistant:
"What's the weather like in Taipei?"
"Give me a 5-day forecast for Tokyo"
"What's the temperature in New York in Fahrenheit?"The AI will automatically call the appropriate MCP tools!
🏗️ Architecture
┌─────────────────┐
│ AI Client │ (Claude, ChatGPT, etc.)
│ (Claude Desktop)│
└────────┬────────┘
│ MCP Protocol (stdio)
↓
┌─────────────────┐
│ Weather MCP │ ← This server
│ Server │
└────────┬────────┘
│ HTTPS
↓
┌─────────────────┐
│ OpenWeather API │
└─────────────────┘Key Components
index.js- Main server implementation@modelcontextprotocol/sdk- Official MCP SDKStdioServerTransport- Communicates via stdin/stdoutOpenWeather API- External weather data source
📁 Project Structure
weather-mcp-server/
├── package.json # Dependencies and scripts
├── index.js # Main MCP server code
├── .env.example # Environment variables template
├── .env # Your API keys (git-ignored)
├── README.md # This file
├── README.zh-TW.md # 繁體中文版
├── PARTNER-GUIDE.md # Detailed guide for OEM partners
└── examples/
└── client-example.js # Example client code🛠️ Development
Code Structure
The server is organized into clear sections:
Configuration - API keys, URLs
WeatherServer Class - Main server logic
Tool Registration - Define available tools
Tool Handlers - Implement tool functionality
Error Handling - Robust error management
Adding New Tools
// 1. Add tool definition in setupToolHandlers()
{
name: 'your_new_tool',
description: 'What this tool does',
inputSchema: {
type: 'object',
properties: {
param1: { type: 'string', description: 'Parameter description' }
},
required: ['param1']
}
}
// 2. Add handler in CallToolRequestSchema
case 'your_new_tool':
return await this.yourNewTool(args.param1);
// 3. Implement the method
async yourNewTool(param1) {
// Your logic here
return {
content: [{
type: 'text',
text: 'Result'
}]
};
}🧪 Testing
Manual Testing
# Test the MCP server directly
npm testIntegration Testing
Use the included examples/client-example.js to test tool calls programmatically.
📝 API Reference
Tool: get_current_weather
Parameters:
city(string, required) - City name (e.g., "Taipei", "Tokyo")units(string, optional) - "metric" (default) or "imperial"
Returns:
🌤️ Current Weather in Taipei, TW
Temperature: 25.3°C (feels like 26.1°C)
Condition: Clear - clear sky
Humidity: 65%
Wind Speed: 3.2 m/s
Pressure: 1013 hPa
Visibility: 10.0 km
Last updated: 11/14/2025, 10:30:00 AMTool: get_weather_forecast
Parameters:
city(string, required) - City nameunits(string, optional) - "metric" (default) or "imperial"
Returns:
📅 5-Day Weather Forecast for Taipei, TW
11/14/2025:
High: 26.5°C | Low: 22.1°C
Condition: Clear
11/15/2025:
High: 27.2°C | Low: 23.4°C
Condition: Clouds
...🔒 Security Best Practices
Implemented in this sample:
✅ API keys stored in environment variables (not in code)
✅ Input validation for all parameters
✅ Proper error handling (no sensitive data leakage)
✅ HTTPS for external API calls
✅ Minimal dependencies (reduces attack surface)
For production deployments:
🔐 Use secrets management system (AWS Secrets Manager, Azure Key Vault)
🔐 Implement rate limiting
🔐 Add request logging/monitoring
🔐 Use TLS for MCP communication if deployed remotely
🌐 Localization
This server supports multiple languages through the OpenWeather API:
// Add language parameter to API call
const url = `${API_BASE_URL}/weather?q=${city}&units=${units}&lang=zh_tw&appid=${API_KEY}`;Supported languages: en, zh_tw, zh_cn, ja, ko, and 50+ more
🐛 Troubleshooting
Common Issues
"City not found"
Check spelling of city name
Try including country code: "Taipei,TW"
"Weather API error: Unauthorized"
Verify your API key in
.envCheck API key is active at openweathermap.org
"Module not found"
Run
npm installCheck Node.js version >= 18.0.0
MCP server not detected in Claude
Verify
claude_desktop_config.jsonpathRestart Claude Desktop
Check server logs for errors
📚 Learn More
MCP Resources
Weather API
🤝 For OEM Partners
See PARTNER-GUIDE.md for:
Detailed integration guide
Deployment options
Customization examples
Production checklist
Support information
Contact: partners@irisgo.ai
📄 License
MIT License - see LICENSE file
🙏 Credits
Created by: IrisGo.AI Team
MCP Protocol: Anthropic
Weather Data: OpenWeather
For: ASUS and AI PC OEM partners
📮 Support
Issues: GitHub Issues
Email: support@irisgo.ai
Documentation: docs.irisgo.ai
Last Updated: 2025-11-14 Version: 1.0.0
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.Last updated
- Flicense-qualityDmaintenanceProvides weather information through OpenWeather API, enabling users to get current weather conditions, 5-day forecasts, and perform temperature conversions for any city. Offers a secure interface for AI assistants to access comprehensive weather data including temperature, humidity, wind, and pressure information.Last updated
- Alicense-qualityDmaintenanceProvides access to real-time weather data, 5-day forecasts, and air quality information for any city using the OpenWeatherMap API.Last updatedMIT
- Alicense-qualityDmaintenanceProvides real-time weather data and forecasts for locations worldwide using the OpenWeatherMap API. It enables AI assistants to retrieve current conditions, temperature, and forecasts through a simple tool-based interface.Last updatedMIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lmanchu/weather-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server