npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@odgrim/mcp-datetime

v0.2.0

Published

A TypeScript implementation of a simple MCP server that exposes datetime information to agentic systems and chat REPLs

Downloads

2,081

Readme

MCP DateTime

A TypeScript implementation of a Model Context Protocol (MCP) server that provides datetime and timezone information to agentic systems and chat REPLs.

Overview

MCP DateTime is a simple server that implements the Model Context Protocol to provide datetime and timezone information to AI agents and chat interfaces. It allows AI systems to:

  • Get the current time in the local system timezone
  • Get the current time in any valid timezone
  • List all available timezones
  • Access timezone information through URI resources

Installation

From npm

npm install -g mcp-datetime

From source

git clone https://github.com/odgrmi/mcp-datetime.git
cd mcp-datetime
npm install
npm run build

Usage

Command Line

MCP DateTime can be run in two modes:

1. Standard I/O Mode (Default)

This mode is ideal for integrating with AI systems that support the MCP protocol through standard input/output:

mcp-datetime

2. Server-Sent Events (SSE) Mode

This mode starts an HTTP server that provides SSE transport for the MCP protocol:

mcp-datetime --sse

You can also specify a custom port and URI prefix:

mcp-datetime --sse --port=8080 --prefix=/api/datetime

Environment Variables

  • PORT: Sets the port for SSE mode (default: 3000)
  • URI_PREFIX: Sets the URI prefix for SSE mode (default: none)

Available Tools

MCP DateTime provides the following tools:

get-current-time

Returns the current time in the system's local timezone.

get-current-timezone

Returns the current system timezone.

get-time-in-timezone

Returns the current time in a specified timezone.

Parameters:

  • timezone: The timezone to get the current time for (e.g., "America/New_York")

list-timezones

Returns a list of all available timezones.

Resource URIs

MCP DateTime also provides access to timezone information through resource URIs:

datetime://{timezone}

Returns the current time in the specified timezone.

Example: datetime://America/New_York

datetime://list

Returns a list of all available timezones.

Common Timezones

The following common timezones are always available:

  • UTC
  • Europe/London
  • Europe/Paris
  • Europe/Berlin
  • America/New_York
  • America/Chicago
  • America/Denver
  • America/Los_Angeles
  • Asia/Tokyo
  • Asia/Shanghai
  • Asia/Kolkata
  • Australia/Sydney
  • Pacific/Auckland

SSE Endpoints

When running in SSE mode, the following endpoints are available:

  • /sse: SSE connection endpoint
  • /message: Message endpoint for client-to-server communication
  • /info: Basic server information

If a URI prefix is specified, it will be prepended to all endpoints.

Integration with AI Systems

MCP DateTime can be integrated with AI systems that support the Model Context Protocol. This allows AI agents to access accurate timezone and datetime information.

Development

Prerequisites

  • Node.js 14.16 or higher
  • npm

Setup

git clone https://github.com/odgrim/mcp-datetime.git
cd mcp-datetime
npm install

Build

npm run build

Run in Development Mode

npm run dev        # Standard I/O mode
npm run dev:sse    # SSE mode

License

This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.