MCP DateTime
MCP 日期时间
模型上下文协议 (MCP) 服务器的 TypeScript 实现,为代理系统和聊天 REPL 提供日期时间和时区信息。
概述
MCP DateTime 是一个简单的服务器,它实现了模型上下文协议 (MCP Protocol) ,用于向 AI 代理和聊天界面提供日期时间和时区信息。它允许 AI 系统:
获取本地系统时区的当前时间
获取任何有效时区的当前时间
列出所有可用的时区
通过 URI 资源访问时区信息
Related MCP server: Time Tools MCP Server
安装
来自 npm
npm install -g mcp-datetime从源头
git clone https://github.com/odgrmi/mcp-datetime.git
cd mcp-datetime
npm install
npm run build用法
命令行
MCP DateTime 可以以两种模式运行:
1. 标准I/O模式(默认)
此模式非常适合通过标准输入/输出与支持 MCP 协议的 AI 系统集成:
mcp-datetime2. 服务器发送事件(SSE)模式
此模式启动一个为 MCP 协议提供 SSE 传输的 HTTP 服务器:
mcp-datetime --sse您还可以指定自定义端口和 URI 前缀:
mcp-datetime --sse --port=8080 --prefix=/api/datetime环境变量
PORT:设置 SSE 模式的端口(默认值:3000)URI_PREFIX:设置 SSE 模式的 URI 前缀(默认值:无)
可用工具
MCP DateTime 提供以下工具:
get-current-time
返回系统本地时区的当前时间。
get-current-timezone
返回当前系统时区。
get-time-in-timezone
返回指定时区的当前时间。
参数:
timezone:获取当前时间的时区(例如“America/New_York”)
list-timezones
返回所有可用时区的列表。
资源 URI
MCP DateTime 还通过资源 URI 提供对时区信息的访问:
datetime://{timezone}
返回指定时区的当前时间。
例如: datetime://America/New_York
datetime://list
返回所有可用时区的列表。
常见时区
以下常见时区始终可用:
世界标准时间
欧洲/伦敦
欧洲/巴黎
欧洲/柏林
美国/纽约
美国/芝加哥
美国/丹佛
美国/洛杉矶
亚洲/东京
亚洲/上海
亚洲/加尔各答
澳大利亚/悉尼
太平洋/奥克兰
SSE 终端节点
在 SSE 模式下运行时,以下端点可用:
/sse:SSE 连接端点/message:客户端到服务器通信的消息端点/info:基本服务器信息
如果指定了 URI 前缀,它将被添加到所有端点的前面。
与人工智能系统集成
MCP DateTime 可以与支持模型上下文协议 (MCP Protocol) 的 AI 系统集成。这使得 AI 代理能够访问准确的时区和日期时间信息。
发展
先决条件
Node.js 14.16 或更高版本
npm
设置
git clone https://github.com/odgrim/mcp-datetime.git
cd mcp-datetime
npm install建造
npm run build以开发模式运行
npm run dev # Standard I/O mode
npm run dev:sse # SSE mode执照
该项目根据 Mozilla 公共许可证 2.0 获得许可 - 有关详细信息,请参阅LICENSE文件。
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
- Alicense-qualityDmaintenanceA TypeScript server that provides time-related tools through the Model Context Protocol, allowing users to get current time in various timezones and convert times between different IANA timezones.MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server for time manipulation tasks, enabling AI models to get the current date/time and calculate duration between timestamps.72MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides time and timezone conversion capabilities, enabling LLMs to get current time information and perform timezone conversions using IANA timezone names.2MIT
- Alicense-qualityCmaintenanceThe Time MCP Server is a Model Context Protocol (MCP) server that provides AI assistants and other MCP clients with standardized tools to perform time and date-related operations. This server acts as a bridge between AI tools and a robust time-handling back12226MIT
Related MCP Connectors
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
A time server that keeps your AI honest about time. Real clock + drift guard, zero dependencies.
Timezone MCP — wraps WorldTimeAPI (free, no auth)
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/odgrim/mcp-datetime'
If you have feedback or need assistance with the MCP directory API, please join our Discord server