Skip to main content
Glama
DateTime-LocalMCPServer

DateTime-LocalMCPServer

MCP Server Setup Guide

A step-by-step guide to set up and run a Model Context Protocol (MCP) server using FastMCP.

Installation Steps

  • UV is a fast Python package manager. Install it using pip:

pip install uv
  • Verify installation:

uv --version
  • Create a new directory for your MCP server and initialize it:

mkdir mcp-server
cd mcp-server
uv init .
  • This creates the necessary project structure with:

    • pyproject.toml - Project configuration

    • .python-version - Python version specification

    • README.md - Project documentation

  • Add FastMCP to your project dependencies:

uv add fastmcp
  • Create a file named main.py with your server code:

  • Use the MCP Inspector to test your server interactively:

uv run fastmcp dev main.py
  • To run your server normally:

uv run fastmcp run main.py
  • Automatically configure Claude Desktop to use your MCP server:

uv run fastmcp install claude-desktop main.py

Related MCP server: DateTime MCP Server

License

This project is licensed under the MIT License.

Available Tools

9 tools
current_dateA

Return today's local date.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - date : str Current date in YYYY-MM-DD format.

Inputs: no named parameters. Returns: object

current_datetimeA

Return the current or today's local date and time in ISO 8601 format.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - datetime : str Current local date and time in ISO 8601 format.

Inputs: no named parameters. Returns: object

current_dayA

Return the name of the current day.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - day : str Name of the current day (e.g., Monday).

Inputs: no named parameters. Returns: object

current_monthA

Return the name of the current month.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - month : str Name of the current month (e.g., January).

Inputs: no named parameters. Returns: object

current_timeA

Return the current local time.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - time : str Current time in HH:MM:SS format.

Inputs: no named parameters. Returns: object

current_yearA

Return the current year.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - year : int Current year.

Inputs: no named parameters. Returns: object

formatted_datetimeA

Return the current date and time using a custom format.

Parameters

format : str, optional strftime-compatible format string. Defaults to "%Y-%m-%d %H:%M:%S".

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution or error. - formatted : str Current datetime formatted according to the provided format string.

If the format string is invalid, an error response is returned.

Inputs: format. Returns: object

timezone_datetimeA

Return the current date and time for a specified timezone.

Parameters

timezone : str, optional IANA timezone name (e.g., "UTC", "Asia/Kolkata"). Defaults to "UTC".

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution or error. - timezone : str Requested timezone. - datetime : str Current datetime in ISO 8601 format for the given timezone.

If an invalid timezone is provided, an error response is returned.

Inputs: timezone. Returns: object

unix_timestampA

Return the current Unix timestamp.

Returns

Dict[str, Any] A dictionary containing: - status : str Indicates successful execution. - timestamp : int Number of seconds since the Unix epoch.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have distinct purposes focused on specific date/time components, though current_datetime and formatted_datetime could potentially overlap if the default format matches ISO 8601. The descriptions help clarify differences, with current_datetime providing a fixed ISO format while formatted_datetime allows customization.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with clear 'current_' or descriptive prefixes (formatted_datetime, timezone_datetime, unix_timestamp). The naming convention is predictable and readable throughout the entire set.

    Tool Count4/5

    Nine tools is reasonable for a datetime server, though it feels slightly heavy with separate tools for day, month, and year that could potentially be combined. The count supports comprehensive datetime operations without being overwhelming.

    Completeness5/5

    The toolset provides complete coverage for datetime operations including current date/time retrieval, formatting, timezone handling, and Unix timestamp conversion. No obvious gaps exist for a server focused on current datetime information retrieval.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides tools to get the current date and time in various formats, supporting different timezones and custom formatting options.
      1
      13 npm
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides time and timezone conversion capabilities, enabling LLMs to get current time information and perform timezone conversions using IANA timezone names.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      The Time MCP Server is a Model Context Protocol (MCP) server that provides AI assistants and other MCP clients with standardized tools to perform time and date-related operations. This server acts as a bridge between AI tools and a robust time-handling back
      72 npm
      25
      MIT