Sunrise & Sunset Times

org.sunrise-sunset由 sunrise-sunset.org 發布官方發布者v1.1.0更新於 Oct 24, 2026

Sunrise, sunset, twilight, golden hour and moon times for any place on Earth. Free, no API key.

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

概覽

AI 產生的概覽

遠端 MCP 伺服器,讓助理依任意座標與日期取得日出、日落、晨昏、黃金時刻與月相資料。

可以做什麼
  • 查詢單一地點單日的太陽與月亮資料:日出、日落、太陽正午、晝長、各級晨昏、黃金時刻與藍調時刻、日出日落方位角、正午太陽高度、月出、月落、月相與月面照明度
  • 一次呼叫取得同一地點最多 366 個連續日期的逐日資料,適合行事曆、行程或季節比較
  • 讀取永晝、永夜狀態,不會發生的事件回傳 null 而非編造時間
  • 時間以 ISO 8601 回傳,採用該地點的時區,也可指定 IANA 時區
適用情境
適合助理需要準確日照、晨昏、黃金時刻或月亮資訊來安排攝影、觀星、旅行、戶外活動,或比較不同日期晝長的場合。
執行需求
遠端 Streamable HTTP 端點,無需安裝。不需要 API 金鑰、帳號或註冊。需要能連線至該伺服器的網路。
安裝前請注意
工具為唯讀,但在向使用者呈現資料處必須標註來源 Sunrise-Sunset.org。合理使用免費;高頻迴圈呼叫可能被短暫限流(HTTP 429),多日資料請改用範圍工具。座標與日期會傳送給第三方服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Sunrise & Sunset Times,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "sunrise-sunset-times": {
      "type": "http",
      "url": "https://api.sunrise-sunset.org/mcp"
    }
  }
}

README

[Sunrise-Sunset.org]

Sunrise & Sunset Times MCP server

A free, remote MCP server that gives AI assistants and agents accurate sun and moon times for any place on Earth and any date: sunrise, sunset, twilight, golden hour, blue hour, solar position, moonrise, moonset and moon phase. By Sunrise-Sunset.org.

https://api.sunrise-sunset.org/mcp
  • No API key, no sign up. Add the URL to your client and ask.
  • Remote. Nothing to install or run: Streamable HTTP, no authentication.
  • Local time. Times come back in ISO 8601 in the time zone of the place.
  • Polar day and night handled. Each day says whether it is normal, midnight sun or polar night, and events that do not happen are null, never a made-up time.

Contents

Connect it

Claude (claude.ai, desktop and mobile apps): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Code:

sh
claude mcp add --transport http sunrise-sunset https://api.sunrise-sunset.org/mcp

ChatGPT: Settings → Apps & Connectors → Advanced settings → Developer mode, then add the URL as a custom connector.

Codex:

sh
codex mcp add sunrise-sunset --url https://api.sunrise-sunset.org/mcp

Cursor: add this to ~/.cursor/mcp.json, or to .cursor/mcp.json inside a project (same as mcp.json):

json
{ "mcpServers": { "sunrise-sunset": { "url": "https://api.sunrise-sunset.org/mcp" } } }

VS Code (GitHub Copilot agent mode): add this to .vscode/mcp.json (same as configs/vscode-mcp.json):

json
{ "servers": { "sunrise-sunset": { "type": "http", "url": "https://api.sunrise-sunset.org/mcp" } } }

Any other MCP client works too: it is a standard remote server over Streamable HTTP with no authentication. More details in the setup guide.

Tools

Both tools are read-only and return the same per-day object.

get_sun_times

One place, one day.

ParameterRequiredDescription
latyesLatitude in decimal degrees, -90 to 90.
lngyesLongitude in decimal degrees, -180 to 180.
datenotoday (default), tomorrow or YYYY-MM-DD. Relative dates use the local date of the place.
tznoIANA time zone such as Europe/Madrid. Leave it out and the time zone of the coordinates is used (recommended).

get_sun_times_range

One place, up to 366 consecutive days in a single call: calendars, trips, or comparing seasons without one call per day.

ParameterRequiredDescription
lat, lng, tzAs above.
date_startyesFirst day, YYYY-MM-DD.
date_endyesLast day, inclusive, YYYY-MM-DD.

