Sponsored by Deepsite.site

(Demo) MCP Server for MeteoSwiss Data

Created By
eins786 months ago
Content

(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)
  • Multi-language support (German, French, Italian, English)
  • Weather forecasts with daily breakdowns
  • 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: Weather report for Swiss regions (north, south, west) in multiple languages

See the API documentation for detailed tool specifications.

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
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Playwright McpPlaywright MCP server