agenttime — MCP server for Claude Code: time, sunrise, moon
agenttime — an MCP server with authoritative time across 597 timezones, sunrise and sunset by coordinates (US Naval Observatory), and moon phases. Essential for scheduling, astronomy, and agricultural agents.
no license 1,319 installs updated 2026-05-29
claude mcp add --transport http agenttime https://agenttime--heavysword1.run.toolsWhat agenttime does
agenttime exposes three tools to agents: get_current_time retrieves the current time in any timezone with UTC offset, DST status, and week number; get_astronomy takes coordinates and returns sunrise, sunset, twilight times, and lunar rise and set using US Naval Observatory data; get_moon_phases shows upcoming lunar phases and current illumination percentage.
The server runs over HTTPS with no authentication required—just add it to your IDE config. Compatible with Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Cline, Zed, and Gemini CLI.
What it helps with
- get sunrise and sunset times for a specific location
- retrieve the current time in any timezone
- check the moon phase and illumination percentage
- calculate civil and nautical twilight times
- verify daylight saving time status for a region
Example prompts for the agent
- Find the optimal planting time based on sunrise at coordinates 40.7128, -74.0060
- What is the current time in New Delhi and Sydney?
- Show me the moon phase calendar for the next four weeks
How to install agenttime
Platform CLI: remote server
claude mcp add --transport http agenttime https://agenttime--heavysword1.run.toolsPlatform CLI: remote server
codex mcp add agenttime --url https://agenttime--heavysword1.run.toolsConfig file
{
"mcpServers": {
"agenttime": {
"url": "https://agenttime--heavysword1.run.tools"
}
}
}Config file
{
"servers": {
"agenttime": {
"type": "http",
"url": "https://agenttime--heavysword1.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http agenttime https://agenttime--heavysword1.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agenttime
How do I install agenttime in Claude Code?
Run claude mcp add --transport http agenttime https://agenttime--heavysword1.run.tools.
What does agenttime do?
It gives agents access to the current time in any of 597 timezones, calculates sunrise and sunset by geographic coordinates using US Naval Observatory data, and provides lunar phases and illumination percentages.
Which IDEs does agenttime support?
It works with Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Cline, Zed, and Gemini CLI. Each platform has its own configuration method, but the server endpoint remains https://agenttime--heavysword1.run.tools.