A range can return fewer days than requested: calendar days that never existed in that time zone are left out (Samoa skipped 30 December 2011 when it moved across the date line). Match each entry by its date field.

What each day contains

sunrise, sunset, solar_noon, day_length (seconds), sun_status (normal, midnight_sun or polar_night), civil, nautical and astronomical twilight, dawn, dusk, first_light, last_light, golden_hour and blue_hour (morning and evening), the sun's azimuth at sunrise and sunset and its altitude at noon, moonrise, moonset, moon_phase and moon_illumination. Both tools declare an outputSchema, so clients and agents know every field and type in advance.

Things to ask

  • "When is golden hour in San Francisco tomorrow?"
  • "How much daylight does Seattle lose during November?"
  • "Give me sunrise and sunset in Tromsø for every day of December 2026."
  • "Which nights this month will be darkest for stargazing in Moab, Utah?"

Example result

get_sun_times for Lisbon on 24 December 2026 (shortened):

json
{  "date": "2026-12-24",  "tzid": "Europe/Lisbon",  "utc_offset": "+00:00",  "lat": 38.72,  "lng": -9.14,  "sunrise": "2026-12-24T07:52:21+00:00",  "sunset": "2026-12-24T17:19:57+00:00",  "solar_noon": "2026-12-24T12:36:08+00:00",  "day_length": 34056,  "sun_status": "normal",  "dawn": "2026-12-24T07:22:27+00:00",  "dusk": "2026-12-24T17:49:51+00:00",  "golden_hour": {    "morning": { "begin": "2026-12-24T07:33:53+00:00", "end": "2026-12-24T08:34:15+00:00" },    "evening": { "begin": "2026-12-24T16:38:04+00:00", "end": "2026-12-24T17:38:25+00:00" }  },  "moonrise": "2026-12-24T17:48:33+00:00",  "moonset": "2026-12-24T08:29:49+00:00",  "moon_phase": "Full Moon",  "moon_illumination": 99.61}

Try it with curl

The server speaks JSON-RPC 2.0 over POST:

sh
curl -s https://api.sunrise-sunset.org/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_sun_times","arguments":{"lat":38.72,"lng":-9.14,"date":"2026-12-24"}}}'

Prefer plain HTTP? The same data is available as a REST API: see sunrise-sunset-org/api.

Limits and attribution

  • Free for reasonable use. For many days at one place, use get_sun_times_range instead of one call per day. A client that calls the server in a tight loop may get HTTP 429 for a short while.
  • Attribution is required wherever people see the data: a link to sunrise-sunset.org, or a mention of Sunrise-Sunset.org when there is no screen. Details in the API repository.
  • Is the server down? Check the status page.

Questions and problems

Open an issue. Include the client you use, what you asked and what came back.

Changes to the server are announced as releases of the API repository: click Watch → Custom → Releases there to get them.

License

The files in this repository (configuration and examples) are under the MIT License. The data the server returns has its own terms: free to use with the attribution described above. See the API documentation.

來源:README.md,提交 816a661

工具

2

get_sun_times

Sunrise & sunset times

Sunrise, sunset, solar noon, day length, civil/nautical/astronomical twilight, dawn/dusk, first/last light, golden hour, blue hour, sunrise/sunset azimuth, solar noon altitude, moonrise/moonset, moon phase and illumination for any coordinates on Earth and any date. Times are ISO 8601 in the local timezone of the location. Polar day/night handled via sun_status (normal | midnight_sun | polar_night); events that do not occur are null.

輸入參數tzlat必填lng必填date

get_sun_times_range

Sunrise & sunset times for a date range

Same per-day data as get_sun_times but for an inclusive date range (up to 366 days) in a single call. Use this instead of repeated get_sun_times calls when you need several consecutive days. The days array may contain fewer entries than the number of dates requested: calendar days that never existed in that timezone (Samoa skipped 30 December 2011 when it crossed the date line) are left out, so read each entry's date field instead of assuming one per requested date.

輸入參數tzlat必填lng必填date_end必填date_start必填

版本歷史

2
  1. v1.1.0最新Oct 16, 2026
  2. v1.0.1Oct 14, 2026

評分

已滿足適用檢查項的 100%

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

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

其他 Sunrise-Sunset 整合