Skip to main content
Glama
ZeparHyfar

mcp-datetime

by ZeparHyfar

mcp-fecha y hora

Versión de Python Versión MCPLicencia

Inglés | Japonés

Un servicio de formato de fecha y hora implementado como servidor MCP para la aplicación de escritorio Claude. Admite la generación de cadenas de fecha y hora en varios formatos.

Nota : Este paquete se ha probado únicamente en macOS. No se ha verificado su compatibilidad con Windows.

Prerrequisitos

Antes de utilizar mcp-datetime, asegúrese de tener instaladas las siguientes herramientas:

  • Python 3.12 o posterior

  • uv (instalador de paquetes de Python)

  • uvx (ejecutor de paquetes de Python)

Related MCP server: DateTime MCP Server

Características

  • ✨ Compatibilidad con varios formatos de fecha y hora

  • 🇯🇵 Soporte para idioma japonés

  • 📁 Formatos optimizados para la generación de nombres de archivos

  • 🌏 Manejo preciso de la zona horaria

  • 🔧 Integración perfecta con la aplicación de escritorio Claude

Componentes del servidor MCP

Herramientas

El servidor implementa una herramienta:

  • get_datetime : Obtener la fecha y hora actuales en varios formatos

    • Toma "formato" como un argumento de cadena obligatorio

    • Devuelve una cadena de fecha y hora formateada según el formato especificado

    • Admite múltiples tipos de formatos, incluidos los formatos estándar, japonés e ISO.

Uso con la aplicación de escritorio Claude

Agregue lo siguiente a su archivo de configuración:

Ubicación del archivo de configuración (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-datetime": {
      "command": "uvx",
      "args": ["mcp-datetime"]
    }
  }
}

Acerca de la instalación

Si necesita instalar el paquete directamente (por ejemplo, para desarrollo o inspección del código fuente), puede utilizar uno de estos métodos:

  • Instalar desde PyPI

    pip install mcp-datetime
  • Instalar desde la fuente de GitHub

    git clone https://github.com/ZeparHyfar/mcp-datetime.git
    cd mcp-datetime
    pip install -e .
  • Ejemplo claude_desktop_config.json para instalación manual

    {
      "mcpServers": {
        "mcp-datetime": {
          "command": "python",
          "args": ["-m", "mcp_datetime"],
          "env": {
            "PYTHON": "/path/to/your/python"
          }
        }
      }
    }

    Reemplace "/path/to/your/python" con la ruta real de su intérprete de Python

    p. ej., "/usr/local/bin/python3" o "/Usuarios/nombreusuario/.pyenv/versiones/3.12.0/bin/python3"

Ejemplos básicos

  • Formato de comando

    # Standard datetime format
    call datetime-service.get_datetime {"format": "datetime"}
    # Result: 2024-12-10 00:54:01
    
    # Japanese format
    call datetime-service.get_datetime {"format": "datetime_jp"}
    # Result: 2024年12月10日 00時54分01秒
    
    # Filename format
    call datetime-service.get_datetime {"format": "filename_md"}
    # Result: 20241210005401.md
  • Ejemplos de indicaciones de la aplicación de escritorio Claude

    • Usuario

      Please tell me the current time in date_slash format
    • Claude

      I'll get the current date in date_slash format.
      
      The current date is 2024/12/12

Formatos compatibles

Nombre del formato

Ejemplo

Descripción

fecha

10 de diciembre de 2024

Formato de fecha estándar

barra_de_fecha

10/12/2024

Fecha con barras

fecha_jp

10 de diciembre de 2024

Formato de fecha japonés

fecha y hora

10/12/2024 00:54:01

Fecha y hora estándar

datetime_jp

2024年12月10日 00時54分01秒

Fecha y hora japonesas

fecha y hora_t

10/12/2024 a las 00:54:01

Fecha y hora con separador T

compacto

20241210005401

Formato compacto para identificaciones

fecha compacta

20241210

Solo fecha compacta

