loading…
Search for a command to run...
loading…
Enables solar energy potential assessment by converting parcel centroid and acreage into annual/monthly generation estimates using the NREL PVWatts v8 API, suit
Enables solar energy potential assessment by converting parcel centroid and acreage into annual/monthly generation estimates using the NREL PVWatts v8 API, suitable for revenue modeling and infographic headlines.
MCP server wrapping NREL PVWatts v8 for the Watts for Water project. Turns a parcel centroid + acreage into annual / monthly generation estimates suitable for revenue modeling and infographic headline numbers.
See spec.md for the design doc.
| Tool | Purpose |
|---|---|
pvwatts_run |
Faithful wrapper around PVWatts v8. All parameters exposed; project defaults applied when omitted. |
solar_potential_for_acres |
Convenience: acreage + centroid → MW DC → annual MWh, capacity factor, indicative revenue. tracker=true flips to 1-axis backtracking. |
npm install
Get a free NREL API key at developer.nrel.gov/signup, then store it as a Worker secret:
npx wrangler secret put NREL_API_KEY
For local development with wrangler dev, put the same key in a .dev.vars file at the repo root (gitignored):
NREL_API_KEY=your-key-here
npm run dev
Worker listens at http://localhost:8787. Test endpoints:
GET / — plain-text usage hintPOST /mcp — streamable HTTP transport (recommended)GET /sse — legacy SSE transportInspect with the MCP Inspector:
npx @modelcontextprotocol/inspector@latest
# Then open the URL it prints and connect to http://localhost:8787/mcp
npx wrangler deploy
Then connect from Claude Desktop via mcp-remote:
{
"mcpServers": {
"pvwatts": {
"command": "npx",
"args": ["mcp-remote", "https://pvwatts-mcp.<your-account>.workers.dev/mcp"]
}
}
}
The MCP is ready to ship when this call returns sane numbers:
// Tool: solar_potential_for_acres
{
"lat": 41.72,
"lon": -111.83, // Cache Valley, Utah
"acres": 80,
"tracker": false
}
Expected (per spec.md § Acceptance test, within ~10%):
system_capacity_mw_dc: 10.0annual.generation_mwh: 21,000 – 24,000annual.capacity_factor_pct: 24 – 26annual.indicative_revenue_usd: ~$735K – $840K at $35/MWhRe-running with tracker=true should bump annual generation to 25,000–28,000 MWh and capacity factor to ~28–30%, validating the array-type plumbing.
src/
index.ts Worker entrypoint — routes /mcp and /sse
mcp.ts McpAgent subclass; tool registrations
pvwatts.ts NREL adapter — fetch, retry, cache, error mapping
defaults.ts Utah utility-scale assumption set + caveat strings
Выполни в терминале:
claude mcp add pvwatts-mcp -- npx PRs, issues, code search, CI status
автор: GitHubDatabase, auth and storage
автор: SupabaseSecure file operations with configurable access controls.
Reference / test server with prompts, resources, and tools.
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development