MCP Weather Server
The MCP Weather Server provides real-time weather information and forecasts using the Open-Meteo API with the following capabilities:
Get current weather by city: Fetch weather conditions using city name with optional country code.
Get weather forecast: Retrieve forecasts for up to 7 days for a given city.
Get weather by coordinates: Obtain weather data using GPS coordinates (latitude and longitude).
Multilingual support: Access weather descriptions in multiple languages (French, English, Spanish, German).
Customizable units: Choose between metric (Celsius), imperial (Fahrenheit), or Kelvin measurements.
Docker-ready: Optimized for production deployment using Docker and Docker Compose.
TypeScript strict: Ensures robust parameter validation.
Enables integration with ChatGPT through plugins or custom integrations, providing real-time weather data and forecasts
Click on "Deploy 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., "@MCP Weather Server what's the weather forecast for Paris this weekend?"
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.
Serveur MCP Weather
Serveur Model Context Protocol (MCP) fournissant des informations météorologiques en temps réel via l'API Open-Meteo.
✨ Fonctionnalités
🌤️ Météo actuelle par nom de ville ou coordonnées
📅 Prévisions jusqu'à 7 jours
🌍 Support multilingue (français, anglais, espagnol, allemand, etc.)
🆓 API gratuite Open-Meteo (sans clé requise)
🐳 Prêt pour Docker avec configuration de production optimisée
📊 TypeScript strict avec validation des paramètres
Related MCP server: Weather MCP Server
🚀 Installation et démarrage rapide
Prérequis
Node.js 18+
Docker et Docker Compose (optionnel)
Méthode 1: Démarrage local
# Installation des dépendances
npm install
# Construction
npm run build
# Démarrage
npm startMéthode 2: Docker (recommandé pour production)
# Déploiement automatique
chmod +x deploy.sh
./deploy.sh📋 Outils MCP disponibles
get_weather
Obtient la météo actuelle pour une ville.
{
"city": "Paris",
"countryCode": "FR",
"lang": "fr"
}get_weather_forecast
Obtient les prévisions météo (1-7 jours).
{
"city": "London",
"days": 5,
"lang": "en"
}get_weather_by_coordinates
Obtient la météo par coordonnées GPS.
{
"latitude": 48.8566,
"longitude": 2.3522,
"lang": "fr"
}⚙️ Configuration
Copiez .env.example vers .env et ajustez si nécessaire :
# Port du serveur (optionnel)
MCP_SERVER_PORT=3000
# Langue par défaut
DEFAULT_LANGUAGE=fr
# Environnement
NODE_ENV=production🛠️ Développement
# Mode développement avec rechargement automatique
npm run dev
# Vérification du code
npm run lint
npm run typecheck
# Formatage du code
npm run format📦 Structure du projet
src/
├── index.ts # Point d'entrée principal
├── services/
│ └── weatherService.ts # Service API Open-Meteo
├── utils/
│ ├── formatter.ts # Formatage des réponses
│ └── validation.ts # Validation des paramètres
├── types/
│ └── weather.ts # Types TypeScript
└── constants/
└── weather.ts # Constantes et configurations🐳 Production avec Docker
Le projet inclut une configuration Docker optimisée avec :
Build multi-stage pour une image légère
Utilisateur non-root pour la sécurité
Healthchecks intégrés
Logs structurés
# Construction manuelle
docker build -t mcp-weather-server .
# Ou via docker-compose
docker-compose up -d🔧 Intégration MCP
Ce serveur est compatible avec tous les clients MCP. Exemple d'utilisation avec Claude Desktop :
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/chemin/vers/dist/index.js"]
}
}
}📄 License
MIT - Voir le fichier LICENSE pour plus de détails.
Développé avec ❤️ en TypeScript
Available Tools
3 toolsget_weatherB
Obtient les informations météorologiques actuelles pour une ville
Inputs: city (required), country, lang, units.
get_weather_by_coordinatesB
Obtient les informations météorologiques actuelles par coordonnées GPS
Inputs: lat (required), lon (required), lang, units.
get_weather_forecastC
Obtient les prévisions météorologiques sur 5 jours pour une ville
Inputs: city (required), country, lang, units.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_weather provides current weather for a city, get_weather_by_coordinates provides current weather for GPS coordinates, and get_weather_forecast provides 5-day forecasts for a city. There is no overlap or ambiguity between these three functions.
All tools follow a consistent verb_noun pattern with 'get_weather' as the base, plus modifiers ('by_coordinates', 'forecast') to differentiate them. The naming is perfectly predictable and follows the same style throughout.
With only 3 tools, the server feels somewhat thin for a weather domain that typically includes more features like historical data, alerts, or air quality. However, it covers basic current and forecast needs, placing it in the borderline range.
The tools provide good coverage for core weather queries: current conditions by city and coordinates, and multi-day forecasts. A minor gap is the lack of forecast by coordinates, but agents can work around this by using city names from coordinates first.
Related MCP Connectors
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides comprehensive weather data and forecasts through the OpenWeatherMap API, enabling AI assistants to access real-time weather information, forecasts, air quality data, and location services.1136 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables users to fetch weather forecasts through Cursor AI by using natural language queries.MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables AI assistants and LLMs to access real-time weather data and forecasts by connecting to the OpenWeatherMap API.-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides weather information and forecasts based on user location or address input.613 npm8MIT