Time Server MCP
一个使用 MCP (Model Context Protocol) 实现的时间服务器。
功能
- 获取当前时间
- 支持指定时区
- 使用 stdio 传输方式运行服务器
安装
pip install time-server-mcp
使用
启动服务器
time-server-mcp
使用示例
服务器启动后,可以通过 MCP 协议与之通信,调用 get_current_time 工具来获取当前时间。
from mcp.client import MCPClient
# 创建客户端实例
client = MCPClient(transport="stdio")
# 调用 get_current_time 工具获取当前时间
result = client.get_current_time()
print(f"当前时间: {result}")
# 调用 get_current_time 工具获取指定时区的当前时间
result = client.get_current_time(timezone="Asia/Shanghai")
print(f"上海时间: {result}")
依赖
- Python 3.7+
- pytz
- mcp
Metadata
Release files for time-server-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| time_server_mcp-0.1.1.tar.gz | 2.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_server_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / time_server_mcp-0.1.1.tar.gz
| Download URL | time_server_mcp-0.1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c55b6d0f6e3f37f241e63399ddd79b1ed71ef2c785f1129840bbc132cf636129
|
|
BLAKE2b-256 checksum How to use checksums |
61b699c1b3f279315fa70c24ff642f227f30365bc5948bf15cac0963885f3db3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / time_server_mcp-0.1.1-py3-none-any.whl
| Download URL | time_server_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c79a1b1aa430e6e6e6e5c34383269b506fa90effd892265ce7049cc17562989
|
|
BLAKE2b-256 checksum How to use checksums |
3c503314f689b2cd373b9a987d2457514fc880bd05938ea45a31206e5e42d8aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for time-server-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.