简单时间MCP服务器

简单时间MCP服务器

一个提供当前时间服务的简单MCP服务器。

快速入门

  1. 克隆仓库: git clone https://github.com/Anragde/simple-time-mcp-server.git cd simple-time-mcp-server

  2. 安装依赖: npm install

  3. 启动开发模式: npm run dev

  4. 或启动生产模式: npm start

  5. 默认运行在端口3000,可通过环境变量PORT修改。

使用方法

  • 获取当前时间:向 /mcp 发送 JSON-RPC 请求,调用 getCurrentTime 方法。
  • 获取指定时区时间:调用 getTimeInTimezone 方法并设置参数。
  • 检查健康状态:访问 /health 路径。