Sunrise & Sunset Times

org.sunrise-sunsetPublished by sunrise-sunset.orgOfficial publisherv1.1.0Updated Oct 24, 2026

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

VerifiedStreamable HTTPWeb executableLocation & LifestyleData & Analytics

Overview

AI-generated overview

Remote MCP server that gives an assistant sun and moon times — sunrise, sunset, twilight, golden hour, moon phase — for any coordinates and date.

What you can do
  • Get sun and moon data for one place and day: sunrise, sunset, solar noon, day length, twilight phases, golden and blue hour, sun azimuth and noon altitude, moonrise, moonset, moon phase and illumination
  • Fetch the same per-day data for up to 366 consecutive days in one call, for calendars, trips or season comparisons
  • Read polar-day and polar-night status, with events that do not occur returned as null rather than invented times
  • Receive times in ISO 8601 in the time zone of the place, or in a specified IANA time zone
When to use it
Useful when an assistant needs accurate daylight, twilight, golden hour or moon information for planning photography, stargazing, travel, outdoor activities or daylight-length comparisons across dates.
Requirements
A remote Streamable HTTP endpoint; nothing to install. No API key, account or sign-up. Network access to the server is required.
Before you install
Read-only tools, but attribution to Sunrise-Sunset.org is required wherever people see the data. Free for reasonable use; tight repeated calls may be rate-limited with HTTP 429, so use the range tool for many days. Coordinates and dates are sent to a third-party service.

Installation

In SourceWeft

  1. Open Sunrise & Sunset Times in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/org.sunrise-sunset%2Fsun-times/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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.

Source: README.md at commit 816a661

Tools

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.

Parameterstzlatrequiredlngrequireddate

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.

Parameterstzlatrequiredlngrequireddate_endrequireddate_startrequired

Version history

2
  1. v1.1.0LatestOct 16, 2026
  2. v1.0.1Oct 14, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Sunrise-Sunset integrations