MCP Tools 가이드
개요
MCP(Model Context Protocol) Tools는 QA Agent의 핵심 기능으로, 다양한 테스트 자동화 및 모니터링 작업을 수행할 수 있는 도구 모음입니다.
사용 가능한 MCP Tools
1. 데이터 조회 도구
1.1 query-mobile-logs
모바일 앱의 로그를 조회하고 분석합니다.
{
"tool": "query-mobile-logs",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"platform": "iOS",
"logLevel": ["ERROR", "CRITICAL"]
}
}
주요 사용 사례:
- 앱 크래시 원인 분석
- 특정 사용자의 문제 추적
- 플랫폼별 에러 패턴 분석
- 버전별 안정성 비교
1.2 questionnaire_data_query
설문 응답 데이터와 점수 추이를 조회합니다.
{
"tool": "questionnaire_data_query",
"arguments": {
"userId": "user-12345",
"roundNumbers": [1, 2, 3, 4],
"questionnaireTypes": ["ISI", "PHQ-9"],
"includeDetails": true
}
}
주요 사용 사례:
- 사용자 진행도 확인
- 설문 점수 추이 분석
- 응답 일관성 검증
- 치료 효과 측정
1.3 sleep_log_data_query
수면 기록 데이터를 조회합니다.
{
"tool": "sleep_log_data_query",
"arguments": {
"userId": "user-12345",
"fromDayIndex": 1,
"toDayIndex": 30,
"limit": 100
}
}
주요 사용 사례:
- 수면 패턴 분석
- 수면 효율 계산
- 치료 진행도 모니터링
- 데이터 유효성 검증
2. 시스템 분석 도구
2.1 query-recent-errors
최근 발생한 시스템 에러를 조회합니다.
{
"tool": "query-recent-errors",
"arguments": {
"hours": 24,
"limit": 100,
"serviceName": "dta-wide-api"
}
}
주요 사용 사례:
- 서비스 안정성 모니터링
- 에러 발생 빈도 분석
- 긴급 이슈 대응
- 배포 후 모니터링
2.2 analyze-error-patterns
에러 패턴을 분석하여 주요 문제를 식별합니다.
{
"tool": "analyze-error-patterns",
"arguments": {
"startTime": "2024-01-01T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"minOccurrences": 5
}
}
주요 사용 사례:
- 반복적인 문제 식별
- 근본 원인 분석
- 개선 우선순위 결정
- 트렌드 파악
2.3 query-logs
다양한 필터로 시스템 로그를 조회합니다.
{
"tool": "query-logs",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"severity": ["WARNING", "ERROR"],
"serviceName": "dta-wide-api",
"limit": 200
}
}
주요 사용 사례:
- 상세 로그 분석
- 특정 이벤트 추적
- 성능 문제 진단
- 보안 감사
3. 시간 관리 도구
3.1 get-current-time
현재 날짜와 시간을 다양한 형식으로 조회합니다.
{
"tool": "get_current_time",
"arguments": {
"timezone": "Asia/Seoul",
"format": "Korean",
"includeWeekday": true
}
}
주요 사용 사례:
- 타임존별 시간 확인
- 로그 타임스탬프 변환
- 테스트 실행 시각 기록
- 국제 시간 동기화
3.2 get-user-virtual-time
특정 사용자의 가상 시간을 조회합니다 (TimeMachine 기능).
{
"tool": "get_user_virtual_time",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5"
}
}
주요 사용 사례:
- 사용자 시간 상태 확인
- 치료 진행도 추적
- TimeMachine 활성화 여부 확인
- 시간 변경 후 검증
3.3 change-user-day-index
특정 사용자의 가상 시간을 치료 일차(dayIndex) 기준으로 변경합니다.
{
"tool": "change_user_day_index",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"dayIndex": 10,
"reason": "시나리오 테스트",
"timezoneId": "Europe/Berlin"
}
}
주요 사용 사례:
- 특정 치료 일차 시나리오 테스트
- 주간/월간 설문 시점 검증
- 알림 및 스케줄 테스트
- 치료 종료 프로세스 검증
3.4 get-user-timemachine-status
특정 사용자의 TimeMachine 상태를 조회합니다.
{
"tool": "get_user_timemachine_status",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5"
}
}
주요 사용 사례:
- TimeMachine 활성화 여부 확인
- 변경 이력 추적
- 시간 설정 상태 진단
3.5 enable-user-timemachine
특정 사용자의 TimeMachine 기능을 활성화합니다.
{
"tool": "enable_user_timemachine",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"reason": "테스트 목적으로 활성화"
}
}
주요 사용 사례:
- 테스트 환경 구성
- 시나리오 테스트 시작
- 가상 시간 사용 활성화
3.6 disable-user-timemachine
특정 사용자의 TimeMachine 기능을 비활성화합니다.
{
"tool": "disable_user_timemachine",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"reason": "테스트 완료"
}
}
주요 사용 사례:
- 테스트 완료 후 원복
- 실제 시간 사용으로 복원
- 가상 시간 설정 초기화
4. 유틸리티 도구
4.1 create-access-code
사용자 등록을 위한 액세스 코드를 생성합니다.
{
"tool": "create-access-code",
"arguments": {
"type": "STANDARD",
"treatmentPeriod": 90,
"usagePeriod": 130,
"email": "user@example.com"
}
}
주요 사용 사례:
- 새로운 사용자 초대 코드 생성
- 연구 참여자 등록 코드 발급
- 베타 테스터 액세스 코드 제공
- 관리자용 특수 코드 생성
매개변수 설명:
type: 코드 타입 (STANDARD, ADMIN, RESEARCH, BETA, VIP) - 기본값: STANDARDcreatorId: 생성자 ID - 기본값: Service Account IDtreatmentPeriod: 치료 기간(일) - 기본값: 90usagePeriod: 코드 유효 기간(일) - 기본값: 130email: 코드 전송 이메일 (선택사항)deliveryMethod: 전송 방법 (EMAIL, SMS, IN_APP, MANUAL)
MCP Tools 활용 시나리오
시나리오 1: 모바일 앱 품질 검증
- 에러 로그 수집
{
"tool": "query-mobile-logs",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"logLevel": ["ERROR", "CRITICAL"]
}
}
- 에러 패턴 분석
{
"tool": "analyze-error-patterns",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"serviceName": "mobile-api"
}
}
- 사용자별 상세 조사
{
"tool": "questionnaire_data_query",
"arguments": {
"userId": "affected-user-id"
}
}
시나리오 2: 사용자 데이터 일관성 검증
- 설문 데이터 확인
{
"tool": "questionnaire_data_query",
"arguments": {
"userId": "user-12345",
"includeDetails": true
}
}
- 수면 로그 확인
{
"tool": "sleep_log_data_query",
"arguments": {
"userId": "user-12345",
"limit": 30
}
}
- 관련 로그 조회
{
"tool": "query-logs",
"arguments": {
"startTime": "2024-01-01T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"userId": "user-12345"
}
}
시나리오 3: 새로운 사용자 온보딩
- 액세스 코드 생성
{
"tool": "create-access-code",
"arguments": {
"type": "RESEARCH",
"email": "participant@example.com",
"treatmentPeriod": 120,
"usagePeriod": 150,
"deliveryMethod": "EMAIL"
}
}
- 생성된 코드 검증
{
"tool": "query-logs",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"correlationId": "access-code-creation"
}
}
- 사용자 등록 상태 확인
{
"tool": "questionnaire_data_query",
"arguments": {
"userId": "new-user-id",
"roundNumbers": [1]
}
}
시나리오 4: TimeMachine 시나리오 테스트
- TimeMachine 활성화
{
"tool": "enable_user_timemachine",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"reason": "시나리오 테스트를 위한 활성화"
}
}
- 사용자를 특정 일차로 이동
{
"tool": "change_user_day_index",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"dayIndex": 7,
"reason": "주간 설문 시점 테스트"
}
}
- 변경된 시간 확인
{
"tool": "get_user_virtual_time",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5"
}
}
- 해당 일차의 설문 데이터 확인
{
"tool": "questionnaire_data_query",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"includeDetails": true
}
}
- 수면 데이터 확인
{
"tool": "sleep_log_data_query",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"fromDayIndex": 5,
"toDayIndex": 7
}
}
- 테스트 완료 후 TimeMachine 비활성화
{
"tool": "disable_user_timemachine",
"arguments": {
"userId": "3a5822e5-595e-4bd5-b06a-f46104a34bd5",
"reason": "시나리오 테스트 완료"
}
}
시나리오 5: 현재 시간 조회 및 로그 분석
- 현재 시간 조회
{
"tool": "get_current_time",
"arguments": {
"timezone": "Asia/Seoul",
"format": "Korean",
"includeWeekday": true
}
}
- 시간 기준 로그 분석
{
"tool": "query_logs",
"arguments": {
"startTime": "2024-01-15T00:00:00.000Z",
"endTime": "2024-01-15T23:59:59.999Z",
"severity": ["ERROR", "WARN"]
}
}
고급 활용 팁
1. 조합 사용
여러 도구를 순차적으로 사용하여 깊이 있는 분석을 수행할 수 있습니다.
2. 자동화 통합
CI/CD 파이프라인에 MCP Tools를 통합하여 자동 품질 검증을 구현할 수 있습니다.
3. 알림 설정
특정 조건이 충족될 때 자동으로 도구를 실행하고 알림을 발송할 수 있습니다.
4. 대시보드 구성
MCP Tools의 결과를 시각화하여 실시간 모니터링 대시보드를 구성할 수 있습니다.
주의사항
- 권한 관리: 민감한 데이터에 접근하는 도구는 적절한 권한이 필요합니다.
- 리소스 사용: 대량의 데이터를 조회할 때는 시스템 부하를 고려하세요.
- 데이터 보안: 조회한 데이터는 안전하게 처리하고 저장하세요.
- API 제한: Rate limiting이 적용될 수 있으므로 적절한 간격으로 호출하세요.