버그 화면 녹화 영상을 주요 프레임, OCR 텍스트, 디바이스 로그, 음성 설명을 포함한 구조화된 마크다운 타임라인으로 변환합니다.
다른 이름 emanueld92/bug2context
- 스타
- 1
- Tools
- —
- 다운로드, 30일
- 29
- 최신 버전
- 0.1.1
- 마지막 커밋
- 2026년 10월 21일
- 라이선스
- MIT
bug2context MCP란?
bug2context은(는) MCP server입니다. 버그 화면 녹화 영상을 주요 프레임, OCR 텍스트, 디바이스 로그, 음성 설명을 포함한 구조화된 마크다운 타임라인으로 변환합니다.
프로젝트 README에서 생성된 요약
bug2context MCP server 정보
bug2context는 개발자와 QA 엔지니어가 버그 화면 녹화 영상을 구조화된 마크다운 타임라인으로 변환할 수 있게 해줍니다. 비디오 파일을 주요 프레임, OCR 텍스트, 디바이스 로그, 음성 설명이 결합된 단일 타임라인으로 요약하여 AI 에이전트가 시각적 및 기술적 컨텍스트를 쉽게 읽을 수 있도록 합니다. 이 도구는 로컬 우선 방식으로 설계되어 데이터가 기기 외부로 유출되지 않으며 계정이나 API 키가 필요하지 않습니다.
사용자는 Claude Code에서 analyze_bug_video, get_frame, list_bundles와 같은 도구를 사용하여 서버와 상호작용할 수 있습니다. 기존 비디오 파일을 처리하거나 Android 디바이스를 직접 녹화하여 화면 캡처와 logcat 스트림을 동기화하는 기능을 지원합니다. 시스템은 비디오 처리를 위해 ffmpeg를 사용하며, macOS에서는 Apple Vision을, 그 외 환경에서는 Tesseract를 사용하여 텍스트를 인식할 수 있습니다. 로그를 단일 호스트 타임스탬프에 고정함으로써, 크래시가 발생하는 시점의 시각적 프레임 바로 옆에 스택 트레이스가 정확히 나타나도록 보장합니다.
활용 사례
- 1크래시 비디오 분석AI 에이전트에게 특정 비디오 파일을 조사하여 버그에 대한 시간순 보고서를 생성하도록 요청합니다.
- 2Android 로그 및 비디오 동기화Android 디바이스를 녹화하여 화면과 logcat 출력을 공유 타임스탬프로 함께 캡처합니다.
- 3시각적 증거 추출처리된 비디오에서 특정 프레임을 가져와 AI 에이전트가 UI 상태를 시각적으로 검사할 수 있도록 합니다.
- 4음성 버그 보고서 전사녹화된 영상의 음성 설명을 텍스트로 변환하여 마크다운 보고서에 음성 컨텍스트를 추가합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
bug2context MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 bug2context MCP 설치
$ claude mcp add bug2context -- uvx bug2contextCursor에 bug2context MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"bug2context": {
"command": "uvx",
"args": [
"bug2context"
]
}
}
}VS Code에 bug2context MCP 설치
.vscode/mcp.json
{
"servers": {
"bug2context": {
"type": "stdio",
"command": "uvx",
"args": [
"bug2context"
]
}
}
}VS Code CLI에 bug2context MCP 설치
$ code --add-mcp '{"name":"bug2context","type":"stdio","command":"uvx","args":["bug2context"]}'Claude Desktop에 bug2context MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"bug2context": {
"command": "uvx",
"args": [
"bug2context"
]
}
}
}Codex에 bug2context MCP 설치
$ codex mcp add bug2context -- uvx bug2contextCodex config.toml에 bug2context MCP 설치
~/.codex/config.toml
[mcp_servers.bug2context] command = "uvx" args = ["bug2context"]
Gemini CLI에 bug2context MCP 설치
$ gemini mcp add -s user bug2context uvx -- bug2contextGemini settings.json에 bug2context MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"bug2context": {
"command": "uvx",
"args": [
"bug2context"
]
}
}
}자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능emanueld92/bug2context is public and reachablegithub.com/emanueld92/bug2context ↗통과
- 패키지가 이 저장소를 소스로 명시bug2context names emanueld92/bug2context as sourcepypi.org/project/bug2context/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for bug2contextpypi.org/project/bug2context/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-21github.com/emanueld92/bug2context ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from bug2context통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음41 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기bug2context
Turns a screen recording of a bug into structured, chronological context an AI agent can actually read.
Screenshots lose the story: bugs happen fast, a still frame has no timeline, and the logs and the narration live somewhere else entirely. LLMs don't take video. This distills a recording into one markdown chronology — key frames, the text on screen, device logs and spoken narration, all on the same clock.
- No SDK. Works on any video, including one someone sent you over WhatsApp.
- Local-first. Nothing leaves your machine. No account, no API key, no cloud.
- MCP-native. Claude Code calls it as a tool; you just point at the file.
uvx bug2context # guided menu
uvx bug2context process bug.mp4 --out bundle/
Running it with no arguments opens a menu — record an Android device, process a
video you already have, or list previous bundles — and writes to
~/.bug2context/, which is where the MCP server looks. Everything it does is
reachable through the flags below; it just stops you having to remember them.
What comes out
- `[00:00]` 🖼 `frames/frame_001_00-00.png` — start of recording
OCR: Cart 2 items
- `[00:04]` 🖼 `frames/frame_002_00-04.png` — screen changed
OCR: Applying discount..
- `[00:04]` 📋 W/DiscountEngine: rate field missing
- `[00:06]` 🖼 `frames/frame_003_00-06.png` — screen changed
OCR: TypeError: cannot read 'rate'
- `[00:06]` 📋 E/RideService: NullPointerException at RideRequest.kt:142
- `[00:06]` 📋 F/AndroidRuntime: FATAL EXCEPTION: main
- `[00:06]` 🎙 "ahí está, explota al aplicar el descuento"
A full run is in examples/report.md.
bundle/
├── report.md the chronology above
├── frames/ the key frames, named by timestamp
└── meta.json the same data, structured, for programmatic use
Install
Requires ffmpeg on PATH (brew install ffmpeg).
uvx --from 'bug2context[ocr]' bug2context # OCR: Apple Vision on macOS, tesseract elsewhere
uvx --from 'bug2context[ocr,audio]' bug2context # plus spoken narration
Or from source:
git clone https://github.com/emanueld92/bug2context
cd bug2context
uv sync --extra ocr --extra audio
Every stage is optional and degrades quietly: no OCR backend still gives you frames, no audio track still gives you the visual timeline.
Use it from Claude Code
claude mcp add bug2context -- uvx --from 'bug2context[ocr]' bug2context-mcp
Working from a local clone instead: uvx --from /path/to/bug2context bug2context-mcp.
Then just ask: "analiza este video del bug: ~/Desktop/crash.mp4".
| Tool | Purpose |
|---|---|
analyze_bug_video |
Video → chronological report (returns the text itself) |
get_frame |
Fetch one frame as an image so the agent can look at it |
list_bundles |
Previously processed bundles, newest first |
Bundles default to ~/.bug2context/<video>-<timestamp>/.
Android: screen + logcat in one command
uv run bug2context record --seconds 60 --package com.example.app --out bundle/
Reproduce the bug while it records. Both streams start from a single host timestamp — that anchor is what makes a stack trace land next to the frame showing the crash.
Pass --package. Level filtering alone is not enough on a real phone: a
2 min capture held 7,634 W/E/F lines and none came from the app under test —
they were all AppOpsControllerImpl, GNSSMGT and friends. Scoping to the
app's process left 35. Crash tags (AndroidRuntime, DEBUG) are kept
regardless of process, since a crash report is the whole point.
Logs are captured unfiltered and scoped afterwards, so an app that crashes and
restarts still has its death recorded. Consecutive identical entries fold into
one with a (×N) count — framework chatter arrives in bursts of fifteen.
Already have a log file? Merge it into any video:
uv run bug2context process bug.mp4 --logcat logcat.txt --log-tag RideService
Reads both -v time and -v threadtime. --log-levels defaults to WEF and
--log-max-lines to 80, ranked by severity so a cap never trades the crash for
boot chatter. --log-pid scopes to a process when you already know it. If the device clock and the
recorder disagree, --log-offset shifts everything by N seconds; with no
--video-started-at, the first log entry becomes the anchor.
screenrecord caps at 3 minutes, so record refuses longer rather than handing
back a silently truncated video. Ctrl-C cuts a recording short safely — the file
is finalised on the device first, because killing the local adb leaves one
ffprobe cannot open.
Videos over 10 minutes are refused with the ffmpeg command to trim them
(--max-duration 0 overrides). Nothing scales badly with length except time,
but it scales linearly: decoding alone runs at about a third of real time.
Narration
uv run bug2context process bug.mp4 --transcribe --language es
Off by default: it downloads a model on first use and is the slowest stage, while most recordings have no voice-over. Skipped automatically when there is no audio track, or the track is quieter than −50 dB — whisper invents confident sentences out of silence, so that guard is about output quality, not just speed.
How frames get picked
ffmpeg over-produces candidates (scene cuts and a fixed interval, so slowly
changing screens are not skipped), then perceptual hashing collapses the
near-duplicates. --max-frames caps the result, always keeping the opening frame
and then whichever changed most.
| Flag | Default | Notes |
|---|---|---|
--scene-threshold |
0.08 |
ffmpeg scene score for a cut |
--interval-seconds |
1.0 |
forced sample when no cut fires |
--max-frames |
auto | one frame per 2 s, between 20 and 40 |
--phash-distance |
4 |
below this, frames count as duplicates |
--ocr-upscale |
2 |
enlarge before OCR; skipped above 1600 px wide |
Measured end to end, OCR on:
| Source | Result | Time |
|---|---|---|
| synthetic 3 min, 1080×1920 | 19 frames | 8.5 s |
| Android capture, 2 min, 720×1612 @ ~12 fps | 118 candidates → 20 frames | 16 s |
| macOS capture, 90 s, 2880×1864 @ 60 fps | 97 candidates → 18 frames | 86 s |
Recognised text is cached by frame content in ~/.cache/bug2context/, so
re-running a video with different settings only pays for what actually changed —
measured 9.0 s cold against 3.3 s warm on a 44 s clip, identical output.
Extracting the same video twice yields byte-identical frames, which is what
makes the cache safe. Delete the directory to reset it.
Retina desktop recordings are the slow case and there is no trick to remove: the cost is decoding 60 fps at 5.4 megapixels (26 s) plus OCR, which Vision charges at ~1.6 s per frame regardless of size. Budget roughly real time for those; phone captures stay far under it.
On --ocr-upscale: a stack trace on a recompressed 1080×1920 frame read as
Null PointerSxception Ride Requestkt14 at 1× and correctly as
NullPointerException Ride Request kt 142 at 3×. Raise it for badly
recompressed sources — ask for the video as a file, not as a WhatsApp video.
It is skipped on frames already 1600 px or wider, where it changed nothing
measurable while building a 5760×3728 image per frame.
OCR also drops lines that are debris rather than text — », .lll (100 4,
a misread status-bar clock. On a real capture that removed 41 of 210 report
lines and no real text. A line that looks like a failure is never dropped.
Known limitation
Perceptual hashing compares visual structure. It sees navigation, dialogs and
error banners, but it cannot detect a small text-only change on an otherwise
identical layout — measured on 1080×1920 those differences fall inside the noise
floor at every hash size, so no --phash-distance value separates them.
OCR does not rescue this: it runs on frames that survive deduplication, so a screen already collapsed is never read. Reading every candidate instead measured 48–59 s for a 3 min video, over the entire time budget. If your bug is a small text change on an identical screen, record cropped or at lower resolution so the text occupies more of the frame.
Development
uv sync --extra ocr
uv run pytest -q
183 tests. Device recording is mocked on purpose — a test suite should not record
anyone's phone. Whisper is opt-in via BUG2CONTEXT_TEST_WHISPER=1 so the suite
stays offline.
License
MIT — see LICENSE.
bug2context MCP 질문
bug2context MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add bug2context -- uvx bug2context를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
bug2context MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
API 키나 클라우드 계정이 필요한가요?
아니요, 로컬 우선 도구입니다. 데이터가 기기 외부로 전송되지 않으며 계정이나 API 키가 필요하지 않습니다.
기존 비디오 파일에도 사용할 수 있나요?
네, WhatsApp과 같은 메시징 앱으로 전송된 파일을 포함하여 모든 비디오 파일에서 작동합니다.
Android 로그는 어떻게 처리하나요?
Android 디바이스 화면과 logcat을 동시에 기록할 수 있으며, 두 스트림을 단일 호스트 타임스탬프에 고정하여 스택 트레이스를 시각적 프레임과 일치시킵니다.
설치 요구 사항은 무엇인가요?
시스템 PATH에 ffmpeg가 설치되어 있어야 합니다.