Date-time Tools MCP
日期时间工具 MCP
一个用于日期时间操作和时区转换的模型上下文协议 (MCP) 服务器。
概述
此 MCP 服务器提供了一套用于处理日期时间字符串的工具,包括时区转换、日期变更(算术运算)以及获取当前日期时间和时区。它旨在作为需要稳健、标准化日期时间操作的应用程序或代理的后端实用程序。
在线部署: https://date-time-tools.iabhishek.workers.dev/mcp
Related MCP server: Time MCP Server
架构
此服务器运行在 Cloudflare Workers 上,并使用 Streamable HTTP 传输(同时也暴露了一个传统的 SSE 端点)。会话状态通过 Cloudflare 的 agents McpAgent 包装器由 Durable Object 提供支持。
端点:
POST/GET/DELETE /mcp— Streamable HTTP 传输。会话通过mcp-session-id标头进行跟踪。GET /sse,POST /sse/message— 用于旧版客户端的传统 SSE 传输。
本地开发
npm install
npm run dev # wrangler dev — serves at http://127.0.0.1:8787/mcp部署到 Cloudflare
手动
一次性设置:
npx wrangler login部署:
npm run deployWrangler 会打印公共 URL — 对于本项目,它是 https://date-time-tools.iabhishek.workers.dev/mcp。Workers 免费计划涵盖此服务器(每天 10 万次请求;Durable Objects 免费层级涵盖会话存储)。
自动化 (GitHub Actions)
.github/workflows/deploy.yml 会在每次推送到 main 分支时(以及手动触发 workflow_dispatch 时)进行部署。配置两个存储库密钥:
CLOUDFLARE_API_TOKEN— 在 https://dash.cloudflare.com/profile/api-tokens 使用 Edit Cloudflare Workers 模板创建CLOUDFLARE_ACCOUNT_ID— 在 Workers & Pages 仪表板侧边栏中找到
与 MCP 客户端集成
Claude Code
claude mcp add date-time-tools --transport http https://date-time-tools.iabhishek.workers.dev/mcp添加 --scope user 以将其注册到每个项目,或添加 --scope project 以提交与协作者共享的 .mcp.json。使用 claude mcp list 进行验证;在 Claude Code 中,运行 /mcp 以检查状态和工具。
通用 Streamable HTTP 客户端
将支持 Streamable HTTP 传输的客户端配置为指向已部署的 URL:
{
"mcpServers": {
"date-time-tools": {
"url": "https://date-time-tools.iabhishek.workers.dev/mcp"
}
}
}对于仅支持 stdio 的客户端,请使用 mcp-remote 进行桥接:
{
"mcpServers": {
"date-time-tools": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://date-time-tools.iabhishek.workers.dev/mcp"]
}
}
}可用工具
此 MCP 服务器为 LLM 提供以下工具:
convertTimezones:将日期时间字符串从一个时区转换为另一个时区。mutateDate:从日期时间字符串中添加或减去天、小时、分钟、月或年。currentDateTimeAndTimezone:获取当前的日期、时间和时区。
🧪 使用 MCP Inspector 进行测试
运行 npm run dev,然后在另一个终端中:
npx -y @modelcontextprotocol/inspector选择 Streamable HTTP 传输并使用 http://127.0.0.1:8787/mcp 作为 URL。
功能
时区转换
使用 Luxon 兼容格式将日期时间字符串从一个 IANA 时区转换为另一个时区。日期变更
从日期时间字符串中添加或减去天、小时、分钟、月或年。当前日期时间与时区
检索用户/系统的当前日期、时间和时区。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceGives large language models time awareness capabilities through various time-related functions including current time retrieval, timezone conversion, and relative time calculations.61,014MIT
- AlicenseBqualityDmaintenanceProvides time and timezone functionality for LLMs, enabling them to get current time information across different timezones and convert times between zones.2MIT
- AlicenseAqualityBmaintenanceProvides comprehensive date, time, timezone, and calendar operations powered by Luxon, enabling AI agents to perform time calculations, timezone conversions, and temporal data handling across 400+ IANA timezones.217MIT
- AlicenseNot gradedqualityDmaintenanceProvides time and date functionality with support for multiple formats and timezones, enabling users to get current time/date, format timestamps, and retrieve comprehensive datetime information.46MIT
Related MCP Connectors
Timezone tools for agents: convert, world clock, offset, lookup, date math, holidays, slots. x402
Convert and compare dates and times across any timezone with flexible, locale-aware formatting. Ad…
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abhi12299/date-time-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server