# SolarAnywhere API MCP

> SolarAnywhere API connects your AI agent directly to high-resolution solar irradiance data and site metadata. Use this server to check real-time Global Horizontal Irradiance (GHI) levels, audit Typical Meteorological Year (TMY) patterns for long-term potential, or list all registered sites in your catalog. It turns complex meteorological searches into simple natural language queries for photovoltaic planning.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** solar-irradiance, meteorological-data, energy-intelligence, site-auditing, renewable-energy

## Description

This API gives your agent direct access to high-resolution solar irradiance data and site metadata from SolarAnywhere. You're building out a photovoltaic planning system, and this server handles the complex meteorological searches so you don't have to touch any technical portals. Your AI client uses four specific tools to give you full control over site auditing and energy research.

First, you can confirm connectivity by running `check_api_status`. This simply verifies that the entire solar data pipeline is online and ready for actual queries. Next, when you need current metrics, use `get_solar_irradiance` to pull real-time Global Horizontal Irradiance (GHI) and Direct Normal Irradiance (DNI) readings. You just feed it a pair of coordinates, and it spits out the immediate energy density data for that spot.

For long-term planning, you'll run `get_typical_solar_year`. This tool doesn't give you today's numbers; instead, it calculates Typical Meteorological Year (TMY) solar data. TMY is how experts estimate a site's expected annual performance by modeling historical conditions over an entire year—it's crucial for sizing equipment and forecasting long-term energy potential at any given location.

If you need to audit your existing assets, use `list_solar_sites`. This pulls a complete manifest of every solar asset registered in your account. It gives you all the site metadata associated with those projects, letting you keep an accurate inventory of everything tracked by SolarAnywhere. These functions—`get_solar_irradiance`, `get_typical_solar_year`, and `list_solar_sites`—let your agent work together: it can check operational status, pull real-time metrics for immediate decisions, model decades-long performance using TMY data, and maintain a running list of all project sites. You're not just querying data; you're making complex solar intelligence accessible through simple natural language prompts.

## Tools

### check_api_status
Verifies if the SolarAnywhere service is currently online and operational for data queries.

### get_solar_irradiance
Retrieves real-time Global Horizontal Irradiance (GHI) and Direct Normal Irradiance (DNI) readings using coordinate pairs.

### get_typical_solar_year
Calculates Typical Meteorological Year (TMY) solar data to estimate the long-term energy potential for a specific location.

### list_solar_sites
Returns a complete list of all registered solar sites and their metadata stored in your SolarAnywhere account.

## Prompt Examples

**Prompt:** 
```
Get solar irradiance for latitude 34.0522 and longitude -118.2437 using SolarAnywhere.
```

**Response:** 
```
I've retrieved the real-time solar data! The Global Horizontal Irradiance (GHI) is currently 850 W/m² and the temperature is 25°C. Would you like the full DNI and DHI metadata for these coordinates?
```

**Prompt:** 
```
Show Typical Meteorological Year data for 'Napa Valley'.
```

**Response:** 
```
I've identified the coordinates for Napa Valley and retrieved the TMY data. The long-term solar potential is identified as having a high consistency for energy production. I can provide the monthly average irradiance metadata if you'd like.
```

**Prompt:** 
```
List all registered solar sites in my account.
```

**Response:** 
```
I've retrieved the site catalog from SolarAnywhere! You have 5 registered sites, including 'Solar-West-Alpha' and 'Utility-One'. I can provide the exact coordinate metadata and GHI data for any of these sites.
```

## Capabilities

### Get real-time solar resource metrics
Use `get_solar_irradiance` to fetch current Global Horizontal Irradiance (GHI) and Direct Normal Irradiance (DNI) readings for specific coordinates.

### Model long-term solar potential
Run `get_typical_solar_year` to analyze Typical Meteorological Year (TMY) data, which assesses the expected annual performance of a site.

### Audit registered project sites
Execute `list_solar_sites` to pull an updated manifest of every solar asset currently tracked in your SolarAnywhere account.

### Check service operational status
Run `check_api_status` to confirm that the entire solar data pipeline is online and ready for use.

## Use Cases

