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 集成