Skip to main content
Glama
jyagunii-bot

now-mcp

by jyagunii-bot

now-mcp

一个小型 MCP 服务器,为 Claude 提供当前日期和时间。粘贴 URL,搞定。

Claudeに今の日付と時刻を渡すだけのMCPサーバー。URL貼って終わり。


Why I made this / 为什么制作这个

English: I needed time-awareness in my own Claude workflow. Claude doesn't know the current date or time by default — it guesses or refuses. So I built this for myself. Anthropic will probably ship this natively at some point; when they do, this becomes obsolete and that's fine.

日本語: 自分の作業に時間の感覚が必要だったから作っただけ。Claudeはデフォルトで日付も時刻も知らない(推測するか答えない)。Anthropicがいずれ公式対応するはずで、そうなったらこれは不要になる。それでいい。


Related MCP server: DateTime MCP Server

How to use / 如何使用

claude.ai → Settings → Connectors → Add custom connector claude.ai → 设置 → 连接器 → 添加自定义连接器

Paste this URL / 粘贴此 URL:

https://now-mcp.jyagunii.workers.dev/mcp

That's it. No setup, no copy-paste prompts. 就这样。无需设置,无需复制粘贴提示词。

Custom MCP connectors on claude.ai require Pro / Max / Team / Enterprise plans (Free added MCP support in Feb 2026). claude.ai 的自定义 MCP 连接器需要 Pro / Max / Team / Enterprise 计划(Free 计划于 2026 年 2 月增加了对 MCP 的支持)。

Optional: pin your timezone / 可选:固定时区

Append ?tz= with your IANA timezone for guaranteed accuracy:

若要确保时间准确,请附加 IANA 时区:

https://now-mcp.jyagunii.workers.dev/mcp?tz=Asia/Tokyo

To find your timezone, visit: https://now-mcp.jyagunii.workers.dev/


What it does / 功能说明

One tool: get_current_time(timezone?)

  • Returns ISO 8601 timestamp, human-readable time, weekday, unix milliseconds

  • Timezone resolution: argument → URL param ?tz= → Cloudflare geolocation → UTC

只有一个工具: get_current_time(timezone?)

  • 返回 ISO 8601 时间戳、人类可读时间、星期几、unix 毫秒数

  • 时区解析优先级: 参数 → URL 参数 ?tz= → Cloudflare 地理位置 → UTC

Example response / 响应示例

{
  "iso": "2026-05-08T13:09:20+09:00",
  "human": "2026-05-08 13:09 Fri (Asia/Tokyo)",
  "timezone": "Asia/Tokyo",
  "weekday": "Fri",
  "unix_ms": 1778632000000,
  "_timezone_source": "argument"
}

_timezone_source indicates where the timezone came from: argument, url_param, cloudflare_geo, or fallback.


Where it works, where it doesn't / 适用范围与限制

Works / 适用场景

  • claude.ai web/mobile users with default location settings 使用默认位置设置的 claude.ai 网页/移动端用户

  • Users with ?tz=... URL param set 设置了 ?tz=... URL 参数的用户

  • Users running Now Extension for Claude (Chrome extension that injects timestamps) 使用 Now Extension for Claude(注入时间戳的 Chrome 扩展)的用户

Doesn't work / 不适用场景

  • Users who disabled location in Claude privacy settings 在 Claude 隐私设置中禁用了位置信息的用户

  • VPN users (gets the VPN exit node's timezone) 使用 VPN 的用户(获取的是 VPN 出口节点的时区)

  • Direct Anthropic API users (no system prompt with location) 直接使用 Anthropic API 的用户(系统提示词中没有位置信息)

  • Other MCP clients (Cursor, Zed, etc. — depends on the client) 其他 MCP 客户端(Cursor, Zed 等 — 取决于客户端)

These are mostly technical users. If that's you, just pass the timezone argument explicitly, set the URL param, fork the repo, or self-host. You can solve it.

这些大多是技术用户。如果是你,只需显式传递 timezone 参数、设置 URL 参数、fork 仓库或自行部署即可解决。


Why MCP alone can't perfectly handle "world support" / 为什么 MCP 本身无法完美实现“全球支持”

Documenting this because it took a while to figure out:

记录于此,因为我花了一些时间才弄明白:

  1. MCP protocol has no way to convey user locale to the server. Confirmed in the official spec. MCP 协议规范中没有向服务器传递用户区域设置的字段(已确认)。

  2. For remote MCP servers, the request comes from the AI provider's datacenter, not the user. Verified: Claude calls reach this server from Anthropic, PBC in Virginia, not from the user's actual location. 对于远程 MCP 服务器,请求来自 AI 提供商的数据中心,而非用户。经核实:Claude 调用此服务器时,Cloudflare 看到的来源是弗吉尼亚州的 Anthropic, PBC,而非用户的实际位置。

  3. The AI must read user location from its system prompt and pass it as an argument. This is the only viable path, and it depends on the AI's judgment — not 100% reliable. AI 必须从系统提示词中读取用户位置并将其作为参数传递。这是唯一可行的路径,且取决于 AI 的判断 — 并非 100% 可靠。

This is a structural limitation of MCP, not a bug. 这是 MCP 的结构性限制,而非 Bug。


Self-host / 自行部署

git clone https://github.com/jyagunii-bot/now-mcp.git
cd now-mcp
npm install
npx wrangler login
npm run deploy

Runs on Cloudflare Workers free tier. 可在 Cloudflare Workers 免费层级上运行。


Customize / 自定义

Edit src/index.ts:

  • tools[0].description — how Claude perceives the tool

  • instructions (in the initialize handler) — operating rules sent to Claude

  • resolveTimezone() — fallback behavior

Then npm run deploy.


Companion / 姊妹项目

🔗 Now Extension for Claude — Chrome extension that injects current timestamp into every message. Works alongside this MCP for full accuracy in Chrome.

姊妹 Chrome 扩展。通过在每条消息中注入当前时间戳,与此 MCP 配合使用可在 Chrome 浏览器中实现完全准确。


License

MIT — no warranty, use at your own risk.


Author

@jyagunii-bot

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Provides current time and date information with timezone support and multiple formatting options. Enables AI assistants to answer time-related queries in different timezones with detailed temporal information.
    2
    10 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides LLMs with current date and time information across any timezone, with configurable defaults and support for IANA timezone identifiers.
    1
    14 npm
    3
    Apache 2.0
  • A
    license
    A
    quality
    Not graded
    maintenance
    Provides AI assistants with real-time date, time, and timezone information, enabling them to access current temporal data, format dates, calculate day of week, and work with different timezones.
    4
    7 npm
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides the current date and time in the user's timezone through a simple tool with no parameters required.
    24,856 npm
    -