← 返回
效率工具 中文

temporal-cortex-datetime

Convert timezones, resolve natural language times ("next Tuesday at 2pm"), compute durations, and adjust timestamps with DST awareness. No credentials needed...
转换时区,解析自然语言时间(如"下周二下午2点"),计算时长,处理夏令时调整。无需凭据。
billylui
效率工具 clawhub v0.9.1 3 版本 99848.6 Key: 无需
★ 1
Stars
📥 1,299
下载
💾 3
安装
3
版本
#latest

概述

Temporal Context & Datetime Resolution

5 tools for temporal orientation and datetime computation. All tools execute locally within the compiled MCP server binary — no external API calls, no network access at runtime, no credential files. The binary is installed once via npm (or built from source with Docker) and all subsequent executions are fully offline. No OAuth or credentials required. Timezone and week-start preferences are stored in config.json. Unset fields default to system timezone and Monday week-start.

Source & Provenance

Tools

ToolWhen to Use
------------------
get_temporal_contextFirst call in any session. Returns current time, timezone, UTC offset, DST status, DST prediction, day of week.
resolve_datetimeConvert human expressions to RFC 3339. Supports 60+ patterns: "next Tuesday at 2pm", "tomorrow morning", "+2h", "start of next week", "third Friday of March".
convert_timezoneConvert RFC 3339 datetime between IANA timezones.
compute_durationDuration between two timestamps (days, hours, minutes).
adjust_timestampDST-aware timestamp adjustment. "+1d" across spring-forward = same wall-clock time.

Runtime

These tools run inside the Temporal Cortex MCP server (@temporal-cortex/cortex-mcp), a compiled Rust binary distributed as an npm package.

Install and startup lifecycle:

  1. npx resolves @temporal-cortex/cortex-mcp from the npm registry (one-time, cached locally after first download)
  2. The postinstall script downloads the platform-specific binary from the GitHub Release and verifies its SHA256 checksum against the embedded checksums.jsoninstallation halts on mismatch
  3. The MCP server starts as a local process communicating over stdio (no listening ports)
  4. All 5 datetime tools execute locally — zero network access, zero filesystem writes, no credentials

Network access: Only during the initial npm download. Once cached, subsequent launches are fully offline. The 5 datetime tools make zero network requests — all computation is local.

File access: The binary reads ~/.config/temporal-cortex/config.json for timezone and week-start preferences. Unset or missing fields default to system values. No filesystem writes. No credential files accessed.

No credentials required. Unlike the scheduling skill, this skill needs no OAuth tokens or API keys.

Pre-run verification (recommended before first use):

  1. Inspect the npm package without executing: npm pack @temporal-cortex/cortex-mcp --dry-run
  2. Verify checksums independently against the GitHub Release (see verification pipeline below)
  3. For full containment, run in Docker instead of npx (see Docker containment below)

Verification pipeline: Checksums are published independently at each GitHub Release as SHA256SUMS.txt — verify the binary before first use:

# 1. Fetch checksums from GitHub (independent of the npm package)
curl -sL https://github.com/temporal-cortex/mcp/releases/download/mcp-v0.9.1/SHA256SUMS.txt

# 2. Compare against the npm-installed binary
shasum -a 256 "$(npm root -g)/@temporal-cortex/cortex-mcp/bin/cortex-mcp"

As defense-in-depth, the npm package also embeds checksums.json and the postinstall script compares SHA256 hashes during install — installation halts on mismatch (the binary is deleted, not executed). This automated check supplements, but does not replace, independent verification above.

Build provenance: Binaries are cross-compiled from auditable Rust source in GitHub Actions across 5 platforms (darwin-arm64, darwin-x64, linux-x64, linux-arm64, win32-x64). Source: github.com/temporal-cortex/mcp (MIT-licensed). The CI workflow, build artifacts, and release checksums are all publicly inspectable.

Docker containment (recommended for maximum isolation — zero Node.js dependency, zero host filesystem access, zero network after build):

{
  "mcpServers": {
    "temporal-cortex": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "--network=none", "cortex-mcp"]
    }
  }
}

Build: docker build -t cortex-mcp https://github.com/temporal-cortex/mcp.git — No volume mount needed since the datetime skill requires no OAuth tokens or credential files. The --network=none flag enforces the zero-network guarantee at the OS level.

Critical Rules

  1. Always call get_temporal_context before time-dependent work — never assume the time or timezone.
  2. Resolve before querying — convert "next Tuesday at 2pm" to RFC 3339 with resolve_datetime before passing to calendar tools.
  3. Timezone awareness — all datetime tools produce RFC 3339 with timezone offsets.

resolve_datetime Expression Patterns

The expression parser supports 60+ patterns across 10 categories:

CategoryExamples
-------------------
Relative"now", "today", "tomorrow", "yesterday"
Named days"next Monday", "this Friday", "last Wednesday"
Time of day"morning" (09:00), "noon", "evening" (18:00), "eob" (17:00)
Clock time"2pm", "14:00", "3:30pm"
Offsets"+2h", "-30m", "in 2 hours", "3 days ago"
Compound"next Tuesday at 2pm", "tomorrow morning", "this Friday at noon"
Period boundaries"start of week", "end of month", "start of next week", "end of last month"
Ordinal weekday"first Monday of March", "third Friday of next month"
RFC 3339 passthrough"2026-03-15T14:00:00-04:00" (returned as-is)
Week start awareUses configured WEEK_START (Monday default, Sunday option)

Common Patterns

Get Current Time Context

get_temporal_context()
→ utc, local, timezone, utc_offset, dst_active, dst_next_transition,
  day_of_week, iso_week, is_weekday, day_of_year, week_start

Resolve a Meeting Time

resolve_datetime("next Tuesday at 2pm")
→ resolved_utc, resolved_local, timezone, interpretation

Convert Across Timezones

1. get_temporal_context → user's timezone
2. convert_timezone(datetime: "2026-03-15T14:00:00-04:00", target_timezone: "Asia/Tokyo")
   → same moment in Tokyo time with DST and offset info

Calculate Duration

compute_duration(start: "2026-03-15T09:00:00-04:00", end: "2026-03-15T17:30:00-04:00")
→ total_seconds: 30600, hours: 8, minutes: 30, human_readable: "8 hours 30 minutes"

DST-Aware Adjustment

adjust_timestamp(
  datetime: "2026-03-07T23:00:00-05:00",
  adjustment: "+1d",
  timezone: "America/New_York"
) → same wall-clock time (23:00) on March 8, even though DST spring-forward occurs

Additional References

版本历史

共 3 个版本

  • v0.9.1 当前
    2026-03-29 08:48 安全 安全
  • v0.8.1
    2026-03-11 10:44
  • v0.5.8
    2026-03-07 01:57

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,228
data-analysis

calendar-scheduling

billylui
安排会议、检查空闲状态并管理跨 Google、Outlook 和 CalDAV 的日历。路由至专门的子技能以处理日期时间解析及日历操作。
★ 2 📥 1,836
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,473