Get the FREE Ultimate OpenClaw Setup Guide →

mcp-time

MCP server from dandeliongold/mcp-time

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dandeliongold-mcp-time npx -y @dandeliongold/mcp-time

How to use

This MCP server provides two JSON-RPC tools for working with the current time. The getCurrentTime tool returns the current time in ISO-like format (YYYY-MM-DD HH:mm:ss) along with a success flag. The getTimeDifference tool compares a provided ISO-like timestamp to the current time and returns a signed difference in either minutes or seconds, where positive values indicate a future timestamp and negative values indicate a past timestamp. You can invoke these tools through Claude Desktop by referencing the time MCP server as a normal MCP service, and sending JSON-RPC requests to the server.

Typical use involves requesting the current time to synchronize events or scheduling tasks, or computing how far away a given timestamp is from now. For getTimeDifference, specify the input timestamp and optionally the interval (minutes or seconds) to receive an intuitive signed difference value along with the input and current times in the response.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Internet connectivity to fetch the MCP package from npm

Installation steps:

  1. Install the MCP package directly via npm (no local install required due to npx usage):
# Optional: verify npm version
npm -v

# You can start using the MCP server directly with npx as shown in the usage example
  1. If you prefer developing locally, clone the repository that provides @dandeliongold/mcp-time, install dependencies, and run the development server as documented in their repository. The package itself is designed to be consumed by MCP clients via npx as shown in the usage section.

  2. To run the server as part of Claude Desktop integration, configure your claude_desktop_config.json to point to the mcp-time server (see the example in the README):

{
  "mcpServers": {
    "time": {
      "command": "npx",
      "args": [
        "-y",
        "@dandeliongold/mcp-time"
      ]
    }
  }
}

Notes:

  • The npx approach fetches and runs the package on demand without a global install.
  • If you want to install locally for development, you can still use npm install in a project context and reference the local path as needed.

Additional notes

Tips and notes:

  • The server uses a simple JSON-RPC interface with methods getCurrentTime and getTimeDifference. Ensure your requests follow the JSON-RPC 2.0 format.
  • For getTimeDifference, you can set interval to minutes (default) or seconds and pass a timestamp in the same YYYY-MM-DD HH:mm:ss format used by the server.
  • All times are represented in the same local time context; verify your system clock when performing time calculations.
  • If you encounter network or package resolution issues with npx, ensure npm is up to date and you have permission to install global or per-session packages as needed.
  • The MCP server is designed to be cross-platform (Windows and macOS) via Node.js runtime.

Related MCP Servers

Sponsor this space

Reach thousands of developers