简单时间MCP服务器
一个提供当前时间服务的简单MCP服务器。
快速入门
-
克隆仓库: git clone https://github.com/Anragde/simple-time-mcp-server.git cd simple-time-mcp-server
-
安装依赖: npm install
-
启动开发模式: npm run dev
-
或启动生产模式: npm start
-
默认运行在端口3000,可通过环境变量PORT修改。
使用方法
- 获取当前时间:向
/mcp
发送 JSON-RPC 请求,调用getCurrentTime
方法。 - 获取指定时区时间:调用
getTimeInTimezone
方法并设置参数。 - 检查健康状态:访问
/health
路径。