An MCP server for getting current time in ISO format (YYYY-MM-DD HH:mm:ss) using JavaScript Date. This server works with the Claude desktop app on both Windows and macOS.
getCurrentTime
{
"time": "2024-02-08 11:04:33",
"success": true
}
Example JSON-RPC request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "getCurrentTime"
}
Example JSON-RPC response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"time": "2024-02-08 11:04:33",
"success": true
}
}
getTimeDifference
timestamp
: ISO format timestamp (YYYY-MM-DD HH:mm:ss)interval
: 'minutes' (default) or 'seconds'Example JSON-RPC request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTimeDifference",
"params": {
"timestamp": "2024-02-08 12:30:00",
"interval": "minutes"
}
}
Example JSON-RPC responses:
// For a past timestamp (30 minutes ago)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difference": -30,
"interval": "minutes",
"inputTimestamp": "2024-02-08 12:30:00",
"currentTime": "2024-02-08 13:00:00"
}
}
// For a future timestamp (in 45 minutes)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difference": 45,
"interval": "minutes",
"inputTimestamp": "2024-02-08 13:45:00",
"currentTime": "2024-02-08 13:00:00"
}
}
npm install @dandeliongold/mcp-time
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"time": {
"command": "npx",
"args": [
"@dandeliongold/mcp-time"
]
}
}
}
npm install
npm test
npm run dev
MIT License - see LICENSE for details
{
"mcpServers": {
"time": {
"env": {},
"args": [
"@dandeliongold/mcp-time"
],
"command": "npx"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.