Get the FREE Ultimate OpenClaw Setup Guide →

time

⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities

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

How to use

The Time MCP Server provides LLMs with time-awareness capabilities through a set of tools. It exposes functions such as current_time (to fetch the current UTC and local times), relative_time (to compute relative dates or durations), get_timestamp (to obtain precise timestamps), days_in_month (to determine the number of days in a given month), convert_time (to convert times between time zones), and get_week_year (to retrieve the current week number and ISO week-year). These tools can be invoked by your LLM prompts to fetch real-time or timezone-aware information, enabling more contextually accurate responses in time-sensitive scenarios. Once installed, you can call time-mcp from your client using standard MCP endpoints exposed by the server, and your LLM should receive structured time data in response to queries like “What time is it in Tokyo?”, “How many days are in February 2024?”, or “Convert 2:00 PM from New York to Tokyo.”

To use the tools in your conversations, simply reference the time-mcp MCP server in your prompt or integration layer. The server handles the heavy lifting of computing and formatting the results, returning concise, usable time data for your model to incorporate into its reasoning and replies.

How to install

Prerequisites:

  • Node.js and npm installed on your machine (or use an environment with npx available).
  • Internet access to fetch the MCP server package from npm.

Installation steps:

  1. Install the MCP server package globally (optional but convenient):
npm install -g time-mcp
  1. Run the MCP server using npx (no global install required):
npx -y time-mcp
  1. If you want to integrate with Claude or Windsurf, follow the repository guidance to add the MCP server reference in your client config:
  • For Claude Code, add:
claude mcp add time-mcp -- npx -y time-mcp
  • For Windsurf, include in model_config.json:
{
  "mcpServers": {
    "time-mcp": {
      "command": "npx",
      "args": ["-y", "time-mcp"]
    }
  }
}
  1. Verify installation by listing MCPs (example):
claude mcp list

You should see time-mcp listed.

Additional notes

Tips and caveats:

  • Ensure Node.js/npm are up to date to avoid compatibility issues with npx.
  • If you prefer not to use npx every time, install time-mcp globally and run it directly.
  • When embedding in Claude Code or Windsurf, ensure your client configuration points to the correct MCP server name (time-mcp) and that the command/args match how you launch it in your environment.
  • Some environments may restrict npx usage; in such cases, use a local global install or containerized runtime if supported.
  • If you encounter connectivity or latency issues, confirm network access to npm registry and that your runtime supports spawning child processes for MCP calls.
  • You can extend usage with custom prompts that explicitly request time data, for example: "Ask time-mcp to convert 9:00 AM to PST on the current date."

Related MCP Servers

Sponsor this space

Reach thousands of developers