Skip to main content
Glama

Beijing Time MCP Server

by archerlliu
MIT License

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!

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables users to query and retrieve the current Beijing time in multiple formats including standard, ISO 8601, and Chinese formats. Provides timezone information and Unix timestamps for time-related operations.

  1. 功能
    1. 安装
      1. 从 PyPI 安装
      2. 从源码安装
    2. 使用方法
      1. 作为 MCP 服务器运行
      2. 在 Claude Desktop 中使用
    3. 可用工具
      1. get_beijing_time
    4. 开发
      1. 安装开发依赖
      2. 运行测试
      3. 代码格式化
      4. 类型检查
    5. 许可证
      1. 贡献

        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/archerlliu/time-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server