Cover image
servidor de dataTime-MCP
Public

servidor de dataTime-MCP

Try Now
2025-03-03

3 years

Works with Finder

1

Github Watches

2

Github Forks

0

Github Stars

DateTime MCP Server

A MCP (Model Completions Protocol) server that provides datetime functionality along with simple note management.

Overview

This server implements the MCP protocol and offers various datetime-related tools and resources, including:

  • Current date and time in different formats
  • Date formatting utilities
  • Event scheduling prompts
  • Simple note management functionality

The server can be used by any MCP client to access date and time information and manage simple notes.

Features

Resources

The server provides the following resources:

  • datetime://current - The current date and time
  • datetime://today - Today's date in ISO format
  • datetime://time - The current time in 24-hour format
  • note://internal/{name} - User-created notes

Tools

The server provides the following tools:

  • add-note - Add a new note with a name and content
  • get-current-time - Get the current time in various formats (ISO, readable, Unix timestamp, RFC3339)
  • format-date - Format a date string according to a specified format pattern

Prompts

The server provides the following prompts:

  • summarize-notes - Creates a summary of all notes
  • schedule-event - Helps schedule an event at a specific time

Installation

  1. Clone the repository:
git clone https://github.com/bossjones/datetime-mcp-server.git
cd datetime-mcp-server
  1. Create a virtual environment:
uv venv
source .venv/bin/activate
  1. Install the dependencies:
uv sync

Usage

Running the Server

To run the server:

uv run python -m datetime_mcp_server.server

The server will start and listen on stdin/stdout for MCP protocol messages.

Connecting to the Server

You can connect to the server using any MCP client. For example, using the MCP CLI:

uv run mcp connect datetime-mcp-server

Development

Installing Development Dependencies

# Install all dependencies including development dependencies
uv sync --dev

Running Tests

To run the tests:

uv run pytest tests/

Unit Tests

Unit tests verify that individual server functions work correctly:

uv run pytest tests/acceptance/test_server.py

Integration Tests

Integration tests verify that the server implements the MCP protocol correctly:

uv run pytest tests/acceptance/test_server_integration.py

Dependency Management

# Add a production dependency
uv add package_name

# Add a development dependency
uv add --dev package_name

# Sync dependencies from lockfile
uv sync --frozen

# List outdated packages
uv outdated

Examples

Using the Server with MCP CLI

List available resources:

uv run mcp resources list

Read a datetime resource:

uv run mcp resources read datetime://current

Add a note:

uv run mcp tools call add-note --arguments '{"name": "meeting", "content": "Team meeting at 3pm"}'

Get the current time in ISO format:

uv run mcp tools call get-current-time --arguments '{"format": "iso"}'

Format a date:

uv run mcp tools call format-date --arguments '{"date": "2023-10-15", "format": "%B %d, %Y"}'

Makefile Tasks

The project includes several Makefile tasks to streamline development:

# Sync all dependencies with frozen lockfile
make uv-sync-all

# Sync only development dependencies
make uv-sync-dev

# Run tests
make test

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/malcolm/dev/bossjones/datetime-mcp-server run datetime-mcp-server

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

License

MIT

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run the tests with uv run pytest
  5. Submit a pull request

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    3 (1)
    Avatar
    user_kL4dWP6H
    2025-04-18

    I'm really impressed with the datetime-mcp-server by bossjones. It's highly efficient for handling datetime operations in server-side applications. The GitHub documentation is clear and concise, making it easy to integrate and get started quickly. I highly recommend it for any developer needing robust datetime management solutions in their projects.