Skip to main content
Glama
Nefino MCP Server

Nefino MCP Server

Official
by nefino

Nefino MCP 服务器

Nefino MCP 服务器是一个模型上下文协议 (MCP)服务器,它为大型语言模型 (LLM) 提供访问德国可再生能源项目、规划和公告的新闻和信息的权限。它与 Nefino API 集成,提供对这些数据的结构化访问。

特征

  • 检索特定地理位置的新闻

  • 按各种可再生能源主题(太阳能、风能、氢能等)进行过滤

  • 支持日期范围和基于最近度的查询

  • 通过环境变量进行安全身份验证

  • 输入验证和错误处理

  • 完全兼容 MCP

Related MCP server: LandiWetter MCP Server

安装

先决条件

  • Python 3.10 或更高版本

  • 访问 Nefino API(需要凭证)

安装

pip install git+https://github.com/nefino/mcp-nefino.git

配置

服务器需要设置几个环境变量。这些变量应该在运行服务器时直接传入。

NEFINO_USERNAME=your_username
NEFINO_PASSWORD=your_password
NEFINO_JWT_SECRET=your_jwt_secret
NEFINO_BASE_URL=http://api_endpoint

用法

使用 Claude Desktop

  1. 安装Claude Desktop

  2. 将以下内容添加到您的 Claude Desktop 配置中(在 macOS 上为~/Library/Application Support/Claude/claude_desktop_config.json ,在 Windows 上为%APPDATA%\Claude\claude_desktop_config.json ):

{
  "mcpServers": {
    "nefino": {
      "command": "python",
      "args": ["-m", "mcp_nefino"],
      "env": {
        "NEFINO_USERNAME": "your_username",
        "NEFINO_PASSWORD": "your_password",
        "NEFINO_JWT_SECRET": "your_jwt_secret",
        "NEFINO_BASE_URL": "http://api_endpoint"
      }
    }
  }
}
  1. 重启Claude桌面

直接使用

您也可以直接运行服务器:

python -m mcp_nefino

可用工具

检索新闻项目

使用各种过滤选项检索特定位置的新闻项目。

参数:

  • place_id (字符串):地点的 ID

  • place_type (枚举):地点类型(PR、CTY、AU、LAU)

  • range_or_recency (枚举,可选):RANGE 或 RECENCY

  • last_n_days (整数,可选):回顾的天数(用于 RECENCY 模式)

  • date_range_begin (字符串,可选):YYYY-MM-DD 格式的开始日期(用于 RANGE 模式)

  • date_range_end (字符串,可选):YYYY-MM-DD 格式的结束日期(适用于 RANGE 模式)

  • news_topics (枚举列表,可选):要过滤的主题(BATTERY_STORAGE、GRID_EXPANSION、SOLAR、HYDROGEN、WIND)

通过 Claude 进行的示例查询:

Get renewable energy news for administrative unit DE9_AU0213 from January to June 2024, focusing on solar projects.

发展

要使用 MCP Inspector 以开发模式运行:

mcp dev -m mcp_nefino

错误处理

服务器执行以下验证:

  • 日期格式 (YYYY-MM-DD)

  • 日期范围有效性

  • RANGE 模式与 RECENCY 模式的参数组合

  • API 凭证和连接

  • 新闻话题有效性

所有错误都会返回描述性消息以帮助诊断问题。

执照

[许可证类型 - 例如,MIT] - 请参阅许可证文件以了解详细信息

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Provides access to Deutsche Bahn train timetables, station information, and schedule changes through Model Context Protocol tools and resources.
      4
      17
      MIT
    • A
      license
      D
      quality
      F
      maintenance
      Provides Swiss weather forecast data, allowing users to search for Swiss locations and get detailed hourly and daily weather forecasts.
      2
      2
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Search and retrieve news articles and trending keywords from Google News and Google Trends. Summarize articles and extract keywords using optional NLP and LLM Sampling to get concise insights.
      5
      144 PyPI
      89
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides access to Dutch weather data (current conditions, forecasts, alerts, and historical data) via the KNMI API, with automatic location name resolution for Dutch cities.
      1
      15 npm
      1
      Apache 2.0