### Evaluating an unlisted candidate site
A developer finds a potential site but has never logged it into their system. They ask their agent to 'Check solar potential for these coordinates.' The agent runs `get_solar_irradiance` and immediately delivers the real-time GHI and DNI metrics, allowing an instant go/no-go decision without manual data fetching.

### Auditing a regional fleet
An operations lead needs to report on 50 different installed solar assets. They first use `list_solar_sites` to get the coordinates, then they feed that list into the agent which runs targeted queries using `get_solar_irradiance` across all of them for a single dashboard view.

### Comparing historical vs. current data
A project manager needs to know if a site's current output is normal. They run `get_typical_solar_year` for the long-term baseline, and then use `get_solar_irradiance` to compare that against today's real-time metrics. This gives them immediate variance reporting.

### Debugging a data pipeline failure
The team runs an analysis and gets garbage data. Before starting the full query, they first call `check_api_status`. If the status is 'Operational,' they know the problem lies in their input parameters, not the service itself.

## Benefits

- Get instant, accurate irradiance data. Instead of manually inputting coordinates into a web portal and waiting for the chart to load, simply ask your agent to run `get_solar_irradiance` and get GHI/DNI numbers immediately.
- Model long-term performance with TMY data. You don't have to guess at annual output. Use `get_typical_solar_year` to baseline solar potential for a site, which is critical for investor reports.
- Keep track of your assets in one place. Running `list_solar_sites` gives you an immediate manifest of every registered project location without having to navigate complex account dashboards.
- Verify data integrity first. Before running any major analysis, check the system health by calling `check_api_status`. This confirms the underlying solar data pipeline is functional and reliable.
- Automate cross-checks. You can combine tools—for instance, using `list_solar_sites` to get a list of coordinates, then feeding those into `get_solar_irradiance` for immediate real-time checks across the whole portfolio.

## How It Works

The bottom line is: it lets your AI client act as a real-time solar consultant by running specialized queries against large meteorological datasets.

1. First, subscribe to this server on Vinkius and provide your unique SolarAnywhere API Key.
2. Next, tell your AI client the task (e.g., 'Check GHI for coordinates X, Y').
3. The agent executes the necessary tool call (`get_solar_irradiance`) and returns the structured solar data directly to you.

## Frequently Asked Questions

**How do I check if the SolarAnywhere API is working before querying site data?**
Run `check_api_status`. This tool confirms the entire service pipeline's health. If it returns a 'failed' status, you know immediately that any subsequent query using other tools will fail too.

**Can I use list_solar_sites to find coordinates for an old project?**
Yes. `list_solar_sites` provides the manifest of all registered sites in your account, giving you the asset metadata and coordinate data necessary to run other queries.

**What's the difference between get_solar_irradiance and get_typical_solar_year?**
Irradiance is real-time (current day) data, giving you immediate metrics. TMY uses historical averages to predict long-term energy potential for a site.

**Do I need an API key every time I run get_solar_irradiance?**
The server handles the authentication using the API Key you provide during setup. You just have to include the coordinates in your prompt; the agent manages the key.

**What format does get_solar_irradiance require for latitude and longitude?**
It needs both coordinates in standard decimal degree format. You must provide the precise latitude and longitude pairs to get real-time data for a specific spot.

**How can I use list_solar_sites results with get_solar_irradiance?**
Your agent first calls list_solar_sites to pull the site catalog. Then, it takes the coordinates from that list and feeds them directly into get_solar_irradiance for real-time performance checks.

**Does get_solar_irradiance return temperature or only irradiance data?**
It returns more than just irradiance; it also pulls in relevant meteorological data like ambient temperature. This helps you assess the full operating environment for that location.

**When should I use get_typical_solar_year instead of checking live conditions?**
Use get_typical_solar_year when planning long-term feasibility or needing monthly averages. This provides historical context, whereas get_solar_irradiance gives you what's happening right now.

**How do I find my SolarAnywhere API Key?**
Log in to your [**SolarAnywhere account**](https://api.solaranywhere.com/account), and you will find your API Key in your dashboard or profile settings. Copy and paste it below.

**What irradiance parameters are provided?**
The API provides Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI), and Diffuse Horizontal Irradiance (DHI) metadata.

**Can the agent show historical typical year data?**
Yes. The `get_typical_solar_year` tool retrieves TMY data for any coordinate pair to assist in long-term performance auditing.