MCP Time Server
MCP 时间服务器
概述
MCP 时间服务器是一个基于 Python 的复杂微服务,旨在提供跨不同时区的高级时间相关实用程序。它提供了强大的功能,可以检索当前时间并在各个全球时区之间转换时间。
Related MCP server: Time MCP Server
项目详情
版本:0.1.1
Python 兼容性:Python 3.11+
特征
当前时间检索:获取任何 IANA 时区的当前时间
时区转换:不同时区之间的时间转换
全面验证:使用 Pydantic 模型进行强大的输入验证
异步服务器架构:使用 asyncio 构建,性能高效
灵活配置:可通过环境变量和配置文件进行配置
依赖项
核心依赖项:
mcp(>=1.6.0)
pydantic(>=2.11.2)
PyYAML(>=6.0.2)
pyz(>=0.4.3)
开发依赖项:
pytest(>=8.3.5)
安装
先决条件
Python 3.11 或更高版本
点子
(可选)建议使用虚拟环境
从 PyPI 安装
pip install chuk-mcp-time-server从源安装
克隆存储库:
git clone <repository-url>
cd chuk-mcp-time-server创建虚拟环境:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`安装软件包:
pip install . # Installs the package in editable mode开发安装
为开发进行设置:
pip install .[dev] # Installs package with development dependencies运行服务器
命令行界面
chuk-mcp-time-server程序化使用
from chuk_mcp_time_server.main import main
if __name__ == "__main__":
main()环境变量
NO_BOOTSTRAP:设置为禁用组件引导其他配置选项可以在配置文件中设置
可用工具
1.获取当前时间
输入:
timezone:IANA 时区名称(例如,“America/New_York”)
例子:
get_current_time('Europe/London')返回:
指定时区的当前时间
时区详情
夏令时 (DST) 状态
2. 转换时间
输入:
source_timezone:源时区(IANA 格式)time:HH:MM(24 小时)格式的时间target_timezone:目标时区(IANA 格式)
例子:
convert_time('America/New_York', '14:30', 'Europe/Paris')返回:
源时间详细信息
目标时间详情
区域间时差
发展
代码格式化
黑色用于代码格式
isort 用于导入排序
行长度设置为 88 个字符
运行测试
pytest贡献
分叉存储库
创建你的功能分支(
git checkout -b feature/AmazingFeature)确保代码通过格式化和测试
提交您的更改(
git commit -m 'Add some AmazingFeature')推送到分支(
git push origin feature/AmazingFeature)打开拉取请求
执照
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
- FlicenseNot gradedqualityDmaintenanceAn MCP server providing timezone conversions and time-related operations via RESTful API endpoints, featuring comprehensive error handling and timezone database integration.
- AlicenseBqualityDmaintenanceProvides time and timezone functionality for LLMs, enabling them to get current time information across different timezones and convert times between zones.2MIT
- AlicenseNot gradedqualityCmaintenanceProvides time zone management utilities including retrieving current time in any global time zone and converting time between different time zones with automatic daylight saving time handling.46MIT
- AlicenseAqualityBmaintenanceProvides accurate system time to LLM applications with multi-timezone support via a simple tool call.1MIT
Related MCP Connectors
Timezone MCP — wraps WorldTimeAPI (free, no auth)
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.
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/chrishayuk/chuk-mcp-time-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server