MCP ExplorerExplorer

Datetime Mcp Server

@BfdCamposon 14 days ago
1Β MIT
FreeCommunity
AI Systems
A simple MCP server for your favourite LLM to always know accurately when the current date and time is.

Overview

What is Datetime Mcp Server

The datetime-mcp-server is a simple MCP server designed to provide accurate current date and time information to your preferred LLM (Language Model).

Use cases

Use cases include asking a virtual assistant for the current time, scheduling events, and providing time-sensitive information in conversational AI applications.

How to use

To use the datetime-mcp-server, clone the repository, install dependencies, and configure it with Claude Desktop either automatically using the MCP CLI tool or manually by editing the configuration file.

Key features

Key features include real-time date and time provision, easy installation, and compatibility with Claude Desktop for seamless integration.

Where to use

The datetime-mcp-server can be used in applications requiring accurate time information, such as chatbots, virtual assistants, and any LLM applications that need to reference the current date and time.

Content

πŸ•°οΈ Datetime MCP Server

A simple MCP server that provides the current date and time through a Claude tool.

πŸš€ Installation

# Clone the repository
git clone https://github.com/BfdCampos/datetime-mcp-server.git
cd datetime-mcp-server

# Install dependencies
uv install

πŸ”§ Setup with Claude Desktop

Method 1: Automatic Installation

Use the MCP CLI tool to install the server automatically:

uv run mcp install main.py

Method 2: Manual Configuration

Add the server to your Claude Desktop configuration file located at ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "Datetime": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/path/to/your/datetime-mcp-server/main.py"
      ]
    }
  }
}

Note: Replace /path/to/your/ with your actual paths.

πŸ€– Using with Claude Desktop

  1. Restart Claude Desktop after installation.
  2. Open the app and start a new conversation.
  3. You can now ask for the current date and time to Claude.

/path/to/your/.local/bin/uv

❓ FAQ

My Claude Desktop is not detecting the server
  • Ensure you have the latest version of Claude Desktop.
  • Restart Claude Desktop by force quitting the app and reopening it.
  • Make sure your path is correct in the configuration file.
  • Use the absolute path to your uv installation, e.g., /Users/[Your Home Directory]/.local/bin/uv in the command section of the configuration file. It should look like this:
{
  "mcpServers": {
    "Datetime": {
      "command": "/Users/[Your Home Directory]/.local/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/path/to/your/datetime-mcp-server/main.py"
      ]
    }
  }
}
I've asked Claude what the time is but it's not using the MCP server
  • LLMs like Claude may not always use the MCP server for every request. If it doesn’t use the server, try asking again or rephrasing your question specifically asking it to use the MCP Server.
Claude not using MCP server

Tools

No tools

Comments