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

today-history

v1.0.0

Published

一个基于 FastMCP 的历史今日微服务,提供历史上的今天事件查询功能

Readme

Today History MCP

一个基于 FastMCP 的历史今日微服务,提供历史上的今天事件查询功能。

功能介绍

该微服务可以从聚合数据 API 获取历史上特定日期发生的事件列表。支持多种日期查询方式:

  • 相对日期:今天、昨天、前天、明天、后天
  • 绝对日期:如 12月3日、2023年12月3日

安装

npm install today-history-mcp

使用方法

const historyService = require('today-history-mcp');

// 查询今天的歷史事件
const result = await historyService.main({
  query: '今天',
  token: 'YOUR_ACCESS_TOKEN'
}, {});

API 说明

main(event, context)

主函数,接收事件参数和上下文参数。

event 参数

  • query: 查询关键字,如"今天"、"12月3日"等
  • token: 访问令牌,用于身份验证
  • headers.authorization: 可选,另一种传递令牌的方式(Bearer Token)

返回值

{
  "code": 200,
  "message": "查询成功",
  "data": [
    {
      "date": "1907年12月3日",
      "title": "罗斯福主张以庚子赔款援助中国教育"
    }
  ]
}

配置

需要在环境中设置有效的 API 访问令牌才能正常使用服务。

许可证

MIT