Datetime MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Mentioned as the source repository location for cloning the project with 'git clone https://github.com/bossjones/datetime-mcp-server.git'

  • Used for various development tasks through Makefile commands like 'make uv-sync-all'

  • Used to launch the MCP Inspector with 'npx @modelcontextprotocol/inspector'

DateTime MCP 서버

날짜/시간 기능과 간단한 메모 관리를 제공하는 MCP(Model Completions Protocol) 서버입니다.

개요

이 서버는 MCP 프로토콜을 구현하고 다음을 포함하여 다양한 날짜/시간 관련 도구와 리소스를 제공합니다.

  • 다양한 형식의 현재 날짜 및 시간
  • 날짜 형식 지정 유틸리티
  • 이벤트 일정 프롬프트
  • 간단한 노트 관리 기능

이 서버는 모든 MCP 클라이언트에서 날짜 및 시간 정보에 접근하고 간단한 메모를 관리하는 데 사용할 수 있습니다.

특징

자원

서버는 다음과 같은 리소스를 제공합니다.

  • datetime://current - 현재 날짜 및 시간
  • datetime://today - ISO 형식의 오늘 날짜
  • datetime://time - 24시간 형식의 현재 시간
  • note://internal/{name} - 사용자가 만든 메모

도구

서버는 다음과 같은 도구를 제공합니다.

  • add-note - 이름과 내용을 입력하여 새 메모를 추가합니다.
  • get-current-time - 다양한 형식(ISO, 읽기 가능, Unix 타임스탬프, RFC3339)으로 현재 시간을 가져옵니다.
  • format-date - 지정된 형식 패턴에 따라 날짜 문자열을 형식화합니다.

프롬프트

서버는 다음과 같은 프롬프트를 제공합니다.

  • summarize-notes - 모든 노트의 요약을 생성합니다.
  • schedule-event - 특정 시간에 이벤트를 예약하는 데 도움이 됩니다.

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 가상 환경 만들기:
uv venv source .venv/bin/activate
  1. 종속성을 설치합니다.
uv sync

용법

서버 실행

서버를 실행하려면:

uv run python -m datetime_mcp_server.server

서버가 시작되어 stdin/stdout에서 MCP 프로토콜 메시지를 수신합니다.

서버에 연결

모든 MCP 클라이언트를 사용하여 서버에 연결할 수 있습니다. 예를 들어, MCP CLI를 사용하면 다음과 같습니다.

uv run mcp connect datetime-mcp-server

개발

개발 종속성 설치

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

테스트 실행

테스트를 실행하려면:

uv run pytest tests/

단위 테스트

단위 테스트는 개별 서버 기능이 올바르게 작동하는지 확인합니다.

uv run pytest tests/acceptance/test_server.py

통합 테스트

통합 테스트는 서버가 MCP 프로토콜을 올바르게 구현하는지 확인합니다.

uv run pytest tests/acceptance/test_server_integration.py

종속성 관리

# 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

예시

MCP CLI를 사용하여 서버 사용

사용 가능한 리소스를 나열하세요.

uv run mcp resources list

날짜/시간 리소스 읽기:

uv run mcp resources read datetime://current

메모 추가:

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

ISO 형식으로 현재 시간을 가져옵니다.

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

날짜 형식 지정:

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

Makefile 작업

이 프로젝트에는 개발을 간소화하기 위한 여러 가지 Makefile 작업이 포함되어 있습니다.

# Sync all dependencies with frozen lockfile make uv-sync-all # Sync only development dependencies make uv-sync-dev # Run tests make test

건축 및 출판

배포를 위해 패키지를 준비하려면:

  1. 종속성 동기화 및 잠금 파일 업데이트:
uv sync
  1. 패키지 배포 빌드:
uv build

이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.

  1. PyPI에 게시:
uv publish

참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.

  • 토큰: --token 또는 UV_PUBLISH_TOKEN
  • 또는 사용자 이름/비밀번호: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

디버깅

MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.

다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.

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

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

특허

MIT

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치 생성
  3. 변경 사항을 만드세요
  4. uv run pytest 로 테스트를 실행하세요
  5. 풀 리퀘스트 제출

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

이 서버를 사용하면 사용자 정의 URI 체계를 사용하여 메모를 저장, 관리 및 요약할 수 있으며, 새로운 메모를 추가하고 다양한 수준의 세부 정보로 요약을 생성하는 기능이 있습니다.

  1. Overview
    1. Features
      1. Resources
      2. Tools
      3. Prompts
    2. Installation
      1. Usage
        1. Running the Server
        2. Connecting to the Server
      2. Development
        1. Installing Development Dependencies
        2. Running Tests
        3. Dependency Management
      3. Examples
        1. Using the Server with MCP CLI
      4. Makefile Tasks
        1. Building and Publishing
          1. Debugging
            1. License
              1. Contributing
                ID: fd8f58oegw