Nasa Power Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.4.2更新於 Oct 29, 2026

Query NASA POWER solar, wind, building, and agroclimatology data.

已驗證Streamable HTTP可網頁執行資料庫位置與生活資料與分析

概覽

AI 產生的概覽

查詢 NASA POWER 歷史太陽能、風能、建築與農業氣候資料,回傳單點時間序列、氣候態、區域網格與多點比較。

可以做什麼
  • 依經緯度取得逐時、逐日或逐月觀測,以及月度和年度氣候態
  • 在限定經緯度範圍內依原生網格擷取單一參數,或比較 2–10 個帶標籤地點
  • 檢索參數代碼字典,並查閱預設組合、社群、涵蓋範圍、缺測值與風面說明
  • 檢視並對大型暫存結果表執行有界唯讀 SQL,可選擇刪除暫存表
適用情境
適合需要某地歷史太陽能或氣象資料的情境,例如再生能源評估、建築與空調研究、農業氣候分析,或比較多個候選地點。適用於帶日期或典型月份的問題,並保留原始單位與資料來源,而非預報或測站實測。
執行需求
可使用託管的遠端端點,或透過 npx(Node.js)或 Docker 在本機執行;不需 NASA 帳號或 API 金鑰。大型結果的 SQL 暫存需要 DuckDB,npm 與 Docker 安裝預設啟用。選用環境變數可調整傳輸方式、驗證模式、日誌與畫布限制。
安裝前請注意
資料為歷史網格觀測,不是測站實測或預報;氣象涵蓋自 1981 年、太陽能自 1984 年、逐時自 2001 年起。暫存表是行程內能力,綁定同一行程且會過期;刪除工具預設關閉,需啟用 NASA_POWER_DATAFRAME_DROP_ENABLED。上游請求逐一限速執行。非本機回環用戶端應在部署邊界設定驗證與 TLS。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Nasa Power Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fnasa-power-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "nasa-power": {
      "type": "http",
      "url": "https://nasa-power.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/nasa-power-mcp-server

Query NASA POWER solar, wind, building, and agroclimatology data via MCP. STDIO or Streamable HTTP.

9 Tools


Overview

NASA POWER historical solar and meteorological observations for renewable energy, sustainable buildings and agroclimatology. Retrieve point time series and climatology, inspect native-grid regions, and compare labeled locations with source units and provenance. No NASA account or API key is required.

Tools

ToolDescription
nasa_power_get_timeseriesHourly, daily or monthly observations at one point
nasa_power_get_climatologyMonthly and annual point climatology, including tilted solar profiles
nasa_power_get_regionOne parameter across a bounded native-grid region
nasa_power_compare_locationsShared observations and seasonal summaries for 2–10 labeled points
nasa_power_search_parametersSearch the complete community/resolution parameter dictionary
nasa_power_list_referencePresets, communities, coverage, missing values, wind surfaces and dataframe guidance
nasa_power_dataframe_describeInspect staged schemas, units, expiry and provenance
nasa_power_dataframe_queryRun bounded read-only SQL against an explicit canvas token
nasa_power_dataframe_dropOpt-in removal of one named staged table

Eight tools are enabled by default; NASA_POWER_DATAFRAME_DROP_ENABLED=true enables the ninth.

Skills

SkillDescription
nasa-power-guideWhich tool answers a typical-month versus a dated question, grid-cell size, data freshness, rate versus total units, degree days, the one-data-call-at-a-time gate, and SQL over staged tables

The skill ships in skills/nasa-power-guide/SKILL.md. Plugin hosts load it from the package, and MCP clients that support the Skills extension read it from the server as skill://nasa-power-guide/SKILL.md.

Capability reference

nasa_power_get_timeseries tool

  • latitude / longitude and temporalResolution: hourly and daily take an inclusive startDate / endDate, monthly takes startYear / endYear. selection is a named preset (default solar_pv) or explicit parameters, at most 15 effective codes hourly and 20 otherwise, corrections included.
  • community (RE, SB, AG; default RE), units (metric, imperial) and timeStandard (LST, UTC). Optional siteElevation adds PSC; paired windElevation (10–300 meters) and windSurface add WSC. Use nasa_power_list_reference topic wind_surfaces for all 17 canonical NASA aliases, including airportgrass, airportice and vegtype_1; vegetation underscores are retained.
  • Returns metadata, parameters, expansions, omittedParameters, summaries, rows, an exact rowCount and dataset (null unless staged). Optional canvas_id reuses a canvas when staging is needed.
  • When the response still overflows the budget without its observations (wide selections with hour-of-day groups), the summaries stage beside the observations as summaryDataset; summaries keeps one entry and summaryCount gives the exact total. Query the table in summaryIndex order; SQL units: null restores an omitted source unit.
  • Codes NASA lists but does not serve at the requested resolution (GDD* at monthly and climatology, *_HR_MAX and *_HR_MIN at monthly) fail with unsupported_parameter before any data request, naming the codes and the resolution that serves them. This holds for every data tool.

nasa_power_get_climatology tool

  • Point coordinates with the same selection and corrections; optional startYear and endYear together, otherwise the source product range. No temporalResolution input.
  • Small profiles remain inline; larger profiles return a bounded preview and complete dataset handle, and oversized summaries stage as summaryDataset with an exact summaryCount, as in nasa_power_get_timeseries. Pass optional canvas_id to reuse an existing workspace. Without DuckDB, an oversized result is refused with canvas_required, which lists calls that each fit inline: parameter groups for a wide selection.
  • Group codes list only their actually returned members in expansions, on every data tool: SI_EF_TILTED_SURFACE and the distinct SI_TILTED_AVG, SI_TILTED_MIN, SI_TILTED_MAX groups (numeric angles and N/S orientation text included), the SI_TRACKER_AVG, SI_TRACKER_MIN, SI_TRACKER_MAX groups, hour-of-day *_HR groups (members *_00 … *_23, monthly and climatology) and *_HR_MAX / *_HR_MIN groups (members *_00_MAX … *_23_MAX, climatology). A group is omitted only when none of its members return.

nasa_power_get_region tool

  • One parameter over ordered latitudeMin / latitudeMax and longitudeMin / longitudeMax, each axis spanning 2–10 degrees (invalid_region otherwise); split antimeridian regions into separate calls. temporalResolution is daily, monthly or climatology; point corrections are unsupported.
  • Daily regions require date bounds and monthly regions require year bounds. Regional climatology accepts no year fields and reports the source's precomputed period; use nasa_power_get_climatology for a custom point year window.
  • Returns cell-tagged rows, cellCount and per-period summaries with equal-weight cell min / mean / max, not area-weighted. Optional canvas_id reuses a canvas for staging.
  • Oversized summary envelopes return summaryDataset with all cross-cell summaries, exact summaryCount and a whole-record inline preview. Query the table in summaryIndex order; SQL units: null restores an omitted source unit. Observations and summaries register together and retain linked provenance.

nasa_power_compare_locations tool

  • 2–10 locations, each with coordinates and a label of 1–120 characters, sharing one selection, corrections and window. temporalResolution defaults to climatology; hourly, daily and monthly also work.
  • Returns successful locations with per-site provenance, location-tagged rows, annual and calendar-season summaries, and failed entries with partial: true when some sites fail; all-site failure returns all_locations_failed. possibleSharedGridCell flags sites that may share a grid cell.
  • Optional sort (parameter, direction asc / desc) orders by a selected numeric parameter with known identical units. Optional canvas_id reuses a canvas for staging.
  • When summaries exceed the response budget, summaryDatasets.buckets and summaryDatasets.locations point to complete SQL tables; inline summaries become whole-record previews and each location includes summaryCount. Query in summaryIndex order; the location-summary table includes locationId. SQL units: null represents an omitted source unit, not a known unit.

nasa_power_search_parameters tool

  • community (default RE), temporalResolution (default daily), optional filter (up to 256 characters), offset and positive integer limit (default 20, effective cap 100 with a notice when capped).
  • Every case-insensitive filter token must match a code, name or definition across the complete dictionary before sorted pagination; a blank filter browses it. entries, total, hasMore and truncated describe the page.
  • Codes NASA lists but does not serve at the selected resolution are left out before counting and paging; a notice names any the filter matched, with the resolution to request instead.

nasa_power_list_reference tool

  • topic: presets (default), communities, coverage, missing_data, wind_surfaces or dataframes.
  • Returns typed entries, guidance, documentationUrls and verifiedOn. Presets are solar_pv, wind_turbine, building_hvac, agroclimatology and water_balance; building_hvac is unavailable hourly. agroclimatology adds T2M_MAX and T2M_MIN outside hourly resolution; monthly/climatology extremes remain source aggregates, without reconstructed daily records or calculated growing degree days. Growing degree days (GDD*) are served at daily resolution only.

nasa_power_dataframe_describe tool

  • Required canvas_id from a producing response; optional table limits inspection to one table.
  • Returns canvas and table expiry, SQL columns with source units, and original scientific provenance. Only tables in the supplied canvas are visible.

nasa_power_dataframe_query tool

  • Required canvas_id and one read-only SELECT in sql (up to 16,384 characters); positive integer rowLimit defaults to 100 and is capped at 1,000, with an effective-cap notice for larger requests. Files, writes and system catalogs are denied.
  • Returns columns, rows, rowCount, shownCount, truncated and countSemantics (exact or materialized_prefix). SQL has a 10-second deadline; the structured and rendered outputs each must fit 40,000 characters.
  • SQL mistakes retain bounded identifiers or conversion values with recovery guidance. Operational failures use generic messages; engine paths and native causes are excluded.

nasa_power_dataframe_drop tool

  • Required canvas_id and exact table; enabled only by NASA_POWER_DATAFRAME_DROP_ENABLED=true.
  • Returns dropped: false for an absent table while other tables keep the canvas alive. Removing the final table also retires its canvas and frees its slot; subsequent describe, query or drop calls return canvas_not_found.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

POWER-specific:

  • Historical gridded observations, rather than site measurements or forecasts. Meteorological coverage starts in 1981, solar in 1984 and hourly in 2001; source configuration and publication latency further constrain availability.
  • One active upstream request, starts at least two seconds apart, bounded retries and a 55-second overall call deadline. NASA publishes no numeric request allowance. References cache for 24 hours and observations for 10 minutes.
  • Source fill values become null; zero remains a measurement. Monthly annual keys and climatology ANN remain distinct from monthly observations. LST labels have no UTC offset.
  • T_ZONES and TM_ZONES retain numeric climate-zone codes with valueKind: categorical, including in SQL column metadata. They have no arithmetic summaries or comparison sort metrics; explicit numeric sorting by either is rejected.

Agent-friendly output:

  • Scientific provenance — source API version, dataset identifiers, endpoint and access time accompany results; preserve returned units and attribute NASA POWER.
  • Explicit gaps — omittedParameters distinguishes an absent series from fill values; arithmetic observation means and calendar-season buckets are not climate normals, annual yields or water balances.
  • Complete datasets — inline outputs each fit 40,000 characters. Larger datasets stage all rows with a preview of at most 20 rows and a dataset handle; unsupported requests fail with narrowing guidance, and oversized ones without DuckDB fail with canvas_required and a list of calls that each fit inline, instead of returning a capped source prefix.

Staging requires DuckDB and supports at most 250,000 rows, 64 parameter columns and 32 MiB of serialized rows per dataset. Canvases are process-local capabilities: pass the returned token explicitly and route later calls to the same process. Tables expire after 30 minutes with eight tables per canvas. Defaults are one idle hour and six absolute hours per canvas, four canvases per tenant, eight per process, and 256 MiB engine memory per canvas. Operators can size canvas capacity, memory and lifetime below; engine memory does not bound total RSS or temporary disk.

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http nasa-power-mcp-server https://nasa-power.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add nasa-power-mcp-server -- npx -y @cyanheads/nasa-power-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "nasa-power-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/nasa-power-mcp-server"]    }  }}

npm and Docker installs stage large results in DuckDB for SQL by default; set CANVAS_PROVIDER_TYPE=none to keep every result inline. The Claude Desktop bundle is inline-only: send the calls an oversized request's canvas_required refusal lists, or use npm or Docker for analytics. No NASA account or API key is required. For Docker or a source build, see Running the server.

Configuration

VariableDescriptionDefault
NASA_POWER_DATAFRAME_DROP_ENABLEDExpose explicit staged-table removal.false
CANVAS_PROVIDER_TYPEduckdb stages large results for SQL on npm/Docker; none keeps results inline. MCPB fixes none.duckdb
CANVAS_DEFAULT_MEMORY_LIMIT_MBPer-canvas engine memory, integer ≥64 MiB; not total RSS or temporary disk.256
CANVAS_MAX_CANVASES_PER_TENANTPositive tenant canvas cap; auth-none callers share one tenant.4
NASA_POWER_MAX_CANVASES_PER_PROCESSPositive process canvas cap, including pending and failed cleanup reservations.8
CANVAS_TTL_MSPositive sliding canvas lifetime in milliseconds.3600000
CANVAS_ABSOLUTE_CAP_MSAbsolute canvas lifetime in milliseconds, at least the sliding TTL.21600000
MCP_TRANSPORT_TYPEstdio or http.stdio
MCP_HTTP_HOST / MCP_HTTP_PORTHTTP bind address and port.127.0.0.1 / 3010
MCP_AUTH_MODEnone, jwt or oauth.none
MCP_LOG_LEVELMinimum log level.info
OTEL_ENABLEDEnable OpenTelemetry.false

Unset, blank and whole-value placeholder settings retain these defaults. Invalid sizing fails startup. Byte budgets, table limits and producer concurrency remain fixed independently of operator canvas sizing. See .env.example for optional transport, authentication, storage, logging and telemetry settings.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/nasa-power-mcp-server.gitcd nasa-power-mcp-server && bun installcp .env.example .env   # optional: transport, logging or canvas settings
  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lints, formats, type-checks, and morebun run test      # Runs the test suite

Docker

sh
docker run --rm -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/nasa-power-mcp-server:latest

The image defaults to HTTP on port 3010 in stateless session mode and logs to /var/log/nasa-power-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/nasa-power-mcp-server:latest"]. To build locally, docker build -t nasa-power-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them. For a client outside loopback, configure authentication and TLS at the deployment boundary.

Project structure

PathPurpose
src/index.tsNine tool registrations, the published skill tree, bounded canvas setup and service shutdown
skillsThe nasa-power-guide agent skill, published to plugin hosts and served over MCP
src/configWorkload limits and server-specific environment parsing
src/mcp-server/tools/definitionsTool contracts and comparison orchestration
src/services/powerPaced NASA client, normalization, presets and scientific summaries
src/services/canvasExplicit-token staging, SQL, provenance and admission limits
scriptsBuild, validation, packaging and release tooling
testsOffline contracts and native integration tests

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging and ctx.signal for cancellation
  • Register new tools in the createApp() array in src/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields, and preserve source units and annual-period distinctions
  • content[] and structuredContent carry the same complete data

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

來源:README.md,提交 fa99237

工具

8

nasa_power_get_timeseries

Get NASA POWER timeseries

Retrieve complete hourly, daily or monthly observations at latitude/longitude. Hourly and daily require startDate/endDate; monthly requires startYear/endYear. Use nasa_power_search_parameters for codes and nasa_power_list_reference for presets. Large results return a full-table canvas handle and preview; oversized summaries stage as summaryDataset with exact summaryCount, queried in summaryIndex order.

無需輸入參數。

nasa_power_get_climatology

Get NASA POWER climatology

Retrieve complete monthly and annual climatology at latitude/longitude. Optionally supply both startYear and endYear; omitted years use the source product range. Use nasa_power_list_reference for presets and tilted solar aliases. Small profiles remain inline; larger profiles return a complete table handle and bounded preview, preserving orientation text. Oversized summaries stage as summaryDataset with exact summaryCount, queried in summaryIndex order. Supply canvas_id to reuse a returned workspace.

輸入參數unitsendYearlatitude必填canvas_idcommunitylongitude必填selectionstartYearwindSurfacetimeStandardsiteElevationwindElevation

nasa_power_get_region

Get NASA POWER region

Retrieve one parameter over ordered latitude/longitude bounds spanning 2–10 degrees per axis, at daily, monthly or climatology resolution. Regional climatology uses the precomputed source period and accepts no year fields; use nasa_power_get_climatology for custom years at a point. Split antimeridian regions into separate calls. Returns cell identities and separate per-period equal-weight cell statistics, not area-weighted estimates. Oversized observations and summaries stage completely with previews, exact counts and SQL handles; query summaryDataset in summaryIndex order.

無需輸入參數。

nasa_power_compare_locations

Compare NASA POWER locations

Compare 2–10 labeled coordinates with a shared parameter selection and window; climatology is the default resolution. Duplicate labels retain separate input-position identities. Returns per-site provenance and valid-only annual/seasonal summaries; operational site failures preserve successes. Optional numeric sort uses observation means, monthly annual records or climatology ANN, with nulls last and stable ties; differing or unknown units cannot sort. Oversized observations and summaries stage completely; summaryDatasets handles and summaryIndex preserve complete ordered summary arrays.

無需輸入參數。

nasa_power_search_parameters

Search NASA POWER parameters

Find parameter codes supported by a community and temporalResolution. Every whitespace-separated filter token must match code, name or definition, ignoring case. Filtering covers the complete dictionary before sorted pagination. Codes NASA lists but does not serve at that resolution are left out, and a notice names any the filter matched. Blank filter browses all codes; pass returned codes to a producing tool.

輸入參數limitfilteroffsetcommunitytemporalResolution

nasa_power_list_reference

List NASA POWER reference

Explain exact presets, communities and units, source coverage, missing values, wind corrections or current dataframe availability. Choose topic presets before a producing call, or coverage when revising a date window. Reference entries include public documentation and verification dates.

輸入參數topic

nasa_power_dataframe_describe

Describe staged POWER tables

Inspect table schemas, physical units and original scientific provenance within a canvas_id returned by a producing POWER tool. Tokens are process-local capabilities; only the supplied canvas is inspected.

輸入參數tablecanvas_id必填

nasa_power_dataframe_query

Query staged POWER observations

Run one read-only SELECT over tables in an explicitly supplied canvas_id. Inspect names and units with nasa_power_dataframe_describe. External files, imports, writes and system catalogs are refused. Returns at most 1,000 rows and 40,000 JSON characters; truncated rowCount counts only materialized rows.

輸入參數sql必填rowLimitcanvas_id必填

版本歷史

4
  1. v0.4.2最新Oct 29, 2026
  2. v0.3.0Oct 25, 2026
  3. v0.2.0Oct 20, 2026
  4. v0.1.1Oct 20, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分