mcpField
本
本地时间获取服务

本地时间获取服务

Local
github.com/panpeter2024Other4Updated 76w ago

About 本地时间获取服务

A local date and time MCP server built with FastMCP. It lets LLMs query the current date, time, weekday, and timestamp through an MCP client, including an ISO 8601 date-time format.

Key features

  1. 01Get the current date and time
  2. 02Check the weekday
  3. 03Get a Unix timestamp
  4. 04Return ISO 8601 date-time

Use cases

  1. 01Answer questions about the current time
  2. 02Determine today's date and weekday
  3. 03Retrieve the current Unix timestamp
  4. 04Produce an ISO 8601 date-time

MCP support

Provides local date and time query tools to MCP clients through an SSE MCP service.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

DateServer MCP 服务

本项目为基于 FastMCP 的本地日期与时间工具服务,支持 MCP 协议,可在本地运行并通过 Cherry Studio 等 MCP 客户端调用。


部署与使用说明

1. 环境准备
  • 推荐 Python 3.8 及以上版本
  • 建议使用虚拟环境隔离依赖
2. 克隆代码
git clone https://github.com/panpeter2024/date_mcp
cd date_mcp
3. 创建虚拟环境并安装依赖
macOS/Linux
python3 -m venv venv
source venv/bin/activate
pip install fastmcp
Windows
python -m venv venv
venv\Scripts\activate
pip install fastmcp
4. 启动服务
  • macOS/Linux:
    nohup venv/bin/python server_date.py > mcp.log 2>&1 &
    
  • Windows:
    python server_date.py
    
5. 在 Cherry Studio 配置 MCP 服务
  • 服务名称:本地日期服务
  • MCP服务地址:http://127.0.0.1:9000/sse
  • 传输方式:SSE
  • 认证/Key:留空
6. 常用命令
  • 查看日志:
    • macOS/Linux:
      tail -f mcp.log
      
    • Windows:
      type mcp.log
      
  • 停止服务:
    • macOS/Linux:
      ps aux | grep server_date.py
      kill <进程号>
      
    • Windows: 在任务管理器中结束 python.exe 进程,或关闭命令行窗口。

工具列表

  • get_current_date:获取当前日期(YYYY-MM-DD)
  • get_current_time:获取当前时间(HH:MM:SS)
  • get_current_weekday:获取今天是星期几(中文)
  • get_current_timestamp:获取当前Unix时间戳(秒)
  • get_current_iso_datetime:获取当前日期和时间(ISO 8601 格式)

说明

  • 本服务仅在本地运行,无需公网暴露。
  • 如需自定义端口或扩展功能,请修改 server_date.py。

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.