MCP Node Time
A MCP server that provides timezone-aware date and time operations. This server addresses the common issue where AI assistants provide incorrect date information due to timezone confusion.
README
Time Node MCP Server
A Model Context Protocol (MCP) server that provides timezone-aware date and time operations. This server addresses the common issue where AI assistants provide incorrect date information due to timezone confusion.
Features
- Accurate timezone handling - Get current time in any IANA timezone
- Time conversion - Convert time between different timezones
- Multiple formats - ISO 8601, localized, and human-readable formats
- System timezone detection - Automatically detect system timezone
- DST awareness - Correctly handles Daylight Saving Time transitions
- Date utilities - Get current date with day-of-week information
Installation
Prerequisites
- Node.js 18.0.0 or higher
- npm or yarn
Install and Build
# Clone or download the project
cd time-node-mcp
# Install dependencies
npm install
# Build the TypeScript code
npm run build
Usage with Claude Desktop
Add the following configuration to your Claude Desktop settings file:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"time-node-mcp": {
"command": "node",
"args": ["/path/to/time-node-mcp/dist/index.js"]
}
}
}
Replace /path/to/time-node-mcp/ with the actual path to your installation directory.
Available Tools
1. get_current_time
Get the current date and time in a specific timezone.
Parameters:
timezone(required): IANA timezone identifier (e.g., "America/New_York", "Europe/London")format(optional): Output format - "iso", "local", or "full" (default: "iso")
Example:
{
"timezone": "America/New_York",
"format": "full"
}
2. convert_time
Convert time from one timezone to another.
Parameters:
sourceTimezone(required): Source IANA timezone identifiertargetTimezone(required): Target IANA timezone identifiertime(required): Time in HH:MM or HH:MM:SS format (24-hour)date(optional): Date in YYYY-MM-DD format (uses current date if not provided)
Example:
{
"sourceTimezone": "America/New_York",
"targetTimezone": "Europe/London",
"time": "14:30",
"date": "2024-08-12"
}
3. get_system_timezone
Get the system's current timezone with current time information.
Parameters: None
4. get_current_date
Get the current date in a specific timezone with day-of-week information.
Parameters:
timezone(required): IANA timezone identifierincludeTime(optional): Whether to include time information (default: false)
Example:
{
"timezone": "Asia/Tokyo",
"includeTime": true
}
Development
Scripts
# Build the project
npm run build
# Build and watch for changes
npm run dev
# Run the server directly (after building)
npm start
# Lint the code
npm run lint
# Type check
npm run typecheck
Project Structure
time-node-mcp/
├── src/
│ ├── index.ts # Main MCP server implementation
│ ├── time-service.ts # Core time/timezone functionality
│ └── interfaces.ts # TypeScript interfaces
├── dist/ # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.md
Common Use Cases
- Correct current date/time: When Claude needs to know "what day is today" in your timezone
- Meeting scheduling: Convert meeting times between different timezones
- Travel planning: Understand time differences when traveling
- International coordination: Work with teams across multiple timezones
Timezone Support
This server supports all IANA timezone identifiers, including:
America/New_YorkEurope/LondonAsia/TokyoAustralia/SydneyPacific/Auckland- And many more...
You can find a complete list of supported timezones at: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Error Handling
The server provides comprehensive error handling for:
- Invalid timezone identifiers
- Malformed time formats
- Invalid date formats
- System errors
All errors are returned in a structured JSON format with descriptive messages.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
License
MIT License - see LICENSE file for details.
Troubleshooting
Common Issues
"Invalid timezone" error:
- Ensure you're using valid IANA timezone identifiers
- Check spelling and capitalization (e.g., "America/New_York", not "america/new_york")
MCP server not connecting:
- Verify the path in your Claude Desktop configuration is correct
- Ensure the project is built (
npm run build) - Check that Node.js is installed and accessible
Date/time seems incorrect:
- The server uses your system's current date/time as the base
- Ensure your system clock is correct and timezone is properly set
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。