定时器工具

MCP Timer Server 是一个用于AI代理的等待和定时工具,提供多种定时功能。

  • by aleck31
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 aleck31/mcp-timer

使用说明

mcp-timer

MCP Timer Server - Wait and scheduled timing tools for AI agents.

Installation

uvx mcp-timer

Tools

Tool Description
wait(seconds) Wait for specified seconds
wait_until(target_time, next_day_if_passed) Wait until specified time (HH:MM:SS or YYYY-MM-DD HH:MM:SS)
cron_wait(expression, timeout_seconds) Wait until next cron expression match
countdown(seconds, interval) Countdown with periodic progress reports
timeout_guard(seconds, message) Wait then return timeout signal
timestamp(fmt, offset_seconds) Get current time in various formats

cron_wait examples

*/5 * * * *      - every 5 minutes
0 9 * * MON-FRI  - 9:00 AM on weekdays
30 */2 * * *     - half past every 2 hours
0 0 1 * *       - midnight on the 1st of each month

timestamp formats

  • iso (default) - ISO 8601 format
  • unix - Unix timestamp
  • date - YYYY-MM-DD
  • time - HH:MM:SS
  • Custom strftime pattern (e.g. %Y/%m/%d %H:%M)

MCP Configuration

{
  "mcpServers": {
    "timer": {
      "command": "uvx",
      "args": ["mcp-timer"]
    }
  }
}

Release

Publishing is automated via GitHub Actions. To release:

git tag v0.2.2
git push origin v0.2.2

This triggers the workflow to build and publish to PyPI using trusted publishing.

PyPI Setup (one-time)

  1. Go to https://pypi.org/manage/project/mcp-timer/settings/publishing/
  2. Add a new trusted publisher:
    • Workflow: publish.yml
    • Environment: pypi
    • Repository: aleck31/mcp-timer

License

MIT