Skip to main content
Glama

MCP Calendar Server

by highthon-16
test_mcp.py2.71 kB
#!/usr/bin/env python3 """ MCP 캘린더 서버 기능 테스트 스크립트 """ from src.main import ( get_all_events, create_calendar_event, update_calendar_event, delete_calendar_event, get_events_by_category, get_events_by_date ) def test_mcp_functions(): """MCP 도구 함수들 테스트""" print("🔧 MCP 캘린더 서버 기능 테스트") print("=" * 50) # 1. 기존 이벤트 조회 print("\n📅 1. 기존 이벤트 조회") events = get_all_events() print(f"기존 이벤트 수: {len(events)}") for event in events: print(f" - {event.title} ({event.category}) - {event.start_time}") # 2. 새 이벤트 생성 print("\n✨ 2. 새 이벤트 생성") try: new_event = create_calendar_event( title="파이썬 공부", start_time="2025-08-03T09:00:00", duration=120, category="STUDY", description="FastAPI 및 MCP 학습", stamina_cost=25 ) print(f"✅ 이벤트 생성 성공: {new_event.title} (ID: {new_event.id})") except Exception as e: print(f"❌ 이벤트 생성 실패: {e}") # 3. 업데이트된 이벤트 목록 조회 print("\n📋 3. 업데이트된 이벤트 목록") events = get_all_events() print(f"현재 이벤트 수: {len(events)}") # 4. 카테고리별 조회 print("\n🎯 4. 카테고리별 이벤트 조회 (STUDY)") study_events = get_events_by_category("STUDY") print(f"학습 이벤트 수: {len(study_events)}") for event in study_events: print(f" - {event.title}: {event.duration}분") # 5. 날짜별 조회 print("\n📆 5. 날짜별 이벤트 조회 (2025-08-02)") date_events = get_events_by_date("2025-08-02") print(f"2025-08-02 이벤트 수: {len(date_events)}") # 6. 이벤트 수정 (생성된 이벤트가 있다면) if len(events) > 2: # 샘플 2개 + 새로 생성된 것 print("\n🔄 6. 이벤트 수정") try: latest_event_id = events[-1].id updated_event = update_calendar_event( event_id=latest_event_id, title="고급 파이썬 공부", start_time="2025-08-03T10:00:00", duration=150, category="STUDY", description="심화 학습 내용" ) print(f"✅ 이벤트 수정 성공: {updated_event.title}") except Exception as e: print(f"❌ 이벤트 수정 실패: {e}") print("\n🎉 테스트 완료!") print("=" * 50) if __name__ == "__main__": test_mcp_functions()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/highthon-16/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server