home / mcp / date mcp server

Date MCP Server

一个基于Model Context Protocol (MCP)的日期时间处理服务,专注于处理东八区(中国)时间与时间戳的转换。

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "2022124030jc-date_mcp": {
      "command": "mcp",
      "args": [
        "dev",
        "main.py"
      ]
    }
  }
}

You run a MCP-based Date Time Processing service that focuses on converting and handling China Standard Time (UTC+8) and timestamps. It provides a simple set of utilities to get the current date in China, convert between timestamps and date-time strings, and greet users. This server is designed to be easy to run locally and to integrate with an MCP client for straightforward tool calls and resource access.

How to use

To use the Date Time MCP Server, start it locally and connect with an MCP client. You can call the available tools to get the current date, convert between timestamps and date-time strings in China time, and convert China date-time strings back to timestamps. You can also request greeting resources for friendly responses.

How to install

Prerequisites: Python >= 3.13 and a working Python environment. Install the MCP dependencies for CLI support and time zone handling.

Additional sections

Configuration and runtime notes: You can start the server using the Python runtime directly or via the MCP CLI, depending on your preferred workflow. Ensure you have a compatible Python version and necessary dependencies installed. If you want to run the MCP CLI option, make sure the MCP tooling is available in your environment.

Available tools

get_date

Return the current date in YYYY-MM-DD format for the China time zone.

timestamp_to_china_date

Convert a 13-digit millisecond timestamp to a China time zone date-time string.

china_date_to_timestamp

Convert a China time zone date-time string to a 13-digit millisecond timestamp.

greeting_resource

Fetch a greeting string for a given name using the greeting resource URI.