MeteoSwiss MCP Server

MeteoSwiss MCP Server

Provides access to official MeteoSwiss weather data, including regional reports, daily forecasts, and website search functionality across multiple languages. It enables AI assistants to retrieve real-time weather information and documentation from MeteoSwiss using the Model Context Protocol.

Category
访问服务器

README

(Demo) MCP Server for MeteoSwiss Data

A Model Context Protocol (MCP) server for MeteoSwiss weather data.

Overview

This server provides weather data from MeteoSwiss using the Model Context Protocol (MCP), allowing AI assistants like Claude to access weather information.

Features

  • Weather reports for regions in Switzerland (North, South, West)
  • Search MeteoSwiss website content across multiple topics
  • Fetch full content from MeteoSwiss pages with format conversion
  • Multi-language support (German, French, Italian, English)
  • Weather forecasts with daily breakdowns
  • Intelligent HTTP caching with ETag support
  • Test fixtures for development

Architecture

This MCP server runs as an HTTP service with Server-Sent Events (SSE) for real-time communication. It's designed to be accessed remotely using mcp-remote for Claude Desktop integration.

Quick Start

This server runs as an HTTP service and can be accessed using mcp-remote:

# Start the server
npm start  # or: pnpm start

# In Claude Desktop, use:
npx mcp-remote http://localhost:3000/mcp

Development Mode

For development with auto-reload:

# Start with file watching
npm run dev  # or: pnpm dev

# Test with MCP Inspector
npm run dev:inspect

Development

This project uses tsx for TypeScript execution, providing a smooth development experience with hot reloading.

Prerequisites

  • Node.js v18.0.0 or later (we recommend using nvm for Node.js version management)
  • pnpm for package management

Setting up the development environment

  1. Clone the repository:

    git clone https://github.com/eins78/mcp-server-meteoswiss-data.git
    cd mcp-server-meteoswiss-data
    
  2. Install dependencies:

    pnpm install
    
  3. Use the correct Node.js version:

    nvm use
    

Running the application

Running the Server

The server runs as an HTTP service with Server-Sent Events (SSE):

# Start the server (default port 3000)
pnpm start

# Or specify a custom port
PORT=8080 pnpm start

The HTTP server provides:

  • GET / - Server information
  • GET /mcp - MCP SSE endpoint for client connections
  • POST /messages?sessionId=... - Message handling endpoint
  • GET /health - Health check endpoint

Development Mode

Start the development server with hot reloading:

pnpm run dev

Or run the application without hot reloading:

pnpm run start

Type checking

Check TypeScript types without emitting JavaScript files:

pnpm run lint

Project Structure

  • src/ - Source code
    • index.ts - Application entry point
    • data/ - Data access and transformation
    • schemas/ - Zod schemas for data validation
    • tools/ - Utility tools and scripts
    • support/ - Supporting infrastructure (logging, validation, etc.)

Documentation

  • docs/ - Project documentation
    • architecture/ - Architecture diagrams and descriptions
    • analysis/ - Data analysis and insights

Available Tools

meteoswissWeatherReport

Get official MeteoSwiss weather reports for Swiss regions.

Parameters:

  • region: Swiss region (north, south, or west)
    • north: Northern Switzerland (Zurich, Basel, Bern, Swiss Plateau)
    • south: Southern Switzerland (Ticino and southern valleys)
    • west: Western Switzerland/Romandy (Geneva, Lausanne, western Alps)
  • language: Report language (de, fr, or it - English not available)
    • Default: de

Returns: Detailed weather report with daily forecasts, temperatures, and regional conditions.

search

Search MeteoSwiss website content with pagination and multi-language support.

fetch

Retrieve full content from MeteoSwiss pages in various formats (markdown, text, HTML).

See the API documentation for detailed tool specifications.

Available Prompts

Pre-configured prompts for common weather queries:

German

  • wetterNordschweiz: Current weather report for Northern Switzerland
  • wetterSchweiz: Interactive prompt for any Swiss region

French

  • meteoSuisseRomande: Current weather report for Western Switzerland (Romandy)

Italian

  • meteoTicino: Current weather report for Southern Switzerland (Ticino)

Debugging

For issues with Claude Desktop connections or other debugging needs, see our Debugging Guide.

Running Your Own Instance

Using Node.js

# Clone the repository
git clone https://github.com/eins78/mcp-server-meteoswiss.git
cd mcp-server-meteoswiss

# Install dependencies
pnpm install

# Start the server
pnpm start

# The server will be available at http://localhost:3000

Using Docker

# Run the latest version
docker run -p 3000:3000 -e USE_TEST_FIXTURES=false meteoswiss-mcp-server

# Or build your own
docker build -t my-meteoswiss-server .
docker run -p 3000:3000 my-meteoswiss-server

# Run with custom external port mapping
# Internal port 3000 mapped to external port 8080
docker run -p 8080:3000 -e PUBLIC_URL=http://localhost:8080 my-meteoswiss-server

# Run with custom hostname
docker run -p 80:3000 -e PUBLIC_URL=http://meteoswiss.example.com my-meteoswiss-server

Environment Variables

  • PORT - Server port (default: 3000)
  • PUBLIC_URL - Full public URL including protocol and port for URL generation
  • USE_TEST_FIXTURES - Use test data instead of live API (default: false)
  • DEBUG_MCHMCP - Enable debug logging (default: false)
  • BIND_ADDRESS - Interface to bind to (default: 0.0.0.0)
  • MAX_SESSIONS - Maximum concurrent sessions (default: 100)
  • SESSION_TIMEOUT_MS - Session timeout in milliseconds (default: 300000)

Docker Port Mapping

When running in Docker with port mapping (e.g., -p 8080:3000), use the PUBLIC_URL environment variable to ensure URLs reflect the external port:

# Server listens on port 3000 internally, but is accessible on port 8080 externally
docker run -p 8080:3000 -e PORT=3000 -e PUBLIC_URL=http://localhost:8080 my-server

# For production with a domain name
docker run -p 443:3000 -e PORT=3000 -e PUBLIC_URL=https://api.example.com my-server

Local MCP Configuration

To use your local instance with Claude Desktop, add this to your configuration:

{
  "mcpServers": {
    "meteoswiss-local": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:3000/mcp"]
    }
  }
}

Contributing

Contributions are welcome! Please ensure you follow the architecture guidelines outlined in the documentation.

License

ISC

Acknowledgments

  • MeteoSwiss for providing the weather data
  • Anthropic for the MCP specification

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选