Skip to main content
Glama
date-tool-mcp-vlnaim

date-tool-mcp-vlnaim

by vlnaim

date-tool-mcp-vlnaim

一个基于 FastMCP 的极简 MCP Server,提供一个日期查询工具。

功能

工具

说明

返回值

get_today

返回当前的年月日

YYYY-MM-DD,如 2026-11-26

Related MCP server: date-today-mcp

快速开始

在任意支持 MCP 的客户端(Claude Desktop、Cursor、Cherry Studio、ChatMCP 等)中添加以下配置即可使用:

{
  "mcpServers": {
    "date-tool-mcp-vlnaim": {
      "command": "python",
      "args": ["/absolute/path/to/date-tool-mcp-vlnaim/server.py"]
    }
  }
}

也可以使用 chatmcp.yaml 中提供的 config 字段,内容与上面一致。

环境要求

  • Python 3.10+

  • mcp>=1.28.1

安装

pip install -r requirements.txt

启动

默认使用 stdio 传输方式,由 MCP 客户端以子进程方式拉起,无需手动启动:

python server.py

说明:stdio 模式下服务不会监听任何端口,启动后阻塞在标准输入上等待客户端发来的 JSON-RPC 消息。因此直接单独运行本文件看不到任何输出是正常现象,请通过客户端调用。

如果 python 不在 PATH 中(例如使用 conda 虚拟环境),请改用解释器的绝对路径:

& "C:\path\to\envs\your-env\python.exe" "C:\path\to\date-tool-mcp-vlnaim\server.py"

在客户端中配置

以 langchain-mcp-adapters 为例(transport 在较新版本中为必填项):

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient(
    {
        "date-tool-mcp-vlnaim": {
            "transport": "stdio",
            "command": "python",
            "args": ["/absolute/path/to/date-tool-mcp-vlnaim/server.py"],
        }
    }
)

args 建议填 server.py 的绝对路径,因为客户端拉起子进程时的工作目录不确定。Windows 下路径需使用双反斜杠转义或原始字符串。

项目结构

date-tool-mcp-vlnaim/
├── server.py          # MCP Server 定义(FastMCP + get_today 工具)
├── requirements.txt   # 依赖
├── chatmcp.yaml       # ChatMCP 商店元数据
├── assets/icon.jpg    # 图标
├── LICENSE            # MIT 协议
├── .gitignore
└── README.md

切换到其他传输方式

如需通过 HTTP 常驻运行(SSE / Streamable HTTP),修改 server.py:

mcp = FastMCP("date-tool-mcp-vlnaim", host="127.0.0.1", port=8000)

if __name__ == "__main__":
    # SSE: 客户端连接 http://127.0.0.1:8000/sse
    mcp.run(transport="sse")
    # Streamable HTTP: 客户端连接 http://127.0.0.1:8000/mcp
    # mcp.run(transport="streamable-http")

启动后终端会显示监听地址,此时服务需保持运行,可另开终端运行客户端。注意同一时间只能占用 8000 端口,SSE 与 Streamable HTTP 不能同时启动。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides AI assistants with accurate current date and day of week information through simple tools for retrieving ISO-formatted dates and day names.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables querying current date and time via MCP tools, with timezone support and ISO 8601 formatted output.
      29,031 npm
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables natural-language retrieval of the current date through an MCP tool, with support for stdio, SSE, and Streamable HTTP transports.
      MIT