npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adia1223/mcp-datetime-tools

v1.1.0

Published

MCP server providing datetime utilities - get current time, format dates, calculate time differences

Downloads

21

Readme

MCP DateTime Tools

一个简单高效的 MCP 服务器,提供日期时间相关的实用工具。帮助 AI 获取当前时间、格式化日期、计算时间差等。

为什么需要这个工具?

AI 模型不知道"现在"是什么时候。这个 MCP 服务器让 AI 能够:

  • 获取当前准确时间
  • 进行时间计算和转换
  • 处理不同时区的时间

工具列表

| 工具 | 描述 | |------|------| | get_current_time | 获取当前时间(时间戳 + 格式化字符串) | | format_date | 格式化日期为指定格式 | | time_diff | 计算两个时间之间的差值 | | add_time | 对时间进行加减运算 | | get_timestamp | 获取时间戳(秒/毫秒) | | parse_timestamp | 将时间戳解析为日期时间 |

安装

npx -y @adia1223/mcp-datetime-tools

配置

在 MCP 配置文件中添加:

{
  "mcpServers": {
    "datetime-tools": {
      "command": "npx",
      "args": ["-y", "@adia1223/mcp-datetime-tools"]
    }
  }
}

使用示例

获取当前时间

工具: get_current_time
参数: { "timezone": "Asia/Shanghai" }

格式化日期

工具: format_date
参数: { "date": "2024-12-25", "format": "relative" }
输出: "28天后"

计算时间差

工具: time_diff
参数: { "start": "2024-01-01", "end": "2024-12-31" }

时间加减

工具: add_time
参数: { "days": 7, "hours": 3 }
输出: 当前时间 + 7天3小时

支持的时区

使用 IANA 时区名称,例如:

  • Asia/Shanghai - 中国
  • America/New_York - 美东
  • Europe/London - 伦敦
  • Asia/Tokyo - 东京

License

MIT