MCP DateTime Server
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., "@MCP DateTime Serverwhat's the current time in Tokyo?"
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.
MCP Current Time Server
A minimal Model Context Protocol (MCP) server that provides current local datetime information. This server serves as a blueprint for building simple, single-purpose MCP servers.
Features
current-time: Get current local datetime in a simple single-line format
Related MCP server: MCP Time Server
Quick Start
Prerequisites
Bun runtime
Installation
# Clone and navigate to project
git clone <repository-url>
cd mcp-datetime
# Install dependencies
bun install
# Make executable
chmod +x src/index.tsRun Server
bun run src/index.tsConfiguration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"datetime": {
"command": "bun",
"args": ["/absolute/path/to/mcp-datetime/src/index.ts"]
}
}
}VS Code MCP Extension
{
"mcp": {
"servers": {
"datetime": {
"command": "bun",
"args": ["/absolute/path/to/mcp-datetime/src/index.ts"]
}
}
}
}Usage Example
{
"tool": "current-time",
"parameters": {
"timezone": "America/New_York"
}
}Response:
Monday, January 15, 2024 at 2:30:45 PM ESTDevelopment
Scripts
# Run server
bun run src/index.ts
# Run tests
bun test
# Build for production
bun build src/index.ts --outdir=distProject Structure
src/
├── index.ts # Main entry point
├── server/
│ └── datetime-server.ts # MCP server configuration
├── tools/
│ ├── current-time.ts # Current time tool
│ └── current-time.test.ts # Unit tests
├── utils/
│ └── datetime-utils.ts # Shared utilities
└── types/
└── datetime.types.ts # Type definitionsExtending This Blueprint
This minimal server is designed to be easily extended:
Add new tools: Create
src/tools/new-tool.tsand register indatetime-server.tsAdd resources: Create
src/resources/new-resource.tsand register indatetime-server.tsAdd validation: Use Zod schemas for input validation
Add tests: Create
.test.tsfiles alongside your tools
Testing
Run the test suite:
bun testTroubleshooting
Common Issues
Permission Denied: Make sure
src/index.tsis executablechmod +x src/index.tsTimezone Issues: Ensure valid IANA timezone identifiers are used
License
MIT License - see LICENSE file for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/gnokit/mcp-datetime'
If you have feedback or need assistance with the MCP directory API, please join our Discord server