MCP-NTP Time Service
Supports testing the NTP time service via HTTP requests in SSE mode, allowing clients to retrieve accurate time information by specifying NTP servers through request headers.
Provides access to NTP (Network Time Protocol) services through Python, allowing large language models to retrieve accurate network time information with details like timestamps, formatted time strings, and time offsets.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-NTP Time Serviceget the current time from ntp.aliyun.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP-NTP 时间服务
这是一个基于MCP(Model Context Protocol)的NTP时间服务,为大模型提供准确的网络时间获取功能。
功能特性
从NTP服务器获取准确的网络时间
支持stdio和sse两种传输模式
提供
get_current_time工具,方便大模型获取当前时间支持环境变量和请求头两种配置NTP服务器的方式
返回详细的时间信息和NTP协议数据
Related MCP server: Time MCP Server
安装
# 使用 uv 安装依赖
uv sync配置
环境变量配置(stdio模式)
设置NTP_DOMAIN_URL环境变量:
export NTP_DOMAIN_URL="ntp.aliyun.com"请求头配置(sse模式)
在请求头中包含ntp_url字段:
ntp_url: ntp.aliyun.com使用方法
stdio模式
# 设置环境变量
export NTP_DOMAIN_URL="ntp.aliyun.com"
# 启动服务
python -m appsse模式
# 启动服务
python -m app --transport sse --port 8080
# 使用curl测试
curl -H "ntp_url: ntp.aliyun.com" http://localhost:8080/sse工具说明
get_current_time
获取当前NTP服务器时间。
参数:
ntp_server(可选): NTP服务器地址,如果不提供则使用环境变量或请求头中的配置
返回数据:
{
"ntp_server": "ntp.aliyun.com",
"ntp_timestamp": 1703123456.789,
"ntp_time": "2023-12-21T10:30:56.789",
"local_system_time": "2023-12-21T10:30:56.789",
"time_offset": 0.123,
"response_delay": 0.045
}调试
可以使用提供的测试NTP服务器进行调试:
export NTP_DOMAIN_URL="ntp.aliyun.com"
python -m app -v开发
项目结构
mcp-ntp/
├── app/
│ ├── __init__.py # 主入口
│ ├── server.py # MCP服务器实现
│ ├── client.py # NTP客户端
│ └── config.py # 配置管理
├── pyproject.toml # 项目配置
└── README.md # 说明文档添加新的NTP服务器
在client.py中的get_current_time函数可以轻松扩展支持更多NTP服务器配置。
许可证
MIT License
This server cannot be installed
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
- AlicenseAqualityDmaintenanceA Model Context Protocol server for time manipulation tasks, enabling AI models to get the current date/time and calculate duration between timestamps.Last updated72MIT
- 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.Last updated2MIT
- 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 backLast updated8324MIT
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides current time in ISO8601 format with timezone support.Last updated15MIT
Related MCP Connectors
A time server that keeps your AI honest about time. Real clock + drift guard, zero dependencies.
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
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/scofield5658/mcp-ntp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server