Skip to main content
Glama
aaudeon

MCP Weather Server

by aaudeon

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 start

Mé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 tools
get_weatherB

Obtient les informations météorologiques actuelles pour une ville

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYesNom de la ville (ex: Paris, London, New York)
countryNoCode pays optionnel (ex: FR, US, GB)
langNoLangue pour la description (ex: fr, en, es)fr
unitsNoUnités de mesure (metric=Celsius, imperial=Fahrenheit, kelvin=Kelvin)metric

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves current weather information but doesn't mention any behavioral traits such as rate limits, authentication requirements, error conditions, response format, or whether it's a read-only operation. For a tool with no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a straightforward weather retrieval tool and front-loads the essential information. Every word earns its place in this concise formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a weather retrieval tool with 4 parameters, 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It states what the tool does but doesn't provide context about behavioral aspects, output format, or differentiation from sibling tools. The completeness is borderline - it meets basic requirements but leaves important contextual gaps that would help an agent use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'pour une ville' (for a city), which aligns with the 'city' parameter but doesn't add meaningful semantics beyond what's already in the schema. With 100% schema description coverage, all parameters are well-documented in the schema itself, so the description doesn't need to compensate. The baseline score of 3 is appropriate since the schema does the heavy lifting for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Obtient les informations météorologiques actuelles pour une ville' (Gets current weather information for a city). It specifies the verb ('obtient' - gets) and resource ('informations météorologiques actuelles' - current weather information). However, it doesn't explicitly differentiate from sibling tools like get_weather_by_coordinates or get_weather_forecast, which would be needed for a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (get_weather_by_coordinates and get_weather_forecast). It doesn't mention alternatives, prerequisites, or contextual limitations. The only implied usage is for current weather by city name, but this isn't explicitly stated as a distinguishing factor.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_weather_by_coordinatesB

Obtient les informations météorologiques actuelles par coordonnées GPS

ParametersJSON Schema
NameRequiredDescriptionDefault
langNoLangue pour la description (ex: fr, en, es)fr
latYesLatitude
lonYesLongitude
unitsNoUnités de mesure (metric=Celsius, imperial=Fahrenheit, kelvin=Kelvin)metric

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a read operation ('obtient' - gets) but doesn't mention rate limits, authentication requirements, error conditions, response format, or whether it provides real-time or cached data. For a weather API tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in French that directly states the tool's function. It's appropriately sized for a simple weather lookup tool and front-loads the essential information without unnecessary elaboration or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a weather API tool with 4 parameters (2 required), 100% schema coverage, but no annotations and no output schema, the description is minimally adequate. It covers the basic purpose but lacks important context about behavioral traits, error handling, and what specific weather information is returned. The absence of an output schema means the description should ideally hint at return values, which it doesn't.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'par coordonnées GPS' (by GPS coordinates), which aligns with the lat/lon parameters in the schema. However, with 100% schema description coverage, all parameters are already well-documented in the input schema with descriptions, defaults, and enums. The description adds minimal value beyond what's already in the structured schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Obtient les informations météorologiques actuelles par coordonnées GPS' (Gets current weather information by GPS coordinates). It specifies the verb ('obtient' - gets) and resource ('informations météorologiques actuelles' - current weather information), but doesn't explicitly differentiate from sibling tools get_weather and get_weather_forecast, which likely have different scopes or timeframes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tools get_weather and get_weather_forecast. It doesn't mention alternatives, prerequisites, or specific contexts where this coordinate-based approach is preferred over other methods. The user must infer usage from the tool name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_weather_forecastC

Obtient les prévisions météorologiques sur 5 jours pour une ville

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYesNom de la ville (ex: Paris, London, New York)
countryNoCode pays optionnel (ex: FR, US, GB)
langNoLangue pour la description (ex: fr, en, es)fr
unitsNoUnités de mesure (metric=Celsius, imperial=Fahrenheit, kelvin=Kelvin)metric

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves forecasts but doesn't mention rate limits, authentication requirements, error handling, or data freshness. For a read-only tool with no annotation coverage, this leaves significant gaps in understanding operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in French that front-loads the core purpose. It wastes no words and directly communicates the tool's function without redundancy or fluff, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the forecast data includes (e.g., temperature, precipitation), how results are structured, or any limitations. For a tool with 4 parameters and no structured output, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't add any parameter details beyond what's in the schema, which has 100% coverage. It implies the 'city' parameter is required but doesn't explain parameter interactions or provide examples. With high schema coverage, the baseline is 3, as the schema adequately documents parameters without extra description input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Obtient les prévisions météorologiques sur 5 jours pour une ville' (Gets 5-day weather forecasts for a city). It specifies the verb ('obtient'), resource ('prévisions météorologiques'), and scope ('5 jours', 'pour une ville'). However, it doesn't explicitly differentiate from sibling tools like 'get_weather' or 'get_weather_by_coordinates', which likely have different input methods or forecast durations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It doesn't mention alternatives like 'get_weather' or 'get_weather_by_coordinates', nor does it specify prerequisites, exclusions, or optimal use cases. The agent must infer usage from the tool name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedget_weather
    • First observedget_weather_by_coordinates
    • First observedget_weather_forecast

TDQS

B3.4/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count3/5

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.

Completeness4/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    A 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.
    11
    37 npm
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables users to fetch weather forecasts through Cursor AI by using natural language queries.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    -