MCP 时间服务器示例 (MCP Time Server Demo)
@bondzhan
MCP 时间服务器示例 (MCP Time Server Demo) について
概要はまだありません
基本情報
設定
ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is MCP 时间服务器示例 (MCP Time Server Demo)?
这是一个基于模型上下文协议 (MCP) 使用 TypeScript 和 @modelcontextprotocol/sdk 构建的简单服务器示例,提供一个获取当前时间的工具,并支持可选的 IANA 时区参数。适用于任何支持 MCP 的客户端,如 Claude Desktop 或 MCP Inspector。
How to use MCP 时间服务器示例 (MCP Time Server Demo)?
克隆仓库后运行 npm install 安装依赖,然后运行 npm run build 编译 TypeScript,最后运行 npm start 启动服务器。该服务器通过标准输入/输出进行通信,无需额外配置即可与 MCP 客户端集成。
Key features of MCP 时间服务器示例 (MCP Time Server Demo)
- 提供
getCurrentTime工具获取当前时间 - 支持可选的 IANA 时区参数(如
Asia/Shanghai) - 未提供时区或时区无效时返回服务器本地时间
- 与任何 MCP 兼容客户端集成
- 基于 Stdio 通信,易于集成和使用
Use cases of MCP 时间服务器示例 (MCP Time Server Demo)
- 在聊天应用中快速获取当前时间并指定时区
- 在 MCP 客户端中演示和测试时间工具功能
- 作为学习 MCP 服务器开发的最小示例项目
- 集成到工作流中获取统一的时间戳
FAQ from MCP 时间服务器示例 (MCP Time Server Demo)
这个服务器需要什么运行环境?
需要 Node.js(建议 LTS 版本)和 npm(通常随 Node.js 一起安装)。
如何指定时区来获取时间?
调用 getCurrentTime 工具时传入 timezone 参数,值为 IANA 时区标识符,例如 America/New_York 或 Asia/Shanghai。如果不传或传入无效时区,将返回服务器本地时间。
服务器如何与客户端通信?
它使用 Stdio(标准输入/输出)作为通信方式,遵循 MCP 协议,可被任何支持 MCP 的客户端调用。
这个服务器支持哪些 MCP 客户端?
它兼容任何支持 MCP 的客户端,例如 Claude Desktop 或 MCP Inspector,并可在这些客户端中直接调用工具。
「生産性」の他のコンテンツ
MCP Windows Desktop Automation
mario-andreschakA Model Context Protocol (MCP) server for Windows desktop automation using AutoIt.
Outlook Calendar MCP Tool
merajmehrabiA Model Context Protocol (MCP) server that allows Claude to access and manage your local Microsfot Outlook calendar (Windows only).
🚀 Time MCP Server: Giving LLMs Time Awareness Capabilities
yokingma⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
MCP SAP GUI Server
mario-andreschakMCP server that allows simple SAP GUI interaction for LLM models using simulated mouse clicks and keyboard input.
ATLAS: Task Management System
cyanheadsA Model Context Protocol (MCP) server for ATLAS, a Neo4j-powered task management system for LLM Agents - implementing a three-tier architecture (Projects, Tasks, Knowledge) to manage complex workflows. Now with Deep Research.
コメント