mcp-chrono
A comprehensive time and calendar utility server that provides timezone conversions, date arithmetic, and business day calculations for AI agents. It features extensive support for the Chinese lunar calendar, including almanac data, festivals, and public holiday tracking across multiple regions.
README
mcp-chrono
MCP server providing time, calendar, timezone, Chinese lunar calendar, almanac, and date utilities for AI agents.
Quick Start
Using npx (no installation needed)
npx mcp-chrono
Global install
npm install -g mcp-chrono
mcp-chrono
Usage with MCP Clients
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"chrono": {
"command": "npx",
"args": ["-y", "mcp-chrono"]
}
}
}
Claude Code
claude mcp add chrono -- npx -y mcp-chrono
Or with a custom data directory:
claude mcp add chrono -- npx -y mcp-chrono --data-dir /path/to/data
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"chrono": {
"command": "npx",
"args": ["-y", "mcp-chrono"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"chrono": {
"command": "npx",
"args": ["-y", "mcp-chrono"]
}
}
}
Generic MCP client (mcp.json)
Any MCP-compatible client can use the standard mcp.json format:
{
"mcpServers": {
"chrono": {
"command": "npx",
"args": ["-y", "mcp-chrono"],
"transportType": "stdio"
}
}
}
With custom data directory:
{
"mcpServers": {
"chrono": {
"command": "npx",
"args": ["-y", "mcp-chrono", "--data-dir", "/path/to/data"],
"transportType": "stdio"
}
}
}
Data Directory
Holiday API responses are cached locally to avoid repeated network requests. Default location: ~/.mcp-chrono/
Override with --data-dir:
npx mcp-chrono --data-dir /tmp/mcp-chrono-data
Tools
Time & Timezone
get_current_time
Get current time in any IANA timezone with detailed components (timestamp, weekday, week of year, day of year, UTC offset, etc.)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
timezone |
string | No | UTC |
IANA timezone (e.g. Asia/Shanghai, America/New_York) |
format |
string | No | iso |
Output format: iso, human, or relative |
convert_timezone
Convert a datetime between two IANA timezones.
| Parameter | Type | Required | Description |
|---|---|---|---|
datetime |
string | Yes | ISO 8601 datetime (e.g. 2024-01-15T10:30:00) |
from_timezone |
string | Yes | Source IANA timezone |
to_timezone |
string | Yes | Target IANA timezone |
list_timezones
Search IANA timezones with current offsets and Chinese city names.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | No | Search by timezone name, city, or Chinese name |
continent |
string | No | Filter by continent (e.g. Asia, Europe, America) |
parse_timestamp
Parse Unix timestamps (seconds/milliseconds) or ISO 8601 strings into date components.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input |
string | number | Yes | - | Unix timestamp (seconds or milliseconds) or ISO 8601 string |
timezone |
string | No | UTC |
IANA timezone for output |
Date Calculation
calculate_time
Add/subtract time from a date. Returns a new date after applying the offset.
Three modes: gregorian (standard date arithmetic), lunar (Chinese calendar arithmetic), anchor (offset from a named festival like 春节 or Thanksgiving).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
mode |
string | No | gregorian |
Calculation mode: gregorian, lunar, or anchor |
base_date |
string | No | now | Base date in ISO format. Defaults to current time if omitted |
timezone |
string | No | UTC |
IANA timezone for the base date |
years |
integer | No | - | Years to add (negative to subtract) |
months |
integer | No | - | Months to add (negative to subtract) |
days |
integer | No | - | Days to add (negative to subtract) |
hours |
integer | No | - | Hours to add (negative to subtract) |
minutes |
integer | No | - | Minutes to add (negative to subtract) |
festival |
string | No | - | Festival name for anchor mode (e.g. 春节, Christmas, Thanksgiving) |
festival_year |
integer | No | - | Year to resolve festival date for anchor mode |
date_diff
Calculate the difference between two dates in years, months, days, hours, minutes, and total counts.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
start |
string | Yes | - | Start date in ISO 8601 format |
end |
string | Yes | - | End date in ISO 8601 format |
timezone |
string | No | UTC |
IANA timezone for parsing dates |
countdown
Countdown from now to a target date with remaining days/hours/minutes/seconds.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target |
string | Yes | - | Target date/time in ISO 8601 format |
timezone |
string | No | UTC |
IANA timezone for the target date |
calculate_business_days
Count or add business days, skipping weekends and optionally public holidays (supports CN makeup workdays).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
action |
string | Yes | - | count (count business days between two dates) or add (add business days to a date) |
from |
string | Yes | - | Start date in YYYY-MM-DD format |
to |
string | No | - | End date in YYYY-MM-DD format (required for count) |
business_days |
integer | No | - | Number of business days to add (required for add, negative to subtract) |
country |
string | No | - | Country code for public holidays (e.g. CN, US) |
timezone |
string | No | UTC |
IANA timezone |
Calendar & Festivals
convert_calendar
Convert between Gregorian and Chinese Lunar calendar. Returns Ganzhi (干支), zodiac, solar terms, festivals, constellation.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
direction |
string | Yes | - | gregorian_to_lunar or lunar_to_gregorian |
year |
integer | Yes | - | Year |
month |
integer | Yes | - | Month (1–12) |
day |
integer | Yes | - | Day (1–31) |
isLeapMonth |
boolean | No | false |
For lunar_to_gregorian: whether the month is a leap month (闰月) |
get_festivals
List festivals, solar terms, and public holidays within a date range. Filterable by type.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
start_date |
string | Yes | - | Start date in YYYY-MM-DD format |
end_date |
string | Yes | - | End date in YYYY-MM-DD format |
country |
string | No | CN |
Country code for public holidays (e.g. CN, US, HK) |
types |
string[] | No | - | Filter by type: lunar_festival, solar_festival, solar_term, public_holiday |
get_month_info
Month details: day count, first/last weekday, leap year, quarter, week count.
| Parameter | Type | Required | Description |
|---|---|---|---|
year |
integer | Yes | Year (e.g. 2024) |
month |
integer | Yes | Month (1–12) |
Chinese Almanac
get_almanac
Chinese almanac (黄历) for a date: 宜/忌 activities, lucky directions (喜神/财神/福神), conflict zodiac, 彭祖百忌, 吉神宜趋, 凶煞宜忌, 天神, 纳音, and more.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
date |
string | No | today | Date in YYYY-MM-DD format |
Persistent Countdowns
manage_countdown
CRUD for persistent countdown timers, stored as JSON on disk.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
action |
string | Yes | - | set, get, list, or delete |
id |
string | No | - | Countdown ID (required for get / delete; auto-generated for set if omitted) |
name |
string | No | - | Name/description (required for set) |
target_date |
string | No | - | Target date in ISO 8601 format (required for set) |
timezone |
string | No | UTC |
IANA timezone |
Supported Regions
| Region | Festivals | Public Holiday API |
|---|---|---|
| CN | 27 festivals (lunar + solar) | timor.tech (includes makeup workdays) |
| US | 10 federal holidays | date.nager.at |
| HK | 17 public holidays (lunar, Easter, Ching Ming, fixed) | date.nager.at |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。