Solar MCP
An MCP server that enables AI assistants to look up solar permitting authorities, estimate solar production via PVWatts, and retrieve irradiance data. It streamlines the creation of solar-aware workflows by integrating industry-standard APIs like NREL.
README
Solar MCP
A community-sponsored open-source MCP server that wraps solar industry APIs as tools for AI assistants. Built with FastMCP and hosted as a public endpoint at api.ontologic.co/solar-mcp.
Solar MCP gives AI assistants the ability to look up permitting authorities, estimate solar production, and retrieve solar resource data — making it easy to build solar-aware AI workflows.
Available Tools
lookup_ahj
Look up the Authority Having Jurisdiction (AHJ) for a solar installation site.
| Parameter | Type | Required | Description |
|---|---|---|---|
address |
string | One of address or lat/lon | Street address |
lat |
float | One of address or lat/lon | Latitude |
lon |
float | One of address or lat/lon | Longitude |
Returns: ahj_name, ahj_id, building_code, electrical_code, fire_code, permit_authority, inspection_body, contact_name, contact_email, contact_phone, website
lookup_ahj_requirements
Look up detailed permitting requirements for a specific AHJ.
| Parameter | Type | Required | Description |
|---|---|---|---|
ahj_id |
string | Yes | AHJ ID from lookup_ahj |
Returns: nec_version, ibc_version, irc_version, special_requirements (list), permit_process_notes, online_submission (bool), typical_turnaround_days
lookup_pvwatts
Get a PVWatts v8 solar production estimate.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
address |
string | One of address or lat/lon | — | Street address |
lat |
float | One of address or lat/lon | — | Latitude |
lon |
float | One of address or lat/lon | — | Longitude |
system_capacity_kw |
float | Yes | — | System size in kW |
tilt |
float | No | 20 | Panel tilt angle |
azimuth |
float | No | 180 | Panel azimuth (180 = south) |
array_type |
int | No | 1 | 0=fixed ground, 1=fixed open rack, 2=1-axis, 3=1-axis backtrack, 4=2-axis |
module_type |
int | No | 0 | 0=standard, 1=premium, 2=thin film |
losses |
float | No | 14 | System losses (%) |
Returns: ac_annual_kwh, ac_monthly_kwh (12 values), solrad_annual, capacity_factor, station_info
lookup_solar_resource
Get solar resource data (irradiance) for a location.
| Parameter | Type | Required | Description |
|---|---|---|---|
address |
string | One of address or lat/lon | Street address |
lat |
float | One of address or lat/lon | Latitude |
lon |
float | One of address or lat/lon | Longitude |
Returns: avg_dni, avg_ghi, avg_lat_tilt, nearest_station_name, station_distance_miles
Connect in Claude Desktop
Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"solar-mcp": {
"url": "https://api.ontologic.co/solar-mcp/mcp"
}
}
}
Or to run locally:
{
"mcpServers": {
"solar-mcp": {
"url": "http://localhost:8000/solar-mcp/mcp"
}
}
}
Run Locally
With Docker
docker build -t solar-mcp .
docker run -p 8000:8000 \
-e NREL_API_KEY=your_key_here \
-e SUNSPEC_API_TOKEN=your_token_here \
solar-mcp
Without Docker
pip install -e ".[dev]"
cp .env.example .env
# Edit .env with your API keys
python server.py
Environment Variables
| Variable | Required | Description |
|---|---|---|
NREL_API_KEY |
Yes | NREL API key (get one free) |
SUNSPEC_API_TOKEN |
No | SunSpec AHJ Registry token (mock data used until available) |
PORT |
No | Server port (default: 8000) |
Running Tests
pip install -e ".[dev]"
pytest tests/ -v
Attribution
- NREL — PVWatts v8 API and Solar Resource Data API. This tool uses the NREL Developer Network API but is not endorsed or certified by NREL.
- SunSpec Alliance — AHJ Registry API. AHJ data is currently mocked based on publicly available information; real API integration is pending token access.
Contributing
Contributions are welcome! To add a new tool:
- Add Pydantic schemas in
models/schemas.py - Add a client in
clients/(keep API interaction separate from tool logic) - Add the tool function in
tools/ - Register the tool in
server.py - Add tests in
tests/ - Update this README
Please open an issue first to discuss new tools or significant changes.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。