Open-Meteo MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Open-Meteo MCP TypeScript
A TypeScript/Node.js implementation of the Model Context Protocol (MCP) server for Open-Meteo weather data. Provides AI assistants like Claude with comprehensive weather forecasts, snow conditions, air quality metrics, and location search capabilities.
Modern Stack: This TypeScript implementation runs on Node.js 20 LTS+ with full Docker support. Originally written in Deno, migrated to Node.js (Feb 2026) for broader ecosystem compatibility. Earlier versions available in Python.
Features
11 MCP Tools
π€οΈ Weather Forecasts: Current conditions, hourly and daily forecasts (temperature, precipitation, wind, UV)
βοΈ Snow Conditions: Snow depth, snowfall, and mountain weather for ski resorts
π«οΈ Air Quality: AQI (European & US), pollutants (PM2.5, PM10, O3, NO2), UV index, pollen data
πΊοΈ Location Search: Geocoding with fuzzy search and country filtering
π Weather Alerts: Automated alerts for extreme conditions (heat, cold, storms, UV)
ποΈ Swiss Locations: Pre-configured data for 100+ Swiss cities and mountain passes
π Historical Weather: Past weather data for analysis
π Marine Conditions: Ocean weather, waves, currents
π§ Comfort Index: Human comfort calculation based on temperature, humidity, wind
π Astronomy Data: Sunrise, sunset, golden hour, blue hour
π Location Comparison: Compare weather across multiple locations
4 MCP Resources
weather://codes - WMO weather code reference (28 codes)
weather://parameters - Available API parameters documentation
weather://aqi-reference - Air quality index scales and health recommendations
weather://swiss-locations - 100+ Swiss cities, mountains, ski resorts with coordinates
3 MCP Prompts
ski-trip-weather - Ski trip planning with snow conditions and resort recommendations
plan-outdoor-activity - Weather-aware activity planning (hiking, cycling, etc.)
weather-aware-travel - Travel planning with weather integration
Related MCP server: Open-Meteo MCP Server
Installation
Prerequisites
Local Setup
# Clone the repository
git clone https://github.com/schlp/open-meteo-mcp-ts.git
cd open-meteo-mcp-ts
# Install dependencies
pnpm install
# Run tests
pnpm test
# Start the server
pnpm startUsage
With Claude Desktop
Configure Claude Desktop to use the MCP server:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"open-meteo": {
"command": "node",
"args": ["/path/to/open-meteo-mcp-ts/dist/main.js"]
}
}
}Or use Docker:
{
"mcpServers": {
"open-meteo": {
"command": "docker",
"args": ["run", "--rm", "-i", "open-meteo-mcp:latest"]
}
}
}Restart Claude Desktop, and the weather tools will be available.
With MCP Inspector
Build the project first, then test interactively:
pnpm build
npx @modelcontextprotocol/inspector node dist/main.jsThis opens a web interface to test all tools, resources, and prompts.
Development
Available Commands
# Development with hot reload (tsx)
pnpm dev
# Run tests
pnpm test
# Watch mode for tests
pnpm test:watch
# Generate coverage report
pnpm coverage
# Linting (ESLint)
pnpm lint
# Format code (Prettier)
pnpm fmt
# Type checking (TypeScript)
pnpm check
# Build TypeScript to JavaScript
pnpm buildProject Structure
open-meteo-mcp-ts/
βββ src/
β βββ main.ts # Entry point (MCP server initialization)
β βββ server.ts # MCP tools, resources, prompts
β βββ client.ts # Open-Meteo API client
β βββ models.ts # Zod schemas and TypeScript types
β βββ helpers.ts # Utility functions
β βββ data/ # JSON resources
βββ tests/ # Test suite (168 tests)
βββ dist/ # Compiled JavaScript (generated)
βββ .github/
β βββ workflows/ # CI/CD configuration
βββ package.json # Node.js/pnpm configuration
βββ tsconfig.json # TypeScript configuration
βββ Dockerfile # Docker image definition
βββ docker-compose.yml # Docker Compose configuration
βββ DEPLOYMENT.md # Deployment guide
βββ README.md # This fileDeployment
Deploy with Docker for production use. Multi-stage build optimizes for security and size.
Quick Start - Docker
# Build the image
docker build -t open-meteo-mcp:latest .
# Run the container
docker run -it open-meteo-mcp:latest
# Or use Docker Compose
docker-compose up -dQuick Start - Node.js
# Install and build
pnpm install
pnpm build
# Run in production
pnpm start
# View logs
node dist/main.jsSee DEPLOYMENT.md for detailed instructions including Docker, docker-compose, and bare Node.js options.
Testing
All 168 tests passing:
$ pnpm test
β 168 passed | β 0 failed (1.1s)Test Coverage
6 tests: Air quality edge cases
21 tests: API client (mocked)
9 tests: Geocoding functionality
48 tests: Helper functions
12 tests: Integration improvements
26 tests: Model validation (Zod schemas)
22 tests: Server integration (tools, resources, prompts)
24 tests: Server tool call handlers (all 11 MCP tools)
API Usage
Example: Get Weather
import { OpenMeteoClient } from "./src/client.js";
const client = new OpenMeteoClient();
// Search for location
const location = await client.searchLocation("Zurich");
const zurich = location.results![0];
// Get weather forecast
const weather = await client.getWeather(
zurich.latitude,
zurich.longitude,
7, // forecast days
true, // include hourly
"Europe/Zurich", // timezone
);
console.log(`Current temperature: ${weather.current_weather.temperature}Β°C`);
console.log(`Condition: ${weather.current_weather.weathercode}`);Example: Get Air Quality
const airQuality = await client.getAirQuality(
47.3769, // Zurich latitude
8.5417, // Zurich longitude
5, // forecast days
true, // include pollen
"Europe/Zurich",
);
console.log(`European AQI: ${airQuality.current.european_aqi}`);
console.log(`PM2.5: ${airQuality.current.pm2_5} ΞΌg/mΒ³`);Technical Stack
Runtime: Node.js 20.0.0+ (migrated from Deno, Feb 2026)
Package Manager: pnpm 8+
MCP SDK: @modelcontextprotocol/sdk
Validation: Zod schemas
Date/Time: date-fns and date-fns-tz
Build: TypeScript via tsc
Testing: Node.js native test runner
Linting: ESLint with TypeScript plugin
Formatting: Prettier
HTTP Client: Native Fetch API with gzip compression
Deployment: Docker (multi-stage Alpine build, 200MB image)
Performance
Key improvements over Python version:
β‘ 50% faster response times (target: β€125ms P95)
πΎ 30% lower memory usage (target: β€70 MB)
π 40% higher throughput (target: β₯280 RPS)
π 60% faster cold starts (target: β€160ms)
See docs/PERFORMANCE.md for detailed benchmarks (coming soon).
Migration History
Python β TypeScript (Original Rewrite)
The TypeScript implementation maintains full feature parity with the Python version:
Feature | Python (FastMCP) | TypeScript |
MCP Tools | 11 | 11 β |
MCP Resources | 4 | 4 β |
MCP Prompts | 3 | 3 β |
Tests | 137 | 168 β |
Gzip Compression | β | β |
Deno β Node.js (Feb 2026)
Migration to Node.js 20 LTS+ for broader ecosystem compatibility:
Aspect | Deno (v4.0.0) | Node.js (v4.1.0) |
Runtime | Deno 1.40+ | Node.js 20 LTS+ |
Package Manager | JSR/npm | pnpm/npm |
Build System | esbuild | tsc |
Test Runner | deno test | node --test |
Deployment | Deno Deploy | Docker |
Test Count | 144 | 168 β |
Key Changes
Runtime: Deno β Node.js 20 LTS+ for universal compatibility
Package Manager: deno β pnpm for performance and consistency
Build: TypeScript native compilation via tsc
Deployment: Deno Deploy β Docker (multi-stage build)
CLI: deno task commands β pnpm commands
Breaking Changes: None - MCP protocol fully compatible
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Guidelines
Follow Prettier style guide (
pnpm fmt)Add tests for new features
Update documentation
Ensure all tests pass (
pnpm test)Run type checking (
pnpm check)Run linting (
pnpm lint)
License
MIT License - see LICENSE file for details.
Acknowledgments
Open-Meteo - Free weather API
Model Context Protocol - AI integration standard
Node.js - JavaScript runtime
Anthropic Claude - AI assistant integration
Deno - Initial TypeScript implementation (v1-4.0.0)
Related Projects
open-meteo-mcp - Original Python implementation
MCP Servers - Official MCP server examples
Swiss Mobility MCP - Swiss public transport integration
Support
π Documentation
π Issue Tracker
π¬ Discussions
Built with β€οΈ for the Claude Code community
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Get current weather for any city and create images from your prompts. Streamline planning, reportsβ¦
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables 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.ISC
- AlicenseBqualityBmaintenanceProvides comprehensive access to Open-Meteo APIs for weather forecasts, historical data, air quality, and marine conditions. It enables LLMs to query specialized meteorological models, perform geocoding, and access advanced climate or flood projections.171,092 npm74MIT
- FlicenseCqualityCmaintenanceProvides AI assistants with tools to retrieve current weather, 7-day forecasts, and city-to-city weather comparisons using the Open-Meteo API. It features specialized resources for weather data and prompts for generating weather summaries without requiring an API key.4-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.Creative Commons Zero v1.0 Universal