tiempo compacto

005401

Tiempo compacto solamente

nombre_de_archivo_md

20241210005401.md

Nombre de archivo Markdown

nombre_archivo_txt

20241210005401.txt

Nombre de archivo de texto

nombre_de_archivo_registro

20241210005401.log

Nombre del archivo de registro

ISO

10/12/2024 00:54:01+0900

Formato ISO 8601

iso_básico

20241210T005401+0900

Formato ISO básico

registro

10/12/2024 00:54:01.123456

Formato de registro con microsegundos

log_compact

20241210_005401

Formato de registro compacto

tiempo

00:54:01

Sólo tiempo

tiempo_jp

0054 días 01

formato de hora japonés

Depuración

Dado que los servidores MCP se ejecutan en stdio, la depuración puede ser complicada. Recomendamos usar el Inspector MCP :

  • Usando el paquete PyPI

    npx @modelcontextprotocol/inspector uvx mcp-datetime
  • Usando el código fuente descargado de GitHub

    git clone https://github.com/ZeparHyfar/mcp-datetime.git
    npx @modelcontextprotocol/inspector uvx --directory ./mcp-datetime run mcp-datetime

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

Available Tools

1 tool
get_datetimeA

Get current date and time in various formats

ParametersJSON Schema
NameRequiredDescriptionDefault
formatYes Available formats: - date: 2024-12-10 - date_slash: 2024/12/10 - date_jp: 2024年12月10日 - datetime: 2024-12-10 00:54:01 - datetime_jp: 2024年12月10日 00時54分01秒 - datetime_t: 2024-12-10T00:54:01 - compact: 20241210005401 - compact_date: 20241210 - compact_time: 005401 - filename_md: 20241210005401.md - filename_txt: 20241210005401.txt - filename_log: 20241210005401.log - iso: 2024-12-10T00:54:01+0900 - iso_basic: 20241210T005401+0900 - log: 2024-12-10 00:54:01.123456 - log_compact: 20241210_005401 - time: 00:54:01 - time_jp: 00時54分01秒

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must carry the burden of behavioral disclosure. It implies a read-only operation but does not explicitly state that it has no side effects or that it returns the current server time. The description is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently communicates the tool's function without unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one well-documented parameter and no output schema, the description covers the essential information. It is complete for its complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter, which already provides extensive detail on the 'format' options. The description adds no additional meaning beyond what the schema already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('Get') and resource ('current date and time in various formats'), providing a specific and unambiguous purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. Since there are no sibling tools listed, this is a minor gap, but the description does not include any contextual usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool update
    • First observedget_datetime

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'get_datetime' has a clear and distinct purpose that cannot be mistaken for any other tool in this set.

Naming Consistency5/5

The naming pattern is trivially consistent as there is only one tool. The tool name 'get_datetime' follows a clear verb_noun convention, and with no other tools to compare against, it maintains perfect consistency within the set.

Tool Count2/5

A single tool for a datetime server is too minimal for the apparent scope. While 'get_datetime' provides current date and time, a datetime domain typically includes operations like formatting, parsing, timezone conversion, or date arithmetic, making this set feel incomplete and underpowered.

Completeness1/5

The tool surface is severely incomplete for a datetime server. It only offers getting the current datetime in various formats, lacking essential operations such as parsing strings to dates, converting timezones, calculating date differences, or manipulating dates (e.g., adding days). This will cause significant agent failures in datetime-related tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Claude Model Configuration Protocol (MCP) server that provides real-time timezone-aware date and time information.
    MIT
  • 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
    12 npm
    1
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A general-purpose MCP server providing time-related utilities such as fetching current time, Unix timestamps, and formatting services. It supports both local stdio and remote SSE communication modes for versatile AI client integration.
    3
    -
  • A
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server providing comprehensive date, time, and day-of-week information. It supports relative time calculations, timezone conversions, and detailed calendar metadata like week numbers and quarters.
    5
    1
    MIT