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
Quick Start
Prerequisites
- Bun runtime
Installation
Run Server
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%/Claude/claude_desktop_config.json
(Windows):
VS Code MCP Extension
Usage Example
Response:
Development
Scripts
Project Structure
Extending This Blueprint
This minimal server is designed to be easily extended:
- Add new tools: Create
src/tools/new-tool.ts
and register indatetime-server.ts
- Add resources: Create
src/resources/new-resource.ts
and register indatetime-server.ts
- Add validation: Use Zod schemas for input validation
- Add tests: Create
.test.ts
files alongside your tools
Testing
Run the test suite:
Troubleshooting
Common Issues
- Permission Denied: Make sure
src/index.ts
is executable - Timezone Issues: Ensure valid IANA timezone identifiers are used
License
MIT License - see LICENSE file for details.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Provides current local datetime information with timezone support. Serves as a minimal blueprint for building simple, single-purpose MCP servers.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that allows checking local time on the client machine or current UTC time from an NTP serverLast updated -219PythonMIT License
- -securityFlicense-qualityAn MCP server providing timezone conversions and time-related operations via RESTful API endpoints, featuring comprehensive error handling and timezone database integration.Last updated -Python
- -securityFlicense-qualityA Claude Model Configuration Protocol (MCP) server that provides real-time timezone-aware date and time information.Last updated -Python
- -securityFlicense-qualityA simple Model Context Protocol (MCP) server that provides date and time functionality in any timezone, along with user profiles and personalized greeting resources.Last updated -Python