Skip to main content
Glama
linkcd
by linkcd

Tibber MCP 服务器

这是挪威电力供应商Tibber的模型上下文协议 (MCP)服务器。

您可以在本地运行 MCP 服务器并通过不同的主机(例如 Claude Desktop 或Roo Code)访问它。

欲了解更多详情,请查看我的博客文章:
构建 Tibber MCP 服务器:将您的 AI 代理连接到能源消耗数据

概述

Tibber MCP 服务器为 AI 代理提供了一种便捷的方式与Tibber API交互并查询当前能源价格和能源消耗数据等信息。

Related MCP server: Tigo Energy MCP Server

示例查询

一旦连接到 MCP 服务器,您可以提出以下问题:

  • “分析我的电力消耗数据,并以易于阅读的格式呈现通常的高峰时段和任何其他有趣的模式。”

  • “我昨天什么时候用电量最多?”

  • “昨天早上 7 点我消耗了多少电?”

  • “现在的能源价格是多少?”

  • “列出明天最便宜的 3 个小时。”

  • “明天能源价格是上涨还是下跌?”

演示视频

Tibber MCP 演示

建筑学

建筑学

要求

安装

  1. 安装uv :

    # On macOS and Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    # On Windows
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  2. 克隆此存储库:

    git clone https://github.com/linkcd/tibber-mcp.git
    cd tibber-mcp
  3. 设置Python虚拟环境并安装依赖项:

    uv venv --python 3.12 && source .venv/bin/activate && uv pip install --requirement pyproject.toml

主机配置

在 VS 中的 Claude Desktop 或 Roo Code 中

{
   "mcpServers":{
      "tibber":{
         "command":"uv",
         "args":[
            "--directory",
            "[PATH-TO-ROOT-OF-THE-CLONED-TIBBER-MCP-FOLDER]",
            "run",
            "server.py"
         ],
         "env":{
            "TIBBER_API_TOKEN":"[YOUR-TIBBER-TOKEN]"
         }
      }
   }
}

重要提示:请将[YOUR-TIBBER-TOKEN]替换为您的实际令牌。切勿将实际凭证提交到版本控制中。

在本地调试和测试 MCP 服务器

在本地运行服务器并对其运行MCP 检查器

npx @modelcontextprotocol/inspector -e TIBBER_API_TOKEN=[YOUR-TIBBER-TOKEN] python server.py

可用工具

服务器公开了 LLM 可以使用的以下工具:

  1. get_consumption_data() :获取过去 30 天的每小时消耗数据,例如时间段、总成本、基本能源成本和消耗的千瓦时

  2. get_price_and_home_info() :获取价格信息(当前、今天和明天)和家庭信息(所有者、地址、订阅......)

执照

MIT 许可证

致谢

  • 该工具使用 Anthropic 的 MCP 框架

  • 使用FastMCP构建用于服务器实现

  • tibber ingeratoin 基于pyTibber库

Available Tools

2 tools
get_consumption_dataB

Get the hourly consumption data for the last 30 days, such as time period, total cost, base energy cost, and consumpted kwh.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the data returned but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or response format. For a data retrieval tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the key action and scope. It lists data fields concisely without redundancy. However, it could be slightly more structured by separating the action from the data details, but overall it's appropriately sized with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (data retrieval with no parameters) and lack of annotations and output schema, the description is incomplete. It covers what data is fetched but omits behavioral traits, usage context, and output details. For a tool with no structured support, the description should provide more comprehensive guidance to aid the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter details, as there are none to explain. It implies the tool operates without user-provided parameters, which aligns with the schema. Baseline is 4 for zero parameters, as the description doesn't contradict or add unnecessary info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('hourly consumption data'), specifying the time range ('last 30 days') and data fields (e.g., time period, total cost). It distinguishes from the sibling tool 'get_price_and_home_info' by focusing on consumption rather than price/home info, though it doesn't explicitly name the sibling. The purpose is specific but lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as the sibling tool 'get_price_and_home_info'. It mentions the data scope but doesn't explain use cases, prerequisites, or exclusions. This leaves the agent without clear context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_price_and_home_infoB

Get the infomation of: 1. current price, with price break down, price level, and currency 2. hourly price and price level of today 3. hourly price and price level of tomorrow 4. home address info, timezone etc the currency is applying to all prices

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what data is returned but doesn't mention whether this is a read-only operation, potential rate limits, authentication needs, or error conditions. It lacks critical behavioral context for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a bulleted list which helps organization, but contains minor spelling errors ('infomation') and could be more front-loaded. The information is reasonably concise but not optimally polished.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters and no output schema, the description adequately explains what data is returned (price breakdowns, home info). However, without annotations or output schema, it should ideally provide more behavioral context about the operation's characteristics and return format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the empty parameter set. The description appropriately doesn't discuss parameters, maintaining focus on what the tool returns rather than what it accepts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves price information (current, hourly today/tomorrow) and home address/timezone data. It specifies the verb 'Get' and resources (price data, home info), though it doesn't explicitly differentiate from the sibling tool 'get_consumption_data'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling 'get_consumption_data'. The description lists what data is retrieved but doesn't specify use cases, prerequisites, or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updates
    • First observedget_consumption_data
    • First observedget_price_and_home_info

TDQS

B3.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one focuses on consumption data (historical usage and costs), while the other focuses on price information and home details (current, forecasted pricing and location/timezone). There is no overlap in functionality, making it easy for an agent to select the correct tool based on the query.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'get_' prefix and descriptive names (get_consumption_data and get_price_and_home_info). The naming is predictable and readable, adhering to a clear convention throughout the set.

Tool Count3/5

With only 2 tools, the server feels thin for a domain like energy/utility management, which typically involves more operations such as setting preferences, controlling devices, or accessing billing history. While the tools cover key data retrieval aspects, the count is borderline low for comprehensive agent interaction.

Completeness3/5

The tools provide good read-only coverage for consumption and pricing data, but there are notable gaps: no update/delete operations, no ability to manage home settings or devices, and no support for actions like adjusting energy usage or handling billing. This limits the server to data retrieval only, which may cause agent failures in broader utility management tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that provides comprehensive access to Tigo Energy solar system data and analytics. It enables AI assistants to interact with your Tigo solar monitoring system to retrieve production data, performance metrics, system health information, and maintenance insights.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server for EmonCMS energy monitoring API, enabling AI assistants to query energy feeds, inputs, and historical data.
    1
    -
  • F
    license
    A
    quality
    D
    maintenance
    MCP server that enables LLMs to interact with Monta's EV charging platform for managing charge points, charging sessions, and wallet operations.
    7
    -