Registry / llm-agents / open-meteo-mcp-server

open-meteo-mcp-server

JSON →
library1.6.1jsnpmunverified

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.

npm install open-meteo-mcp-server
INSTALL
IMPORT
SIG · OPEN-METEO-MCP-SER
O
open-meteo-mcp-server
llm-agentsjavascriptv1.6.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createMcpServer
import { createMcpServer } from 'open-meteo-mcp-server';
const { createMcpServer } = require('open-meteo-mcp-server');
This package is an ESM module and requires Node.js >= 22.0.0. Use `import` syntax.
startMcpServer
import { startMcpServer } from 'open-meteo-mcp-server';
import startMcpServer from 'open-meteo-mcp-server';
`startMcpServer` is a named export, not a default export. It creates and starts the server instance.
McpServerOptions
import type { McpServerOptions } from 'open-meteo-mcp-server';
Import `McpServerOptions` as a type for programmatic configuration of the server. It's available as a named export.

This quickstart demonstrates how to programmatically start the Open-Meteo MCP server using `startMcpServer`, configuring its host and port through environment variables or defaults.

import { startMcpServer } from 'open-meteo-mcp-server'; async function runServer() { const port = parseInt(process.env.PORT ?? '3000', 10); const host = process.env.HOST ?? '0.0.0.0'; console.log(`Starting Open-Meteo MCP Server on ${host}:${port}...`); try { const server = await startMcpServer({ port, host, // Optional: Configure trusted proxies for security features // trustedProxy: process.env.TRUSTED_PROXY_CIDR || undefined, // Optional: Configure rate limiting // rateLimitWindowMs: parseInt(process.env.RATE_LIMIT_WINDOW_MS || '60000', 10), // rateLimitMax: parseInt(process.env.RATE_LIMIT_MAX || '100', 10), // Optional: Specify Open-Meteo API URLs if not default // openMeteoApiUrl: process.env.OPEN_METEO_API_URL || 'https://api.open-meteo.com' }); console.log(`Server started successfully. MCP URL: http://${host}:${port}/mcp`); } catch (error) { console.error('Failed to start MCP server:', error); process.exit(1); } } // To run this script, ensure your Node.js version is >= 22.0.0 // You can also run it directly via npx: npx -y -p open-meteo-mcp-server open-meteo-mcp-server runServer();
open-meteo-mcp-server --version
Debug
Known issues
breakingThe package requires Node.js version 22.0.0 or higher. Older Node.js versions will not be able to run this server.
fix
Upgrade your Node.js environment to version 22.0.0 or later using a tool like nvm (Node Version Manager).
affects: >=1.0.0
breakingIntroduced 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.
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.
affects: >=1.4.0
gotchaVarious 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.
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.
affects: >=1.3.0
gotchaHTTP 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.
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.
affects: >=1.6.1
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module ... FromCjs is not supported.
Attempting to import `open-meteo-mcp-server` using CommonJS `require()` syntax in a CommonJS module.
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');`
TypeError: createMcpServer is not a function
Incorrectly importing `createMcpServer` as a default export or from a wrong path.
fix
Ensure `createMcpServer` is imported as a named export: `import { createMcpServer } from 'open-meteo-mcp-server';`
Error: Your Node.js version is too old. This package requires Node.js >= 22.0.0.
The installed Node.js version does not meet the minimum requirement specified in `package.json`.
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.
ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ "latitude" ], "message": "Required" } ]
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`.
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.
Upgrade
Version history
1.6.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources