Skip to main content
Glama

KNMI Weather MCP

by wolkwork

KNMI 天气 MCP

FastMCP 服务器提供来自荷兰皇家气象局 (KNMI) 气象站的实时气象数据。该应用程序可从距离荷兰境内任意地点最近的气象站获取最近 10 分钟的测量数据。

特征

  • 获取荷兰任何地点的天气数据
  • 自动查找最近的 KNMI 气象站
  • 提供实时测量,包括:
    • 温度
    • 湿度
    • 风速和风向
    • 沉淀
    • 能见度
    • 气压
  • 天气状况的自然语言解释
  • 位置搜索功能
  • 详细日志记录

先决条件

  • Python 3.10 或更高版本
  • KNMI API 密钥(从KNMI 数据平台获取)
  • uv包管理器

安装

  1. 克隆存储库:
    git clone <repository-url> cd knmi-mcp
  2. 在项目根目录中创建一个.env文件:
    KNMI_API_KEY=your_api_key_here

运行服务器

使用 Claude AI

要将此应用程序与 Claude AI 一起使用,请在项目文件夹中运行以下命令:

uv run fastmcp install src/knmi_weather_mcp/server.py

这会将以下配置添加到您的 Claude 配置文件(通常位于~/Library/Application Support/Claude/claude_desktop_config.json ):

{ "KNMI Weather": { "command": "uv", "args": [ "run", "--with", "fastmcp", "--with", "httpx", "--with", "netCDF4", "--with", "numpy", "--with", "pandas", "--with", "pydantic", "--with", "python-dotenv", "--with", "xarray", "fastmcp", "run", "/Users/<username>/<git location>/knmi-mcp/src/knmi_weather_mcp/server.py" ] } }

注意:如果您看到如下错误:

spawn uv ENOENT

uv命令替换为uv命令的完整路径。在 *nix 系统上,可以使用命令which uv找到。

手动运行

对于开发或独立使用:

uv run fastmcp run src/knmi_weather_mcp/server.py

可用工具

1. 天气怎么样

获取荷兰任何地点当前天气状况的自然语言解释。

例子:

await what_is_the_weather_like_in("Amsterdam")

2. 获取位置天气

获取某个地点的原始天气数据。

例子:

await get_location_weather("Rotterdam")

3. 搜索位置

搜索荷兰的地点。

例子:

await search_location("Utrecht")

4. 获取最近车站

查找距离给定坐标最近的 KNMI 气象站。

例子:

await get_nearest_station(52.3676, 4.9041)

日志记录

应用程序日志存储在logs/knmi_weather.log文件中,提供有关以下内容的详细信息:

  • API 请求和响应
  • 气象数据处理
  • 错误消息
  • 调试信息

数据源

该应用程序使用 KNMI 数据平台 API 从“Actuele10mindataKNMIstations”数据集中获取数据,该数据集提供荷兰所有 KNMI 气象站的 10 分钟间隔测量数据。

错误处理

该应用程序包括强大的错误处理功能:

  • 无效位置
  • API 身份验证问题
  • 网络问题
  • 数据解析错误
  • 缺少测量值

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

FastMCP 服务器提供来自 KNMI 气象站的实时天气数据,允许用户通过自然语言查询访问荷兰任何地点的温度、湿度、风速和其他天气指标。

  1. 特征
    1. 先决条件
      1. 安装
        1. 运行服务器
          1. 使用 Claude AI
          2. 手动运行
        2. 可用工具
          1. 天气怎么样
          2. 获取位置天气
          3. 搜索位置
          4. 获取最近车站
        3. 日志记录
          1. 数据源
            1. 错误处理

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                Provides current weather and air quality data for any city using WeatherAPI, easily integrating with MCP clients like n8n and Claude Desktop App.
                Last updated -
                214
                JavaScript
              • A
                security
                A
                license
                A
                quality
                An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
                Last updated -
                1
                Python
                MIT License
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                An MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.
                Last updated -
                Python
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server that connects to OpenWeatherMap's API to provide current weather data and multi-day forecasts for locations worldwide in different measurement units.
                Last updated -
                12
                TypeScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/wolkwork/knmi-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server