Time MCP Server
@petrarca
关于 Time MCP Server
Time MCP Server providing time-related tools with timezone support
基本信息
配置
工具
3`date_format` (optional): Format string for the datetime (e.g., '%Y-%m-%d %H:%M:%S')
A dictionary with the current time in ISO format and the requested format
A dictionary with year, month, day, hour, minute, second, microsecond, and weekday
概览
What is Time MCP Server?
Time MCP Server is a Model Context Protocol (MCP) server that provides time-related tools for Large Language Models. Built with FastMCP 2.0, it lets LLMs retrieve the current date, time, and time components using standard MCP tool calls.
How to use Time MCP Server?
Clone the repository, run task setup to create a virtual environment, then task install to install the package. Start the server with task run (uses stdio transport by default). You can also run with HTTP transport via task run -- --transport streamable-http --port 9000. Connect an MCP client and call get_current_time or get_time_components.
Key features of Time MCP Server
- Provides
get_current_timetool with optional custom date formatting - Provides
get_time_componentstool returning year, month, day, etc. - Supports stdio transport by default; HTTP transport also available
- Works out of the box with Claude Desktop via stdio
- Written in Python 3.12+ with FastMCP 2.0
- Includes tests using FastMCP's in-memory client
Use cases of Time MCP Server
- Let an LLM answer "What's the current time?" with real system time
- Provide formatted date strings (e.g., "YYYY-MM-DD HH:MM:SS") to an LLM
- Allow an LLM to determine today's day of the week
- Enable an LLM to break current time into individual components (hour, minute, etc.)
FAQ from Time MCP Server
What tools does Time MCP Server provide?
It provides two tools: get_current_time (returns the current time in ISO and a custom format) and get_time_components (returns year, month, day, hour, minute, second, microsecond, and weekday).
How do I run Time MCP Server?
Use the task runner: task run for the default stdio transport. To use HTTP, run task run -- --transport streamable-http --port 9000.
Can I use HTTP instead of stdio?
Yes. Pass the --transport streamable-http and --port 9000 options when starting the server, either via task run -- or directly with python -m time_mcp_server.main.
What prerequisites are needed?
Python 3.12 or higher, uv for package management, and Task as the task runner.
How do I connect Time MCP Server to Claude Desktop?
Add a JSON entry to Claude Desktop's MCP configuration file (under Settings > Developer > Edit Config) with the command path to uv and the appropriate arguments pointing to your project directory.
生产力 分类下的更多 MCP 服务器
Swift MCP GUI Server
NakaokaReiMCP server that can execute commands such as keyboard input and mouse movement on macOS
MCPControl
CheffromspaceMCP server for Windows OS automation
MCP Shrimp Task Manager
cjo4m06Shrimp Task Manager is a task tool built for AI Agents, emphasizing chain-of-thought, reflection, and style consistency. It converts natural language into structured dev tasks with dependency tracking and iterative refinement, enabling agent-like developer behavior in reasoning A
Computer Control MCP
AB498MCP server that provides computer control capabilities, like mouse, keyboard, OCR, etc. using PyAutoGUI, RapidOCR, ONNXRuntime. Similar to 'computer-use' by Anthropic. With Zero External Dependencies.
🚀 TaskMaster: Todoist MCP for Cursor AI
mingolladanieleA lightweight Model Context Protocol (MCP) server that enables natural language interaction with your Todoist tasks directly from your IDE. Built with simplicity and maintainability in mind.
评论