Skip to main content

Beijing Time MCP Server

一个用于查询北京时间的MCP(Model Context Protocol)服务器。

mcp-name: io.github.archerlliu/beijing-time-mcp

功能

  • 获取当前北京时间
  • 格式化时间输出
  • 支持多种时间格式
  • 提供时区信息

安装

从 PyPI 安装

pip install beijing-time-mcp

从源码安装

git clone https://github.com/archerliu/beijing-time-mcp.git
cd beijing-time-mcp
pip install -e .

使用方法

作为 MCP 服务器运行

beijing-time-mcp

在 Claude Desktop 中使用

在 Claude Desktop 的配置文件中添加:

{
  "mcpServers": {
    "beijing-time": {
      "command": "beijing-time-mcp"
    }
  }
}

可用工具

get_beijing_time

获取当前北京时间。

参数:

  • format (可选): 时间格式,默认为 "%Y-%m-%d %H:%M:%S"
    • "%Y-%m-%d %H:%M:%S" - 标准格式 (如: 2024-01-15 14:30:25)
    • "%Y-%m-%d" - 日期格式 (如: 2024-01-15)
    • "%H:%M:%S" - 时间格式 (如: 14:30:25)
    • "%Y年%m月%d日 %H时%M分%S秒" - 中文格式 (如: 2024年01月15日 14时30分25秒)

返回:

  • time: 格式化后的北京时间字符串
  • timezone: 时区信息
  • timestamp: Unix时间戳
  • iso_format: ISO 8601格式的时间

开发

安装开发依赖

pip install -e ".[dev]"

运行测试

pytest

代码格式化

black .
isort .

类型检查

mypy beijing_time_mcp

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

Metadata

Release files for beijing-time-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beijing-time-mcp 0.1.2
File Size Uploaded Provenance
beijing_time_mcp-0.1.2.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beijing-time-mcp 0.1.2
File Interpreter ABI Platform
beijing_time_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / beijing_time_mcp-0.1.2.tar.gz

Download URL beijing_time_mcp-0.1.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a55b7784d1648c1138fc52ec063ecb2e269d0c54540656bfac30b4a0b3007299
BLAKE2b-256 checksum
How to use checksums
d0db9b6451a5d6947e7f2ec948bc4ea3afa0864fa6ae694f9af0bf8fc54be783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / beijing_time_mcp-0.1.2-py3-none-any.whl

Download URL beijing_time_mcp-0.1.2-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c18459d962466254e37e895cb6d8a44f08c0740d62095c5d568c0ed231c6be00
BLAKE2b-256 checksum
How to use checksums
e6cfd520ea41e46c6c53e068684330856d87f6567caeae6e5b19a4565985434b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for beijing-time-mcp 0.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page