MCP Test Failure Analysis Server
MCP 서버 데모
이 프로젝트는 FastMCP로 구축된 QA 지향 테스트 실패 분석용 Python MCP 서버를 포함하고 있습니다.
현재 구조
mcp-server-demo/
├── FailureAnalysisFromLogs.py
├── README.md
├── logs/
├── pyproject.toml
├── testFailureAnalysis.py
└── uv.lockRelated MCP server: QA Copilot AI
이 프로젝트에 포함된 내용
testFailureAnalysis.pyanalyze_test_failurecluster_failuresdetect_flaky_tests
FailureAnalysisFromLogs.pyanalyze_test_failurelogs/폴더에서 로컬.log파일을 읽고 분류합니다.
logs/로그 기반 MCP 서버에서 사용하는 샘플 실패 로그
pyproject.tomlPython 버전 및 의존성 구성
uv.lock재현 가능한 설치를 위한 고정된 의존성 버전
.vscode/mcp.jsontest-failure-analysis,test-failure-analysis-from-logs및mcp-atlassian을 위한 MCP 서버 항목
사전 요구 사항
Python
3.11이상uv초기 의존성 설치를 위한 인터넷 연결
설치
저장소 루트에서 다음을 실행합니다:
cd mcp-server-demo
uv sync서버 실행
입력 기반 MCP 서버를 시작하려면 다음을 실행합니다:
uv run python testFailureAnalysis.py로그 기반 MCP 서버를 시작하려면 다음을 실행합니다:
uv run python FailureAnalysisFromLogs.py사용 가능한 도구
analyze_test_failure
테스트 이름, 스택 추적 및 로그를 사용하여 실패한 테스트를 분석한 다음, 예상되는 실패 범주와 권장 사항을 반환합니다.
FailureAnalysisFromLogs.py의 analyze_test_failure
logs/ 폴더의 로컬 .log 파일을 분석하여 실패 분류, 예상 근본 원인, 권장 사항 및 중요한 오류 라인을 반환합니다. 모든 로그, 특정 테스트 이름 또는 정확한 로그 파일 이름을 분석할 수 있습니다.
cluster_failures
스택 추적 서명을 기준으로 유사한 실패를 그룹화하여 반복되는 패턴을 쉽게 파악할 수 있도록 합니다.
detect_flaky_tests
과거의 성공/실패 결과를 검토하고 불안정한(flaky) 동작을 보이는 테스트를 식별합니다.
선택적 로컬 MCP 구성
저장소 루트에는 개발 중 로컬 서버 설정을 위해 MCP 인식 도구에서 사용할 수 있는 .vscode/mcp.json이 포함되어 있습니다. 여기에는 test-failure-analysis, test-failure-analysis-from-logs 및 mcp-atlassian에 대한 항목이 포함되어 있습니다.
Atlassian MCP
로컬 MCP 구성에는 Jira 액세스를 위한 mcp-atlassian 서버 항목이 포함되어 있습니다.
사용 방법
MCP 인식 클라이언트에서 .vscode/mcp.json에 구성된 mcp-atlassian 항목을 사용하십시오.
수동으로 실행하려면 다음을 사용하십시오:
JIRA_URL=<your-jira-url> \
JIRA_USERNAME=<your-jira-username> \
JIRA_API_TOKEN=<your-jira-api-token> \
uvx mcp-atlassian문제 해결
uv를 사용할 수 없는 경우, 설치 후 터미널을 다시 여십시오.의존성 설치에 실패하면 Python
3.11+가 활성화되어 있는지 확인하십시오.서버가 시작되지 않으면
mcp-server-demo내부에서uv sync를 다시 실행하십시오.
image/project-workflow.png 폴더의 워크플로우 이미지
Available Tools
3 toolsanalyze_test_failureC
Analyze a failed test and suggest likely root cause.
| Name | Required | Description | Default |
|---|---|---|---|
| test_name | Yes | ||
| stack_trace | Yes | ||
| logs | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description only gives a high-level purpose without detailing behavior (e.g., whether it is safe, requires permissions, or modifies state). The description does not compensate for missing annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (one sentence), which is concise but lacks necessary detail. It is front-loaded, but could be more informative without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 required parameters, no output schema, and no annotations, the description is severely lacking. It does not explain return values, how inputs are used, or any other context needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%; the description adds no meaning about the three parameters (test_name, stack_trace, logs). They are just named but not explained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: analyzing a failed test and suggesting a root cause. However, it does not explicitly differentiate from siblings like 'cluster_failures' or 'detect_flaky_tests', though the intent is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no prerequisites or exclusions provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cluster_failuresB
Group failures by similar error signature.
Each failure should contain test_name and stack_trace.
| Name | Required | Description | Default |
|---|---|---|---|
| failures | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It only states grouping by error signature but omits details about output, state modifications, error handling, or performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, highly concise, and front-loaded with the core action. Every word adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no description of return values. The tool clusters failures but doesn't indicate what the output looks like (e.g., clusters with centroid signatures). This is a significant gap for a grouping tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'failures' is an array of objects without schema descriptions. The description compensates by specifying that each failure should contain 'test_name' and 'stack_trace', adding meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'group' and resource 'failures by similar error signature', and specifies required fields. It distinguishes from sibling tools like analyze_test_failure and detect_flaky_tests, though not explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus its siblings. There is no mention of scenarios where clustering is appropriate or when to use alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
detect_flaky_testsB
Detect flaky tests from historical pass/fail data.
Each item should contain test_name and status.
| Name | Required | Description | Default |
|---|---|---|---|
| test_history | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It does not disclose whether the tool is read-only, destructive, or has side effects. It only hints at input formatting (test_name and status) but omits behavior like output structure or failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences: the first states the tool's purpose, and the second provides an input hint. No unnecessary words; every sentence contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one array parameter and no output schema, the description covers the core purpose and input requirement. However, it lacks details on output (e.g., what the tool returns) and fails to provide context relative to siblings. It is minimally adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description adds that each item should contain 'test_name and status', which provides necessary meaning beyond the schema (which only says array of objects with additionalProperties). However, it does not specify data types or expected values, so it adds limited value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Detect'), the resource ('flaky tests'), and the data source ('historical pass/fail data'). It distinguishes from sibling tools like 'analyze_test_failure' which focuses on analyzing a specific failure, and 'cluster_failures' which clusters failures, making the tool's purpose distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives ('analyze_test_failure', 'cluster_failures'). It implies usage for historical data but does not set context for selection, leaving the agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
analyze_test_failure - First observed
cluster_failures - First observed
detect_flaky_tests
TDQS
Scored across 3 tools
Each tool targets a distinct aspect of test failure analysis: root cause analysis for a single failure, grouping failures by error signature, and detecting flaky tests from history. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern using snake_case (analyze_test_failure, cluster_failures, detect_flaky_tests), making them predictable and easy to understand.
With exactly 3 tools, the server is well-scoped for test failure analysis. This number is sufficient to cover core functionalities without being overwhelming or too sparse.
The tool set covers essential operations for analyzing test failures, clustering, and flakiness detection. However, it lacks tools for data retrieval (e.g., fetching test history) or generating summary reports, which are minor gaps.
Maintenance
Related MCP Connectors
Flaky test detection, root cause analysis, and fix suggestions for development teams.
Offline log parsing, CI failures, HTTP capture analysis and bounded JSON configuration validation.
Triage failing GitHub Actions jobs and see what self-heal repaired, in natural language.
BuildPulse CI test analytics for AI agents — flaky tests, CI failures, flakiness, and code coverage.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides tools to analyze and debug GitHub Actions CI failures, including summarizing failures, detecting flaky tests, and suggesting fixes.103 npm1ISC
- AlicenseBqualityDmaintenanceMCP server for AI-powered QA analysis. It enables analyzing test failures, identifying root causes, suggesting fixes, classifying defects, detecting flaky tests, and generating test cases and bug reports.10ISC
- AlicenseNot gradedqualityCmaintenanceEnables AI-driven triage of Allure test results by clustering failures into stable signatures and generating root-cause explanations, so you can turn large failing CI runs into a few actionable categories.MIT
- FlicenseNot gradedqualityBmaintenanceEnables automated analysis of test suite traces to identify timing races and state pollution, helping detect flaky test non-determinism in CI/CD workflows such as Datadog CI or Trunk.8-