A lightweight time-checking tool for AI companions built on Cloudflare Workers.
Built by KnowinglyAI - March 2026
Super Easy Way:
- Mac/Linux: Run
./deploy.sh - Windows: Run
deploy.bat
Manual Way:
- Download the project files
- Open terminal in the folder
- Login to Cloudflare
npx wrangler login- Deploy
npx wrangler deploy- Copy the URL it gives you
- Add to Claude Desktop config (see step 2 below)
That's it! No account ID needed, no complex setup.
Gives AI companions the ability to check current time in any timezone. Returns both UTC timestamp and human-readable local time.
Option A: CLI Deployment (Recommended)
- Download all the project files to a folder
- Open terminal in that folder
- Log into Cloudflare:
npx wrangler login
- Deploy the Worker:
npx wrangler deploy
- Note the URL it gives you (will be something like
https://time-mcp.your-subdomain.workers.dev)
Option B: Web Interface
- Log into your Cloudflare account
- Go to Workers & Pages
- Create a new Worker
- Copy the code from
time-mcp-worker.jsinto the Worker editor - Deploy it
- Note your Worker URL (will be something like
https://time-mcp.your-subdomain.workers.dev)
The MCP server connects Claude to your Worker.
- Navigate to the project folder in terminal
- Install dependencies:
npm install
Location:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Add this to your mcpServers section:
"time-check": {
"command": "node",
"args": ["/full/path/to/time-mcp/time-mcp-server.js"],
"env": {
"TIME_WORKER_URL": "https://time-mcp.your-subdomain.workers.dev",
"DEFAULT_TIMEZONE": "America/Toronto"
}
}Replace:
/full/path/to/time-mcp/time-mcp-server.jswith the actual path to the server file- Windows: Use
C:\\Users\\YourName\\path\\to\\time-mcp\\time-mcp-server.js(double backslashes) - Mac/Linux: Use
/Users/yourname/path/to/time-mcp/time-mcp-server.js(forward slashes)
- Windows: Use
https://time-mcp.your-subdomain.workers.devwith your Worker URL from step 1America/Torontowith your preferred timezone (or omit this line to use UTC as default)
Environment Variables Explained:
TIME_WORKER_URL(required): Your Cloudflare Worker URLDEFAULT_TIMEZONE(optional): Sets the default timezone when none is specified- If omitted, defaults to UTC
- Can be any IANA timezone identifier (see Supported Timezones below)
- Can still be overridden per-call by specifying a timezone parameter
The time-check tool should now be available! Start a new chat, and ask Claude to tell you the time.
Tool Call:
check_time(timezone?: string)
Response Format:
{
"utc": "2026-03-16T22:31:00.000Z",
"local_time": "6:31 PM",
"date": "Sunday, March 16, 2026",
"timezone": "EDT",
"full_timezone": "America/Toronto"
}The tool will use your DEFAULT_TIMEZONE from the config, or you can specify a different timezone when calling it.
Edit your Claude Desktop config and edit the DEFAULT_TIMEZONE in the env section. For example:
"env": {
"TIME_WORKER_URL": "https://time-mcp.your-subdomain.workers.dev",
"DEFAULT_TIMEZONE": "America/Los_Angeles"
}Restart Claude Desktop. No code changes needed.
Edit line 25 in time-mcp-worker.js:
let timezone = 'UTC'; // Change this to your timezoneSave the file, then redeploy:
npx wrangler deployNote: The environment variable method is preferred because it doesn't require redeploying the Worker.
Any IANA timezone identifier works:
UTC- Coordinated Universal TimeAmerica/New_York- Eastern Time (EST/EDT)America/Toronto- Eastern Time (EST/EDT)America/Los_Angeles- Pacific Time (PST/PDT)America/Chicago- Central Time (CST/CDT)Europe/London- UK Time (GMT/BST)Europe/Paris- Central European TimeAsia/Tokyo- Japan Standard Time- And many more...
In Identity Skills or User Preferences: Add guidance like:
- Check time at session start
- Check time when user returns from being away
- Check time organically when it feels relevant
Example Usage:
"I just checked and it's 6:31 PM on Sunday, March 16th - we've been talking for about 35 minutes since you came back."
Tool not showing up?
- Make sure you restarted Claude Desktop completely (not just minimized)
- Check that your Worker URL is correct in the config
- Verify the file path to
time-mcp-server.jsis correct- Windows: Use double backslashes
\\in paths - Mac/Linux: Use forward slashes
/in paths
- Windows: Use double backslashes
Time showing wrong timezone?
- Check the
DEFAULT_TIMEZONEin your Claude Desktop config - Make sure you're using a valid IANA timezone identifier
- Remember to restart Claude Desktop after config changes
Worker returning errors?
- Check the Cloudflare Workers logs in your dashboard
- Verify the Worker is deployed and accessible by visiting the URL in a browser
- Make sure the
TIME_WORKER_URLin your config matches your actual Worker URL
"Worker returned 404: Not Found"
- The
TIME_WORKER_URLin your config is incorrect - Copy the exact URL from your Cloudflare dashboard
- Make sure it includes
https://at the start
Free! Runs on Cloudflare's free tier:
- 100,000 requests per day
- This simple Worker will easily stay within free limits
- Even checking every minute = only 1,440 requests per day
Your Cloudflare Worker is publicly accessible (anyone with the URL can check the time). This is fine! It only returns the current time - no personal information or security risk. It's like having a public clock on a website.
This is open source. Feel free to share with anyone who wants their AI companion to have time awareness!
MIT License - Use freely, modify as needed, share with others.