time-mcp — Claude Code MCP server: what it does, how to install
Gives LLMs time awareness by exposing tools for current timestamps, timezone conversions, and calendar calculations.
claude mcp add time-mcp -- npx -y time-mcpWhat time-mcp does
LLMs lack an internal clock and tend to guess when asked about current dates. This server equips coding agents with direct time-checking functions. Models can inspect UTC or local time, generate Unix timestamps, and evaluate relative offsets.
The toolset includes convert_time for shifting hours across timezones, days_in_month for calendar math, and get_week_year for ISO week lookups. A local Node.js environment is required beforehand because execution relies on npx.
What it helps with
- fetch the exact current time in UTC or local timezone
- convert specific timestamps between different timezones
- calculate the total number of days in any month
- retrieve the current ISO calendar week number
Example prompts for the agent
- What time is it right now in Tokyo and London?
- How many days are left in this month?
- Check which ISO week of the year we are in.
How to install time-mcp
Platform CLI
claude mcp add time-mcp -- npx -y time-mcpPlatform CLI
codex mcp add time-mcp -- npx -y time-mcpConfig file
{
"mcpServers": {
"time-mcp": {
"command": "npx",
"args": [
"-y",
"time-mcp"
]
}
}
}Config file
{
"servers": {
"time-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"time-mcp"
]
}
}
}Platform CLI
gemini mcp add time-mcp npx -y time-mcpStep 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 time-mcp
How to install time-mcp in Claude Code?
Run claude mcp add time-mcp -- npx -y time-mcp in your terminal.
What does time-mcp do?
It gives AI assistants an accurate real-time clock, preventing incorrect assumptions about dates, relative periods, and timezones.
What tools are included in time-mcp?
The server provides six tools: current_time, relative_time, get_timestamp, days_in_month, convert_time, and get_week_year.