Skip to content

dmriding/mcp-local-time

mcp-local-time

A standalone MCP server that gives AI assistants access to the host system's local time. One tool, one file, one binary.

Why? LLMs don't know what time it is. Web searches are slow and unreliable for something the OS already knows. This server exposes the system clock over MCP so any compatible client (Claude Code, Claude Desktop, etc.) can get the exact local time instantly.

Tool

get_local_time

Returns the current local date, time, timezone, and UTC offset. No parameters.

{
  "iso": "2026-03-10T23:13:42-05:00",
  "time": "23:13:42",
  "date": "2026-03-10",
  "day": "Tuesday",
  "timezone": "EST",
  "utc_offset": "-05:00",
  "unix_epoch": 1773357222
}

Download

Pre-built binaries for Windows, macOS, and Linux are available on the Releases page.

Unsigned binaries: These releases are not code-signed, so your OS will warn you.

  • Windows: SmartScreen will show "Windows protected your PC" — click More info then Run anyway.
  • macOS: Gatekeeper will block the binary — run xattr -d com.apple.quarantine ./mcp-local-time or go to System Settings > Privacy & Security and click Allow.
  • Linux: Mark as executable with chmod +x ./mcp-local-time and run.

Build from Source

Requires Rust (edition 2024).

cargo build --release

Binary: target/release/mcp-local-time (or mcp-local-time.exe on Windows)

Setup

Claude Code

Add to your MCP config (~/.claude/mcp.json or project .claude/mcp.json):

{
  "mcpServers": {
    "local-time": {
      "command": "/path/to/mcp-local-time",
      "args": []
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "local-time": {
      "command": "/path/to/mcp-local-time",
      "args": []
    }
  }
}

Restart the client after adding the config. Ask "what time is it?" to verify.

Stack

  • Rust (edition 2024)
  • rmcp 0.15 — MCP protocol, stdio transport
  • chrono — local time

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

License

MIT

About

MCP server that gives AI assistants access to the host system's local time

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages