MCP Time Server
一个基于 FastMCP 的时间服务器,通过 STDIO 向 MCP 客户端提供 get_current_time 工具。
环境要求
- Python 3.13 或更高版本
- Poetry 2.x
安装
poetry install
启动
poetry run mcp-time-server-cuc
服务使用 STDIO 传输,启动后等待 MCP 客户端连接,不会显示交互式提示符。请勿在服务终端手动输入内容。
MCP 客户端配置
以 Cherry Studio 为例,添加 STDIO 类型的 MCP 服务器:
- 命令:
D:\miniconda3\envs\py313\python.exe - 参数:
-m poetry -C C:\Users\30492\Downloads\mcp-time-server run mcp-time-server-cuc - 工作目录:
C:\Users\30492\Downloads\mcp-time-server
如果安装路径不同,请替换为实际的 Python 和项目路径。
工具
get_current_time
返回格式化的当前时间。
timezone:可选时区名称,例如Asia/Shanghai、America/New_York。- 不提供时区时,使用系统默认时区。
- 时区名称无效时,返回错误提示。
构建
poetry build
构建产物位于 dist/:
mcp_time_server_cuc-0.1.0-py3-none-any.whlmcp_time_server_cuc-0.1.0.tar.gz
发布方法见 PUBLISH.md。
Metadata
Release files for mcp-time-server-cuc 0.1.0
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 | Actions |
|---|---|---|---|---|
| mcp_time_server_cuc-0.1.0.tar.gz | 2.9 kB | Without provenance | Details for mcp_time_server_cuc-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_time_server_cuc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_time_server_cuc-0.1.0-py3-none-any.whl |
Total release size: 7.0 kB
Release files / mcp_time_server_cuc-0.1.0.tar.gz
| Download URL | mcp_time_server_cuc-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
998e247c0e14b3826bbb4a445b6d53012bbe419517731d9a5aca2508baa3e44d
|
|
BLAKE2b-256 checksum How to use checksums |
1ff5bd695b957ad5ec9772769fca75a80b7a1eef0962c7965587df1c56ecd18a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.2 CPython/3.13.18 Windows/11
|
Release files / mcp_time_server_cuc-0.1.0-py3-none-any.whl
| Download URL | mcp_time_server_cuc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cbd6ba5beeaded076975c7ea311d06aac966a1c58f95fb96c912a1cc3c8ca84
|
|
BLAKE2b-256 checksum How to use checksums |
5860edb156d5e42a1ed881f352c0f2656bbf5acc8a8932971d897eeff2ae6904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.2 CPython/3.13.18 Windows/11
|
Security for mcp-time-server-cuc 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.