Time MCP Server
Built as a Node.js application using the MCP SDK to provide time-related functionality
Uses npm for package management and includes build scripts for TypeScript compilation
Implemented in TypeScript with proper type definitions and compilation to JavaScript
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Time MCP Serverwhat time is it in Tokyo right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Time MCP Server
A Model Context Protocol (MCP) server that provides time and date information for AI assistants like Claude in VSCode.
Features
Current Time: Get the current time in various formats
Timezone Support: Query time in different timezones
Detailed Info: Get comprehensive time information including day of week, timestamp, etc.
Multiple Formats: Support for 12-hour, 24-hour, and ISO formats
Related MCP server: Timezone MCP Server
Available Tools
get_current_time
Get the current date and time with formatting options.
Parameters:
timezone(optional): Timezone identifier (e.g., "America/New_York", "Europe/London", "Asia/Tokyo")format(optional): Time format - "12hour" (default), "24hour", or "iso"
Examples:
"What time is it?"
"Get current time in Tokyo"
"Show me the time in 24-hour format"
get_time_info
Get detailed time information including timezone data, day of week, and timestamps.
Parameters:
timezone(optional): Timezone identifier
Examples:
"Give me detailed time information"
"Show time info for London timezone"
Prerequisites
Node.js (v18 or higher)
npm
Docker Desktop (for Docker builds)
Install via:
brew install --cask dockerOr download from https://www.docker.com/products/docker-desktop/
Important: You need Docker Desktop (full app), not just Docker CLI
Installation
Local Development
Clone or create the project:
mkdir time-mcp-server cd time-mcp-serverInstall dependencies:
npm installBuild the project:
npm run build
Docker Deployment
Prerequisites: Ensure Docker Desktop is running
# Check Docker is running
docker ps
# If not running, start Docker Desktop
open -a Docker # or open -a "Docker Desktop"Build and run with Docker Compose:
docker-compose up -dOr build manually:
docker build -t time-mcp-server . docker run -d --name time-mcp-server time-mcp-serverView logs:
docker-compose logs -f time-mcp-server
Configuration
Configuration
Local Development - Claude in VSCode
For local Node.js execution:
{
"servers": {
"time-server": {
"command": "node",
"args": ["dist/index.js"],
"env": {},
"cwd": "."
}
}
}Docker Deployment - Claude in VSCode
Option 1: Docker Exec (Recommended)
For a running Docker container:
{
"servers": {
"time-server": {
"command": "docker",
"args": ["exec", "-i", "time-mcp-server", "node", "dist/index.js"],
"env": {}
}
}
}Option 2: Docker Run (Creates new container each time)
{
"servers": {
"time-server": {
"command": "docker",
"args": ["run", "--rm", "-i", "time-mcp-server"],
"env": {}
}
}
}Combined Configuration (Both Docker and Local)
Use this configuration to have both options available simultaneously:
{
"servers": {
"time-server-docker": {
"command": "docker",
"args": ["exec", "-i", "time-mcp-server", "node", "dist/index.js"],
"env": {}
},
"time-server-local": {
"command": "node",
"args": ["dist/index.js"],
"env": {},
"cwd": "."
}
}
}Benefits of combined configuration:
✅ Fallback options - If Docker is down, local still works
✅ Performance testing - Compare Docker vs local performance
✅ Development flexibility - Switch between deployment methods
✅ Redundancy - Multiple servers provide the same functionality
Note: Place your mcp.json file in the project root directory (same level as package.json) for relative paths to work correctly.
Configuration Steps
For Docker Setup:
Start your Docker container:
docker-compose up -dVerify container is running:
docker ps | grep time-mcp-serverUpdate mcp.json with Docker configuration
For Local Setup:
Build the project:
npm run build # or ./ci.shPlace mcp.json in project root (same directory as package.json)
Test it works:
npm test
For Combined Setup:
Ensure both are working (Docker container running + local build exists)
Place the mcp.json in your project root directory
Use the combined mcp.json configuration above
Testing Your Configuration
Test Docker version:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | docker exec -i time-mcp-server node dist/index.jsTest local version:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node dist/index.jsCheck logs:
# Docker logs
docker-compose logs -f time-mcp-server
# Local logs appear in terminal when runningQuick Start Guide
Build everything with CI script:
chmod +x ci.sh ./ci.shFor Docker deployment:
# Ensure Docker Desktop is running docker ps # Build with Docker BUILD_TYPE=docker ./ci.sh # Start the container docker-compose up -dConfigure Claude in VSCode with appropriate
mcp.json
Usage Examples
Once configured with Claude in VSCode, you can ask natural language questions:
"What time is it?" → Returns current time
"What time is it in New York?" → Returns time in EST/EDT
"Show me the time in 24-hour format" → Returns time in 24-hour format
"Get detailed time information" → Returns comprehensive time data
"What day is today?" → Uses detailed info to show current day
Development
Project Structure
time-mcp-server/
├── src/
│ └── index.ts # Main server code
├── dist/ # Built JavaScript (generated)
├── ci.sh # CI/CD build script
├── Dockerfile # Docker image definition
├── docker-compose.yml # Docker orchestration
├── .dockerignore # Docker build exclusions
├── package.json
├── tsconfig.json
├── .gitignore
└── README.mdLocal Development Scripts
npm run build- Build TypeScript to JavaScriptnpm run dev- Build and run the server (for MCP clients)npm start- Run the built server (for MCP clients)npm test- Quick test to verify server is working
CI/CD Build Script
Use the included ci.sh script for automated building and testing:
# Make executable (first time only)
chmod +x ci.sh
# Basic build and test
./ci.sh
# Docker build only
BUILD_TYPE=docker ./ci.sh
# Full build (local + Docker)
BUILD_TYPE=all ./ci.sh
# Skip tests
RUN_TESTS=false ./ci.sh
# Custom Docker tag
BUILD_TYPE=docker DOCKER_TAG=v1.0.0 ./ci.sh
# CI environment
CI=true ./ci.shCI Script Features:
✅ Prerequisite checking (Node.js, Docker)
✅ Automated building (TypeScript + Docker)
✅ Comprehensive testing (tool listing, function calls)
✅ Cross-platform compatibility (macOS/Linux)
✅ Color-coded output and error handling
✅ Build artifact generation
Testing
Quick Test:
npm testManual Testing:
# Test tool listing
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node dist/index.js
# Test getting current time
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_current_time", "arguments": {}}}' | node dist/index.jsNote: npm start and npm run dev will appear to "hang" - this is normal! The server is waiting for MCP protocol messages on stdin. Use the test commands above or configure with Claude to interact with it.
Supported Timezones
The server supports any valid IANA timezone identifier, including:
America/New_YorkEurope/LondonAsia/TokyoAustralia/SydneyUTC
Dependencies
@modelcontextprotocol/sdk- Official MCP SDKtypescript- TypeScript compiler@types/node- Node.js type definitions
License
MIT
Contributing
Fork the repository
Create a feature branch
Make your changes
Build and test:
npm run buildSubmit a pull request
Troubleshooting
Common Issues
"No inputs were found" error:
Ensure the
src/index.tsfile existsRun
npm run buildafter creating the file
Docker not working:
Ensure Docker Desktop is installed and running:
brew install --cask dockerStart Docker Desktop:
open -a Docker(wait for whale icon in menu bar)Verify with:
docker ps(should not show connection errors)Docker Desktop takes 30-60 seconds to fully start after launching
Server appears to hang:
This is normal behavior! The server waits for MCP protocol messages on stdin
Use
npm testfor quick verification, or configure with Claude for actual usageThe server only responds when it receives proper JSON-RPC messages
TypeScript errors:
Make sure all dependencies are installed:
npm installCheck TypeScript version compatibility
Debug Mode
Add console logging by setting environment variables:
{
"servers": {
"time-server": {
"command": "node",
"args": ["/path/to/dist/index.js"],
"env": {
"DEBUG": "true"
}
}
}
}Version History
0.1.0 - Initial release with basic time functionality
Available Tools
2 toolsget_current_timeB
Get the current date and time
| Name | Required | Description | Default |
|---|---|---|---|
| timezone | No | Timezone (optional, defaults to system timezone) | system |
| format | No | Time format: "12hour", "24hour", or "iso" (default: 12hour) | 12hour |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool gets the current date and time, implying a read-only operation, but doesn't mention any behavioral traits like performance, caching, rate limits, or error handling. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized, making it easy to parse and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output format, which could help the agent use it more effectively in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with clear documentation for both parameters (timezone and format), including defaults and enum values. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Get') and resource ('current date and time'), making it easy to understand what the tool does. However, it doesn't distinguish this tool from its sibling 'get_time_info', which might have overlapping functionality, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its sibling 'get_time_info' or any alternatives. It lacks context about specific use cases, prerequisites, or exclusions, leaving the agent without direction on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_time_infoC
Get detailed time information including timezone, day of week, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| timezone | No | Timezone (optional, defaults to system timezone) | system |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions what information is returned but does not disclose behavioral traits such as whether it's a read-only operation, error handling, or performance characteristics. The description is minimal and lacks critical context for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with every part contributing to clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It does not explain what 'detailed time information' includes beyond examples, nor does it cover return values or potential errors. For a tool with no structured support, more context is needed to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the single parameter 'timezone' well-documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, so it meets the baseline for high schema coverage without compensating with extra semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'detailed time information', specifying what information is included (timezone, day of week, etc.). It distinguishes itself from the sibling 'get_current_time' by implying more comprehensive data, though not explicitly contrasting them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling 'get_current_time', nor does it mention any prerequisites or exclusions. Usage is implied by the name and description but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
- First observed
get_current_time - First observed
get_time_info
TDQS
The two tools have overlapping purposes: both retrieve time-related information, with 'get_current_time' focusing on basic date/time and 'get_time_info' adding details like timezone and day of week. This creates ambiguity as an agent might struggle to choose between them for general time queries, since their boundaries are unclear and they could be confused for similar tasks.
The tool names follow a consistent verb_noun pattern with 'get_' prefix and snake_case formatting throughout. Both tools start with 'get_' followed by descriptive nouns ('current_time', 'time_info'), making the naming predictable and readable without any deviations or mixed conventions.
With only 2 tools, the server feels too thin for a time-related domain, as it lacks basic operations like time conversion, timezone handling, or scheduling functions. This minimal set limits functionality and suggests an incomplete scope, making it borderline inadequate for typical time management tasks.
The tool surface is significantly incomplete for a time server domain. It only provides retrieval functions without essential operations such as time conversion between zones, date arithmetic, scheduling, or alarm setting. These gaps will likely cause agent failures when trying to perform common time-related workflows beyond simple queries.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Get the current time in your preferred timezone or any region you specify. Browse concise informat…
Current time, timezone conversion & date math for AI agents. On Cloudflare Workers.
Current time in any IANA time zone, plus the full time-zone list. Via timeapi.io.
Related MCP Servers
- AlicenseBqualityDmaintenanceGives large language models time awareness capabilities through various time-related functions including current time retrieval, timezone conversion, and relative time calculations.61,823MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to get current time information for any timezone worldwide, including available regions, cities, and ISO 8601 formatted timestamps with timezone offsets.8-
- AlicenseAqualityCmaintenanceProvides LLMs with current date and time information across any timezone, with configurable defaults and support for IANA timezone identifiers.1303Apache 2.0
- AlicenseAqualityNot gradedmaintenanceProvides 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.47-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tinytelly/mcp-time'
If you have feedback or need assistance with the MCP directory API, please join our Discord server