This project contains Python MCP servers for QA-oriented test failure analysis, built with FastMCP.
mcp-server-demo/
├── FailureAnalysisFromLogs.py
├── README.md
├── logs/
├── pyproject.toml
├── testFailureAnalysis.py
└── uv.lock
testFailureAnalysis.pyanalyze_test_failurecluster_failuresdetect_flaky_tests
FailureAnalysisFromLogs.pyanalyze_test_failure- Reads and classifies local
.logfiles from thelogs/folder
logs/- Sample failure logs used by the log-based MCP server
pyproject.toml- Python version and dependency configuration
uv.lock- Locked dependency versions for reproducible installs
.vscode/mcp.json- MCP server entries for
test-failure-analysis,test-failure-analysis-from-logs, andmcp-atlassian
- MCP server entries for
- Python
3.11or later uv- Internet access for the first dependency install
From the repository root:
cd mcp-server-demo
uv syncStart the input-based MCP server with:
uv run python testFailureAnalysis.pyStart the log-based MCP server with:
uv run python FailureAnalysisFromLogs.pyAnalyzes a failed test using the test name, stack trace, and logs, then returns a likely failure category and recommendation.
Analyzes local .log files from the logs/ folder and returns failure classification, likely root cause, recommendation, and important error lines. It can analyze all logs, a specific test name, or an exact log file name.
Groups similar failures by stack trace signature so repeated patterns are easier to spot.
Reviews historical pass/fail results and identifies tests that show flaky behavior.
The repository root contains .vscode/mcp.json, which can be used by MCP-aware tooling for local server setup during development. It includes entries for test-failure-analysis, test-failure-analysis-from-logs, and mcp-atlassian.
The local MCP configuration includes an mcp-atlassian server entry for Jira access.
Use the configured mcp-atlassian entry from .vscode/mcp.json in your MCP-aware client.
To run it manually, use:
JIRA_URL=<your-jira-url> \
JIRA_USERNAME=<your-jira-username> \
JIRA_API_TOKEN=<your-jira-api-token> \
uvx mcp-atlassian- If
uvis not available, install it and reopen the terminal. - If dependency installation fails, confirm Python
3.11+is active. - If the server does not start, run
uv syncagain insidemcp-server-demo.