{"id":16161,"library":"open-meteo-mcp-server","title":"Open-Meteo Model Context Protocol Server","description":"The `open-meteo-mcp-server` package provides a comprehensive Model Context Protocol (MCP) server designed to interface Large Language Models (LLMs) with the various Open-Meteo weather APIs. It currently stands at stable version `1.6.1` and releases are frequent, typically addressing bug fixes, schema updates, and security enhancements as seen in the recent changelog. Key differentiators include its full support for a wide array of Open-Meteo APIs (Forecast, Archive, Air Quality, Marine, Geocoding, Elevation, and specialized models like DWD ICON, NOAA GFS, ECMWF, etc.) and its robust implementation of the Model Context Protocol, enabling structured interaction with LLMs. The server offers features like cryptographic session IDs, authentication middleware, rate limiting, and trusted-proxy IP validation for enhanced security. It is primarily consumed as a standalone Node.js server, often orchestrated via `npx` or Docker, but also provides a programmatic API for embedding within applications.","status":"active","version":"1.6.1","language":"javascript","source_language":"en","source_url":"https://github.com/cmer81/open-meteo-mcp","tags":["javascript","mcp","weather","open-meteo","forecast","api","typescript"],"install":[{"cmd":"npm install open-meteo-mcp-server","lang":"bash","label":"npm"},{"cmd":"yarn add open-meteo-mcp-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add open-meteo-mcp-server","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is an ESM module and requires Node.js >= 22.0.0. Use `import` syntax.","wrong":"const { createMcpServer } = require('open-meteo-mcp-server');","symbol":"createMcpServer","correct":"import { createMcpServer } from 'open-meteo-mcp-server';"},{"note":"`startMcpServer` is a named export, not a default export. It creates and starts the server instance.","wrong":"import startMcpServer from 'open-meteo-mcp-server';","symbol":"startMcpServer","correct":"import { startMcpServer } from 'open-meteo-mcp-server';"},{"note":"Import `McpServerOptions` as a type for programmatic configuration of the server. It's available as a named export.","symbol":"McpServerOptions","correct":"import type { McpServerOptions } from 'open-meteo-mcp-server';"}],"quickstart":{"code":"import { startMcpServer } from 'open-meteo-mcp-server';\n\nasync function runServer() {\n  const port = parseInt(process.env.PORT ?? '3000', 10);\n  const host = process.env.HOST ?? '0.0.0.0';\n  console.log(`Starting Open-Meteo MCP Server on ${host}:${port}...`);\n\n  try {\n    const server = await startMcpServer({\n      port,\n      host,\n      // Optional: Configure trusted proxies for security features\n      // trustedProxy: process.env.TRUSTED_PROXY_CIDR || undefined,\n      // Optional: Configure rate limiting\n      // rateLimitWindowMs: parseInt(process.env.RATE_LIMIT_WINDOW_MS || '60000', 10),\n      // rateLimitMax: parseInt(process.env.RATE_LIMIT_MAX || '100', 10),\n      // Optional: Specify Open-Meteo API URLs if not default\n      // openMeteoApiUrl: process.env.OPEN_METEO_API_URL || 'https://api.open-meteo.com'\n    });\n    console.log(`Server started successfully. MCP URL: http://${host}:${port}/mcp`);\n  } catch (error) {\n    console.error('Failed to start MCP server:', error);\n    process.exit(1);\n  }\n}\n\n// To run this script, ensure your Node.js version is >= 22.0.0\n// You can also run it directly via npx: npx -y -p open-meteo-mcp-server open-meteo-mcp-server\nrunServer();","lang":"typescript","description":"This quickstart demonstrates how to programmatically start the Open-Meteo MCP server using `startMcpServer`, configuring its host and port through environment variables or defaults."},"warnings":[{"fix":"Upgrade your Node.js environment to version 22.0.0 or later using a tool like nvm (Node Version Manager).","message":"The package requires Node.js version 22.0.0 or higher. Older Node.js versions will not be able to run this server.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Review the documentation for `v1.4.0` regarding security configurations. Ensure your environment variables like `TRUSTED_PROXY_CIDR` are correctly set if the server is behind a proxy to ensure correct IP-based security features function as intended.","message":"Introduced significant security features including cryptographic session IDs, authentication middleware, rate limiting, and trusted-proxy IP validation. While these are enhancements, they may require configuration and could alter how the server responds to unauthenticated/unauthorized requests or high traffic.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Keep the `open-meteo-mcp-server` package updated to the latest version to ensure alignment with current Open-Meteo API schemas. When developing clients, refer to the Open-Meteo API documentation and the server's expected request bodies.","message":"Various fixes for schema inconsistencies in Open-Meteo API requests (e.g., `ForecastModelsSchema`, `ArchiveHourlyVariablesSchema`, `past_days` constraints). Clients making requests to the MCP server that rely on outdated or incorrect schema assumptions might encounter Zod validation errors.","severity":"gotcha","affected_versions":">=1.3.0"},{"fix":"Adjust client-side error handling to expect structured MCP error responses instead of raw HTTP client (Axios) errors when interacting with the server. Refer to the Model Context Protocol specification for expected error formats.","message":"HTTP errors from upstream Axios calls are now mapped to typed MCP error responses. Clients that previously parsed raw Axios error structures may need to update their error handling logic to correctly interpret the new, structured error formats.","severity":"gotcha","affected_versions":">=1.6.1"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"This package is an ES Module. Ensure your project is configured for ESM (e.g., `\"type\": \"module\"` in `package.json`) and use `import` statements. If you must use CommonJS, consider dynamic `import()`: `const module = await import('open-meteo-mcp-server');`","cause":"Attempting to import `open-meteo-mcp-server` using CommonJS `require()` syntax in a CommonJS module.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module ... FromCjs is not supported."},{"fix":"Ensure `createMcpServer` is imported as a named export: `import { createMcpServer } from 'open-meteo-mcp-server';`","cause":"Incorrectly importing `createMcpServer` as a default export or from a wrong path.","error":"TypeError: createMcpServer is not a function"},{"fix":"Update your Node.js installation to version 22.0.0 or newer. Tools like `nvm` (Node Version Manager) can help manage multiple Node.js versions.","cause":"The installed Node.js version does not meet the minimum requirement specified in `package.json`.","error":"Error: Your Node.js version is too old. This package requires Node.js >= 22.0.0."},{"fix":"Verify that your client-side requests include all necessary parameters as defined by the Open-Meteo API documentation and the MCP server's validation schemas. Consult the `open-meteo-mcp` GitHub repository for the latest schema definitions.","cause":"An incoming request to the MCP server did not conform to the expected Zod schema for the Open-Meteo API, missing a required parameter like `latitude`.","error":"ZodError: [ { \"code\": \"invalid_type\", \"expected\": \"string\", \"received\": \"undefined\", \"path\": [ \"latitude\" ], \"message\": \"Required\" } ]"}],"ecosystem":"npm"}