Skip to main content
Glama
dylanpieper

RMI Utility Transition Hub — MCP Server

by dylanpieper

RMI Utility Transition Hub — MCP Server

一个 MCP 服务器,用于将 RMI 的公开 Utility Transition Hub 数据 加载到 DuckDB。任何 MCP 客户端(Claude Code、Claude Desktop)都可以通过自然语言查询美国公用事业的排放、发电结构和气候对齐情况。

设置

1. 安装依赖

pip install fastmcp duckdb pandas pymupdf

或者使用 uv:

uv init rmi-mcp-uth
cd rmi-mcp-uth
uv add fastmcp duckdb pandas pymupdf

2. 下载 RMI 数据

Utility Transition Hub 下载数据,并将其解压到 server.py 旁边的 data/ 目录中:

mkdir data
cd data

curl -LO https://utilitytransitionhub.rmi.org/static/data_download/data_download_all_pt_1.zip
curl -LO https://utilitytransitionhub.rmi.org/static/data_download/data_download_all_pt_2.zip

unzip data_download_all_pt_1.zip
unzip data_download_all_pt_2.zip

3. 使用 MCP Inspector 测试

npx @modelcontextprotocol/inspector python server.py

这会打开一个浏览器界面,你可以在此调用每个工具、浏览资源并检查协议流量。

4. 连接客户端

服务器使用 stdio 传输。任何 MCP 客户端都可以连接它。下面提供了 Claude Code 和 Claude Desktop 的配置。

如果你使用 uv,请将客户端指向 uv,让它解析环境。如果没有 uv,请将其指向已安装依赖的 python,并且在两种情况下都使用绝对路径。

Claude Code

使用 CLI 添加服务器:

claude mcp add rmi-mcp-uth -- uv --directory /absolute/path/to/rmi-mcp-uth run server.py

或者,不使用 uv:

claude mcp add rmi-mcp-uth -- python /absolute/path/to/server.py

默认情况下,这是一个 local 服务器:仅对你可用,并且仅在你运行命令的目录中可用。使用 --scope user 使其在每个项目中可用,或使用 --scope project 写入一个 .mcp.json 文件,该文件会提交到 git 并与协作者共享:

claude mcp add rmi-mcp-uth --scope project -- uv --directory /absolute/path/to/rmi-mcp-uth run server.py

验证连接:

claude mcp list

你应该看到 rmi-mcp-uth: ... - ✔ Connected。在会话中,/mcp 会列出服务器的工具、资源和提示。提示以斜杠命令(/mcp__rmi-mcp-uth__decarbonization_assessment)的形式出现,资源可以通过 @rmi-mcp-uth:rmi://data-dictionary 附加。

要移除它:claude mcp remove rmi-mcp-uth

Claude Desktop

将此添加到你的 Claude Desktop 配置文件中:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "rmi-mcp-uth": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/rmi-mcp-uth", "run", "server.py"]
    }
  }
}

或者,不使用 uv:

{
  "mcpServers": {
    "rmi-mcp-uth": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"]
    }
  }
}

重新启动 Claude Desktop。消息框中会出现一个锤子图标。点击它即可查看你的工具。

Related MCP server: US ISO Grid MCP

可用内容

工具

工具

说明

list_tables

显示所有表、列和行数

preview_table

显示任意表的示例行

list_utilities

按州查找公用事业

get_emissions_trend

某个公用事业随时间变化的 CO2 排放

get_generation_mix

按 technology_rmi 划分的发电结构

get_climate_alignment

将实际 CO2 与 1.5°C 路径进行比较

query_data

运行只读 SQL(DuckDB 语法)

资源

URI

描述

rmi://data-dictionary

所有数据集、列和单位的摘要

rmi://data-dictionary-full

完整的数据字典 PDF(每个字段的定义、来源和方法)

rmi://methodology

RMI 的方法文档(数据来源、假设和计算)

提示

提示

说明

decarbonization_assessment

对公用事业气候进展的完整分析

state_landscape

某个州内所有公用事业的概览

investment_risk_profile

公用事业对化石燃料资产的财务敞口

示例对话

  • "科罗拉多州哪些公用事业的 CO2 排放量最高?"

  • "显示 Xcel Energy 过去十年的排放趋势"

  • "比较 Duke Energy 和 Southern Company 的发电结构"

  • "哪些公用事业偏离 1.5°C 路径最远?"

  • "美国公用事业发电中可再生能源占多少比例?"

重建数据库

删除 utility_hub.duckdb 并重新启动服务器。它会自动从 CSV 文件重建。

数据许可

RMI Utility Transition Hub 数据采用 CC BY 4.0 许可。

F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that provides access to Northwood Capital Partners' portfolio carbon data, enabling MCP-compatible agents to query emissions, analyze decarbonization gaps, and simulate reduction initiatives through natural language.
    5
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables real-time access to US electricity generation, fuel mix, and demand data through natural language queries.
    15
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables natural language querying of SQL databases and REST APIs through the MCP protocol, grounded in a semantic layer.
    2,887
    1
    AGPL 3.0

View all related MCP servers

Related MCP Connectors

  • Browse and query the EIA API v2 — electricity, petroleum, natural gas, coal, forecasts via MCP.

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

Latest Blog Posts

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/dylanpieper/rmi-mcp-uth'

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