Date MCP Server
Provides AI assistants with real-time date, time, and timezone information, enabling them to access current temporal data, format dates, calculate day of week, and work with different timezones.
README
@ainarsklavins/date-mcp
An MCP server that provides real-time date, time, and timezone information to AI assistants.
Why Use This?
AI models don't inherently know the current date or time. This MCP server solves that by providing tools that return accurate, real-time temporal information.
Installation
Claude Desktop
Add to your Claude Desktop configuration file:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}
Claude Code (CLI)
claude mcp add --scope user date-mcp -- npx -y @ainarsklavins/date-mcp
<details> <summary>Manual configuration</summary>
Add to ~/.claude/settings.json:
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}
</details>
VS Code
Or manually add to your VS Code MCP settings (Ctrl+Shift+P → "MCP: Open User Configuration"):
{
"servers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}
Cursor
Add to Cursor's MCP settings (Settings → MCP Servers):
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"date-mcp": {
"command": "npx",
"args": ["-y", "@ainarsklavins/date-mcp"]
}
}
}
<details> <summary>Alternative: Global Installation</summary>
npm install -g @ainarsklavins/date-mcp
Then use "command": "date-mcp" instead of npx in any configuration above.
</details>
Available Tools
| Tool | Description | Read-only |
|---|---|---|
get-current-datetime |
Get current date/time with timezone | Yes |
get-day-of-week |
Get day name for any date | Yes |
get-timezone-info |
Get timezone offset and details | Yes |
format-date |
Format dates in various styles | Yes |
All tools are read-only and have no side effects.
get-current-datetime
Returns the current date and time.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
timezone |
string | No | IANA timezone (e.g., America/New_York) |
Example:
{
"iso": "2024-12-15T14:30:00.000Z",
"formatted": "12/15/2024, 9:30:00 AM",
"timezone": "America/New_York",
"timestamp": 1734272200000
}
get-day-of-week
Returns the day of the week for a given date.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
date |
string | No | Date in YYYY-MM-DD format (defaults to today) |
locale |
string | No | Locale code (e.g., en-US, de-DE) |
Example:
{
"dayName": "Sunday",
"dayNumber": 0,
"date": "2024-12-15"
}
get-timezone-info
Returns detailed timezone information.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
timezone |
string | No | IANA timezone name |
Example:
{
"timezone": "America/New_York",
"offset": "GMT-05:00",
"abbreviation": "EST",
"currentTime": "12/15/2024, 9:30:00 AM"
}
format-date
Formats a date in various styles.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
date |
string | No | Date in ISO format (defaults to today) |
style |
string | No | short, medium, long, or full |
locale |
string | No | Locale code (e.g., en-US, fr-FR) |
Example:
{
"formatted": "December 15, 2024",
"style": "long",
"locale": "en-US",
"iso": "2024-12-15T00:00:00.000Z"
}
Supported Timezones
Uses IANA timezone database. Common examples:
America/New_York,America/Los_Angeles,America/ChicagoEurope/London,Europe/Paris,Europe/BerlinAsia/Tokyo,Asia/Shanghai,Asia/SingaporeAustralia/SydneyUTC
Full list: IANA Time Zone Database
Debugging
You can use the MCP Inspector to debug the server:
npx @modelcontextprotocol/inspector npx -y @ainarsklavins/date-mcp
Development
git clone https://github.com/ainarsklavins/date-mcp.git
cd date-mcp
npm install
npm run build
Testing Locally
Add to Claude Code with direct path:
{
"mcpServers": {
"date-mcp": {
"command": "node",
"args": ["/path/to/date-mcp/dist/index.js"]
}
}
}
License
MIT - see LICENSE
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。