solarnetwork
solarnetwork-mcp
一个 MCP 服务器,将 SolarNetwork 太阳能遥测数据转化为 AI 代理可以调用的工具。
无需凭据。 它运行在 SolarNetwork 的公共端点上,那里有约 52 个实时太阳能站点发布真实的发电量、辐照度和天气数据——其中几个每分钟更新,并拥有六年的历史数据。
它能做什么
读取太阳能遥测数据
无需凭据即可发现公共节点,可按时区或活跃度过滤
对站点上的每个数据流进行分类:站点电表、逆变器、辐照度、天气、ML 异常
以五分钟到一年任意聚合粒度查询时间序列
从电表读数获取真实的累计能量,而非平均功率
通过时间戳而非数值检查数据流是否仍然活跃
发现设备故障,并给出日期
检测逆变器停机,并精确锁定开始和结束日期
区分死设备与仍在发电但未上报功率的设备
捕捉设备静默而兄弟设备仍在上报的情况
标记电表计数器重置,这会静默破坏跨越重置的所有能量总计
发现从未存在过的硬件的注册表条目
估算每个故障造成的能量损失,按各设备自身容量从兄弟设备输出缩放
不产生误报
检测是相对同侪的,因此云层覆盖不会被视为故障
在存在日射强度计的情况下,辐照度被用作物理天气控制
窗口打开时已在运行的故障被标记为下限,而非虚构的开始日期
无法评估的站点被报告为 未评估,绝不会报告为健康
编写人们可以采取行动的报告
优先排序的工作订单,包含通俗易懂的原因、证据、编号步骤、工具和验收标准
可打印的 PDF 现场包,带复选框和备注页
Markdown 格式便于粘贴到工单中,或 JSON 格式便于后处理
全程纯 ASCII,确保在 PDF 或工单系统中不会出现乱码
它不能做什么
在依赖它之前值得了解:
少于两个逆变器的站点无法评估。 同侪比较需要同侪。工具会明确说明,而不是报告干净的结果。
没有铭牌额定值。 公共节点不暴露这些,因此损失数字是同侪缩放的估计值,而非保修计算。
故障检测基于每日桶。 静默六小时的设备不可见。
数据流分类依赖于路径约定。 将数据流命名为
Main或SMAInverter1的站点将返回未分类。
它实际做什么
没有它,回答 "这个站点有什么问题吗?" 需要知道节点 ID、/datum/list 端点、存在 aggregation=Day、watts 和 wattHours 是不同的查询,然后阅读 JSON。
有了它,你可以问:
"节点 1000 有什么问题吗?如果输出下降,告诉我是因为天气还是设备。"
代理会发现站点的数据流,选择日期范围,运行聚合,将每个逆变器与其兄弟设备进行比较,并用英语回答。一句话输入,一份诊断输出。
服务器处理语言模型不擅长的部分——请求签名、分页、单位语义、知道九个数据流中哪一个是天气传感器。代理处理它擅长的部分——决定问什么和解释答案。
60 秒内看到它工作
npm install && npm run build && npm run smoke这通过真实的 MCP 协议驱动所有工具,针对实时数据。无需代理、无需 API 密钥、无需配置。如果它为节点 1000 打印了发现结果,你就没问题了。
把它交给你的代理
将下面的整个块复制到 Claude Code、Cursor 或任何支持 MCP 的代理中。它会安装服务器、自我配置、证明安装成功,然后针对实时公共太阳能站点运行每个能力的引导演示。
Set up and demo the solarnetwork MCP server for me.
1. INSTALL
git clone https://github.com/gopisrikrishna/solarnetwork-mcp.git
cd solarnetwork-mcp
npm install
npm run build
2. VERIFY THE INSTALL
Run: npm run verify
This runs 28 assertions against live public solar data. No credentials needed.
Tell me how many passed. If any fail, show me which and stop.
3. CONNECT IT
Register the server with yourself over stdio:
command: node
args: ./dist/index.js (run from the solarnetwork-mcp directory)
The repo ships a .mcp.json that already does this. Restart/reconnect if your
client needs it, then confirm you can see 10 tools and list their names.
4. DEMO IT
Work through these against real public nodes and show me what you find.
Explain your reasoning at each step, do not just dump JSON.
a) DISCOVERY
Which public nodes are live in US timezones? Then: what does node 1000
measure, and how far back does its data go?
b) ENERGY
How much did node 1000 generate in July 2026? Use the right tool for a
billing-shaped question and tell me why you chose it.
c) FAULT DETECTION <- the interesting one
Run an asset review on node 1000 for 2026-01-01 to 2026-09-01.
Tell me what broke, exactly when it started and ended, and what it cost.
There is a real 79-day inverter outage in there, and a second fault where
a device reports 0 watts while still generating. Explain the difference
between those two failure modes and why it matters.
d) NOT BEING FOOLED
Run an asset review on node 949 for July 2026. It will find nothing.
Explain why "no faults found" does NOT mean the site is healthy here.
e) DATA INTEGRITY
Run an asset review on node 781 for 2026-01-01 to 2026-09-01.
Its site meter counter reset mid-year. Show me how the tool handles it and
what would have gone wrong without that handling.
f) CROSS-CHECK
Node 392 publishes the platform's own ML anomaly streams. Compare what
get_anomalies says against what the asset review found. Do they agree?
g) REPORT
Generate a PDF service report for node 1000 over the same window, written
for an on-site technician. Save it and tell me the path, how many pages,
and summarise the priority 1 jobs.
5. WRAP UP
Tell me in plain language: what is wrong with node 1000, how much energy has
been lost, and what you would send a technician to do first.自己验证
因为它运行在公共数据上,你不必相信它的任何结论。每个发现都可以从你自己的机器上独立复现:
npm install && npm run build && npm run verify针对实时公共节点上的固定历史窗口进行 28 项断言。无需凭据。其中包括:
检查 | 节点 | 期望 |
故障时间线 | 1000 | 逆变器 1 停机,恰好 2026-05-17 至 2026-08-03,79 天 |
遥测故障 | 1000 | 逆变器 4 自 2026-03-25 起报告 0 W,但仍发电 |
分页 | 1000 | 一年超过 SolarQuery 的 1000 行页面上限;每一行都被获取 |
电表完整性 | 781 | 计数器重置被标记,站点能量从未报告为负 |
电表完整性 | 900 | 计数器重置精确定位到 2026-06-03 |
覆盖诚实 | 949 | 没有逆变器的节点报告 "未评估",绝不报告 "健康" |
站点电表选择 | 464 | 真实电表胜过遗留的 |
报告输出 | 1000 | 工作订单、验收标准、仅纯 ASCII |
失败意味着服务器回归,或 SolarNetwork 重述了历史。每个断言都会打印期望值与实际值,因此两者很容易区分。
将其加载到你的代理中
每个客户端都需要相同的三个事实:运行 node,传递 dist/index.js,通过 stdio 通信。只有文件位置不同。
使用你机器上 dist/index.js 的绝对路径。正斜杠在 Windows 上也有效。
这里提交的 .mcp.json 使用相对路径,这样任何克隆仓库的人都能获得一个无需编辑即可工作的服务器。这仅适用于从项目根目录启动服务器的客户端,Claude Code 就是这样;其他客户端可能需要绝对形式。
Claude Code
已配置——.mcp.json 在仓库根目录,因此在此目录中启动的会话会自动拾取它。只需编辑路径:
{
"mcpServers": {
"solarnetwork": {
"command": "node",
"args": ["/absolute/path/to/solarnetwork-mcp/dist/index.js"]
}
}
}或从任何位置全局注册:
claude mcp add solarnetwork -- node /absolute/path/to/solarnetwork-mcp/dist/index.jsClaude Desktop
编辑 claude_desktop_config.json:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"solarnetwork": {
"command": "node",
"args": ["/absolute/path/to/solarnetwork-mcp/dist/index.js"]
}
}
}重启应用。消息框中会出现一个工具图标。
Cursor
项目中的 .cursor/mcp.json,或每个项目的 ~/.cursor/mcp.json。与上述相同的 mcpServers 块。
Windsurf
~/.codeium/windsurf/mcp_config.json。相同的 mcpServers 块。
VS Code(Copilot 代理模式)
.vscode/mcp.json — 注意键是 servers,而不是 mcpServers:
{
"servers": {
"solarnetwork": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/solarnetwork-mcp/dist/index.js"]
}
}
}Zed
在 settings.json 中,位于 context_servers 下:
{
"context_servers": {
"solarnetwork": {
"command": { "path": "node", "args": ["/absolute/path/to/dist/index.js"] }
}
}
}其他任何东西
任何 MCP 客户端都可以通过 stdio 启动它:
node /absolute/path/to/solarnetwork-mcp/dist/index.js要从代码驱动它,scripts/smoke.mjs 是一个使用官方 TypeScript SDK 的完整工作示例。
检查它是否已加载
问你的代理:"你有什么太阳能工具?" 你应该看到十个。如果没有,常见原因是相对路径、缺少 npm run build,或客户端未重启。
工具
发现
工具 | 回答 |
| "我可以查看哪些节点?" |
| "这个节点测量什么?" |
| "现在正在发生什么?" |
数据
工具 | 回答 |
| "显示这个时期的输出" |
| "它实际生成了多少千瓦时?" |
分析
工具 | 回答 |
| "什么坏了,什么时候开始的,成本是多少?" |
| "现在有什么问题吗,天气还是设备?" |
| "我的哪些站点需要优先关注?" |
| "平台自己的 ML 检测器怎么说?" |
报告
工具 | 回答 |
| "给我一份可以交给技术员的工作订单" |
可以问它的问题
从这里开始——这些是真实的、活跃的节点:
方向
哪些公共 SolarNetwork 节点在美国时区活跃?
节点 1000 测量什么,它的数据能回溯多远?
现在
节点 892 现在正在生成什么,那里的天气如何?
节点 892 带有天气传感器和日射强度计,因此代理除了输出外还能获得温度、云量和辐照度。
诊断 — 有趣的那些
节点 1000 有什么问题吗?
节点 892 列出了六个逆变器,但我看不到发电。发生了什么?
车队
按上周输出对节点 880、884、953、964、976、987 和 1000 进行排名。我应该先看哪个?
多步骤,其中链式调用展示了能力
找到一个至少有四个逆变器和辐照度数据的活跃美国节点,然后诊断它最近两周的情况。
你得到什么
来自 diagnose_site 对节点 1000 的真实输出:
[high] reporting-gap /0145/S1/G1/GEN/101, /102, /103
Registered on this node but returned no data for the window. That is a
reporting or comms outage rather than a performance problem, so the
device may well be generating.
[low] inconsistent-instrumentation /0145/S1/G1/INV/4
Reports 0 W, but its `wh` field is non-zero (peak 16508), so it is moving
energy. This device populates energy fields only, unlike its peers, so
power-based comparison would wrongly read it as dead.第二个发现是整个项目的重点。INV/4 读取 0 W,而其三个兄弟设备产生 400–700 W,这看起来完全像一个死逆变器——这个工具的早期版本也这么说过。它并没有死:它的电表那个月累计了 826 kWh。一个站点的逆变器使用不同的报告约定。仅基于 watts 的健康检查会每晚就一个工作正常的逆变器呼叫某人。
你自己的节点
设置两个环境变量,服务器就会从公共 /pub 端点切换到经过身份验证的 /sec 端点。工具表面不变:
SN_TOKEN_ID=... SN_TOKEN_SECRET=... node dist/index.js认证是 SolarNetwork 的 SNWS2 方案——对规范化请求进行 HMAC-SHA256,使用日期范围的密钥。它已实现但未测试;我没有令牌对来验证。
工作原理
三个文件,约 900 行:
src/solarnetwork.ts— API 客户端、分页、请求签名src/analysis.ts— 源 ID 解析、按站点诊断src/index.ts— 十个工具定义
工具描述是真正的接口。只有当描述说明何时使用每个工具时,代理才能正确链式调用 list_sources → query_datum。措辞的正确性比任何数据处理都更重要。
限制
公共节点上的节点元数据为空,因此没有铭牌容量,也就没有容量归一化比较。
compare_fleet对原始输出进行排名并说明这一点——大站点会排在小而健康的站点前面。list_public_nodes读取的是时间点扫描(data/nodes.json),而非实时列表。在依赖节点之前,调用list_sources确认。无缓存。重复的代理调用会重新命中 API。
无单元测试。
scripts/smoke.mjs是实时探针,不是测试套件。SolarQuery 对超过约 7 天的范围会静默将细粒度聚合强制转换为小时级。
query_datum原样传递你的聚合,因此长范围返回的数据比请求的更粗。
更多细节:USAGE.md 提供工作示例和努力比较,DATA.md 提供公共与凭据门控内容的完整清单。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Data-center, grid, fiber & gas infrastructure intelligence for AI agents — query and cite.
Field-service dispatch & technician scheduling for AI agents — sub-3-second cascade rescheduling.
45 AI data tools for agents — crypto, DeFi risk, audits, equities, energy, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/gopisrikrishna/solarnetwork-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server