MCP Calendar Server
# MCP 캘린더 서버
ADT(Algebraic Data Type) 기반의 MCP 캘린더 관리 시스템입니다.
## 개요
이 프로젝트는 Model Context Protocol(MCP)을 사용하여 캘린더 이벤트를 관리하는 서버입니다.
함수형 프로그래밍 패러다임과 ADT를 적용하여 타입 안전성과 예측 가능성을 보장합니다.
## 주요 기능
- ✅ 캘린더 이벤트 CRUD 작업
- ✅ 카테고리별 이벤트 분류 (학습, 업무, 휴식, 활동)
- ✅ 이벤트 상태 관리 (계획됨, 완료됨, 취소됨)
- ✅ 스태미나 시스템 통합
- ✅ 시간 충돌 방지
- ✅ 날짜별/카테고리별 이벤트 조회
## 설치 및 실행
### 요구사항
- Python 3.10+
- uv 패키지 매니저
### 설치
```bash
# 의존성 설치
uv sync
# 개발 의존성 포함 설치
uv sync --extra dev
```
### 실행
```bash
# MCP 서버 실행
uv run python main.py
# 또는 직접 실행
uv run python src/main.py
```
## API 도구 (Tools)
### 1. get_all_events()
모든 캘린더 이벤트를 조회합니다.
### 2. get_event_by_id(event_id: int)
특정 ID의 이벤트를 조회합니다.
### 3. create_calendar_event(...)
새로운 캘린더 이벤트를 생성합니다.
**매개변수:**
- `title`: 이벤트 제목
- `start_time`: 시작 시간 (ISO 형식: 2025-08-02T10:00:00)
- `duration`: 지속 시간(분)
- `category`: 카테고리 (STUDY, WORK, REST, ACTIVITY)
- `description`: 이벤트 설명 (선택)
- `location`: 장소 (선택)
- `stamina_cost`: 스태미나 소모량 (기본값: 0)
### 4. update_calendar_event(event_id: int, ...)
기존 이벤트를 수정합니다.
### 5. delete_calendar_event(event_id: int)
이벤트를 삭제합니다.
### 6. complete_event(event_id: int, stamina_after: int)
이벤트를 완료 상태로 변경합니다.
### 7. get_events_by_category(category: str)
카테고리별로 이벤트를 조회합니다.
### 8. get_events_by_date(date: str)
특정 날짜의 이벤트를 조회합니다.
## 데이터 모델
### EventCategory
- `STUDY`: 학습
- `WORK`: 업무
- `REST`: 휴식
- `ACTIVITY`: 활동
### EventStatus
- `PLANNED`: 계획됨
- `COMPLETED`: 완료됨
- `CANCELED`: 취소됨
### CalendarEvent
캘린더 이벤트의 핵심 엔티티로 다음 필드를 포함합니다:
- ID, 사용자 ID, 제목, 설명, 장소
- 시작 시간, 지속 시간, 카테고리
- 스태미나 소모량, 상태, 완료 후 스태미나
- 생성 시간
## 프로젝트 구조
```
ittae-MCP/
├── src/
│ ├── __init__.py
│ ├── main.py # MCP 서버 메인
│ ├── models/
│ │ └── __init__.py # 데이터 모델 정의
│ ├── services/
│ │ ├── __init__.py
│ │ └── calendar_service.py # 비즈니스 로직
│ └── exceptions/
│ └── __init__.py # 예외 처리
├── tests/ # 테스트 파일
├── main.py # 진입점
├── pyproject.toml # 프로젝트 설정
└── README.md
```
## 사용 예시
### 이벤트 생성
```python
create_calendar_event(
title="팀 미팅",
start_time="2025-08-02T10:00:00",
duration=60,
category="WORK",
description="주간 팀 미팅",
location="회의실 A",
stamina_cost=20
)
```
### 날짜별 이벤트 조회
```python
get_events_by_date("2025-08-02")
```
### 이벤트 완료 처리
```python
complete_event(event_id=1, stamina_after=80)
```
## 개발
### 테스트 실행
```bash
uv run pytest
```
### 코드 포맷팅
```bash
uv run black src/
uv run ruff check src/
```
## 라이선스
이 프로젝트는 MIT 라이선스 하에 배포됩니다.
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no ambiguity. The CRUD operations (create, get, update, delete) target different actions, while the query tools (get_all_events, get_events_by_category, get_events_by_date) provide complementary filtering options. The complete_event tool uniquely handles event completion with stamina management, separate from general updates.
Most tools follow a consistent verb_noun pattern (create_calendar_event, delete_calendar_event, update_calendar_event, get_all_events, get_event_by_id, get_events_by_category, get_events_by_date). The only deviation is complete_event, which uses a different verb style and omits the 'calendar' prefix, but this is minor given its distinct functionality.
With 8 tools, this server is well-scoped for calendar management. It provides full CRUD operations plus specialized queries and a unique completion tool, avoiding both under-coverage (e.g., just 1-2 tools) and bloat (e.g., 25+ tools). Each tool earns its place in the workflow.
The toolset offers complete coverage for calendar event management: create, read (with multiple query options), update, and delete operations. It also includes specialized functionality like event completion with stamina tracking and status management. No obvious gaps exist for the domain, supporting full agent workflows without dead ends.