mk-qa-master
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| JIRA_EMAIL | No | Required if SPEC_SOURCE=jira. | |
| FIGMA_TOKEN | No | Required if SPEC_SOURCE=figma. | |
| SPEC_SOURCE | Yes | Adapter to use (markdown_local / github_issues / linear / jira / notion / figma) | |
| GITHUB_TOKEN | No | Optional. GitHub token for github_issues adapter (falls back to gh CLI if unset). | |
| NOTION_TOKEN | No | Required if SPEC_SOURCE=notion. | |
| JIRA_BASE_URL | No | Required if SPEC_SOURCE=jira (e.g., https://your-domain.atlassian.net). | |
| JIRA_API_TOKEN | No | Required if SPEC_SOURCE=jira. | |
| LINEAR_API_KEY | No | Required if SPEC_SOURCE=linear. | |
| SPEC_PROJECT_KEY | No | Optional. Team key (Linear), project key (JIRA), database ID (Notion), file key (Figma). | |
| SPEC_PROJECT_ROOT | Yes | Root path; traceability index stored at SPEC_PROJECT_ROOT/.mk-spec-master/index.json |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_runner_infoA | 回傳目前由 QA_RUNNER 環境變數選定的測試 runner(pytest / jest / cypress / go / maestro 五選一)加上 server 編譯時內建的全部 runner 清單。建議每個 session 第一個呼叫——AI 用它判斷後續該產 Playwright .py 還是 Maestro .yaml、要不要 headed browser,避免後面拿錯模板。也用來確認專案環境設定正確:QA_PROJECT_ROOT 指對地方、QA_RUNNER 沒拼錯。回傳 shape:{active: 'pytest', available: ['pytest', 'jest', ...]}。 |
| list_testsA | 用 runner 的原生 collection 機制列出受測專案內所有可執行測試:pytest 走 |
| run_testsA | Execute the test suite under the active QA_RUNNER and produce a structured report. The single most-called tool — invoke whenever a user says 「跑/run/test/check/驗證/執行」, after generate_test (verify new test), or after a fix (confirm bug gone). Behavior:
When to use:
When NOT to use:
Edge cases:
Plan bookend (v0.10.0): pass |
| run_failedA | 只重跑上次失敗的測試——比跑整套套件快很多,適合修完一個 bug 後驗證迭代。pytest 走 |
| get_test_reportA | 讀上一次 run_tests 留下的 report.json,回傳一個輕量摘要:total / passed / failed / skipped / flaky_in_run(auto-retry 救回的數量)/ duration(秒)。比再跑一次 suite 便宜得多——適合在連續操作中間反覆查狀態。未跑過時回 {error: 找不到報告,請先執行 run_tests}。拿到摘要後若 failed > 0,接 get_failure_details 拿錯誤細節。 v1.3.0+: Edge AI runner attaches an optional |
| get_failure_detailsA | Extract full root-cause-analysis materials for every failed test in the most recent run. Behavior:
When to use:
When NOT to use:
Edge cases:
|
| generate_testA | 產生 pytest-playwright 測試骨架。推薦流程:先呼叫 analyze_url 拿 candidate_tcs,再對每條想覆蓋的 TC 呼叫一次 generate_test、把該 candidate_tc 整段字串當 description 傳入 — 這段會自動寫成 test 函式的 docstring,HTML 報告會把它當作 case 名稱顯示。若提供 url+module(來自 analyze_url 的 modules[]),會用 selectors 預填可執行版本。若想一次處理整個 URL、不想自己編排,請改用 auto_generate_tests。 |
| codegenA | Launch interactive test recording for the active runner. Useful as a baseline-builder before refining with generate_test. Behavior:
When to use:
When NOT to use:
Edge cases:
|
| generate_html_reportB | 把最近一次 run_tests 的結果渲染成單檔自包含 HTML——base64 內嵌截圖、嵌入式 step list、history sparkline 走勢、折疊的 Passed 區塊、展開的 Failed cards。沒外部 CSS/JS 依賴,可以直接寄信、丟靜態 host、貼到 Slack。預設輸出 PROJECT_ROOT/report.html。實作位於 reporters/html.py,走 sample_report.html 同款設計。 |
| get_test_historyA | 遍歷 test-results/history/*.json 快照(每次 run_tests 完會自動歸檔),回傳逐次摘要:timestamp / total / passed / failed / skipped / duration / pass_rate(0-100)。用於 flake 分析(『這條測試上週一直 fail 嗎』)、速度退化分析(『duration 是不是越來越長』)、覆蓋趨勢圖。預設回最近 10 次,limit 可調 1-100。想要可執行行動建議的話接 get_optimization_plan,它已綜合 history + telemetry。 |
| get_optimization_planA | 綜合 history/ 快照、telemetry tool-usage、analyze_url 偵測過的 modules,產出三層自我強化分析:(1) 測試套件品質:每條 test 算 outcomes 字串(PFPFP 那種)→ flake_score、再對失敗 error signature 做指紋比對,連 3 次相同 signature 升級為 broken,duration 退化超 1.5x 標記 slow_regression,否則 stable_passing;(2) MCP 使用模式:top tool、重複 args、錯誤率、常見呼叫鏈(A→B 共現);(3) AI 產測效益:generate_test 寫的 test 有沒有出現在下一次 run、analyze_url 偵測到的 module 對不對得到 test 檔(採用率 vs 覆蓋缺口)。回傳結構化 JSON 並同步寫進 PROJECT_ROOT/optimization-plan.md。每次 run_tests 結束會自動 trigger 一次、所以這個 tool 用來「即時讀」結果。 |
| analyze_urlA | Probe a live web page in headless Chromium and return a structured map of testable modules plus the API endpoints the page actually called. The web counterpart of analyze_screen. Behavior:
When to use:
When NOT to use:
Edge cases:
Plan bookend (v0.10.0): pass |
| analyze_screenA | Mobile 版的 analyze_url:透過 |
| analyze_streamA | v1.1.0 — Edge AI version of analyze_url / analyze_screen. Probes an RTSP stream (or a file path destined for local mediamtx) and returns basic geometry (width / height / fps) plus a candidate_tcs list. When an annotations sidecar (JSON: per-frame expected detections) is supplied, candidate_tcs gets one entry per discovered label PLUS four runner-standard entries (throughput, latency SLA, reconnect, empty-frame). Strings only — same schema parity as analyze_url's candidate_tcs. Vendor-host blacklist (default-on): refuses RTSP URLs at known surveillance / IoT camera vendor domains (Dahua / Hikvision / etc.) to keep accidental probing of public camera feeds off the default path. Set QA_EDGE_ALLOW_VENDOR_HOSTS=true to opt out for own-camera testing. Requires the Returns on success: {url, width, height, fps, labels, candidate_tcs}. Returns on rejection: {error: bad_request | forbidden_vendor_host | missing_extras | stream_unreachable, hint, ...}. |
| init_qa_knowledgeA | 在受測專案根 (PROJECT_ROOT) 建立 qa-knowledge.md 起手範本,含業務規則 / 歷史 Bug / 標準斷言文字 / User Journeys / 技術約束 5 個 H2 區段,每段都有 TODO 提示。Idempotent:檔已存在不會覆蓋(除非 overwrite=true)。新用戶建議第一次跑 MCP 就先 call 一次。這份檔案後續會被 get_qa_context 讀、做為 business_context 傳進 generate_test,讓 AI 寫出有業務邏輯的測試(而不是泛例 monkey testing)。 |
| get_qa_contextA | 讀取受測專案的 qa-knowledge.md(業務規則 / 歷史 Bug / 標準斷言文字 / User Journeys 等領域知識),用 ## H2 區段拆分。用法:先 call 拿到整份或指定 section,再把相關段落以 business_context 傳給 generate_test,產出的 test 就會自帶業務知識註解 — 跳脫 monkey testing。若檔案不存在會 fallback 到內建的 ISTQB 七大原則 + 等價分割 + 邊界值 + 決策表 + 狀態轉換 + Mobile checklist 通用知識,先用著也可以;之後跑 init_qa_knowledge 建立專案專屬版本。 |
| inspect_visual_challengeA | Detect a reCAPTCHA v2 image-grid challenge on the active page, screenshot it, and return tile metadata. The AI client (Claude / Cursor / Gemini — multimodal) uses its own vision to identify which tiles to click, then calls solve_visual_challenge with the selected indices. Requires QA_VISUAL_CHALLENGE_CONSENT=true at the server level; without it, returns a structured Returns: {challenge_id, screenshot_base64, challenge_text, grid_layout ('3x3'|'4x4'), tile_count, tiles[{index, viewport_x, viewport_y, w, h}], expires_at, fingerprint}. Error shapes: consent_required / unauthorized_domain / forbidden_domain / no_challenge_present / no_active_page / detection_failed — same {error, retryable, hint} envelope as every other runner. Scope: reCAPTCHA v2 image-grid only in v0.7.0 (hCaptcha → v0.7.1; v3 / Turnstile permanently out of scope). Pair with solve_visual_challenge — this tool alone never clicks anything. |
| solve_visual_challengeA | Apply the AI client's tile selection, execute the click chain, click Verify, wait for the reCAPTCHA token, and return the outcome. Pairs with inspect_visual_challenge — must be called with the Requires DYNAMIC-REPLACE MODE (v0.7.4): when the challenge prompt says 'Click verify once there are none left' (en) / '確定沒有遺漏' (zh), clicked tiles get replaced with new images. solve detects this and returns Returns: {status: 'passed' | 'continue' | 'failed' | 'expired' | 'consent_required' | 'confirm_required' | 'challenge_not_found' | 'error', challenge_id, attempts_remaining, token (only on passed), hint, plus on 'continue': screenshot_base64, tiles, tile_count, grid_layout, rounds_used}. Telemetry logs the boolean outcome only — no screenshots, no challenge text, no tile selection are ever persisted. Plan bookend (v0.10.0): pass |
| auto_generate_testsA | 一鍵交付:在內部依序做 analyze_url → 為每個偵測到的 module 用 candidate_tcs 內容各跑一次 generate_test,把整套 pytest 測試骨架寫進 PROJECT_ROOT/tests/。等同於『analyze_url 後對每個 module 手動跑 N 次 generate_test』的自動化版本,適合「給我一個 URL、其他你看著辦」這種快速覆蓋場景。每條 candidate_tc 變成對應 test 函式的 docstring,run_tests 跑完 HTML 報告會用 docstring 當 case 名稱顯示。回傳產生的檔案路徑列表 + 每個 module 對應幾個 test。預設每個 module 1 條,想要更密的覆蓋拉 tests_per_module。 Plan bookend (v0.10.0): pass |
| run_api_security_scanA | v0.8.0: OWASP API Security Top 10 (2023) rule-based scanner. Loads an OpenAPI 3.x spec, walks each path × method, and dispatches v0.8's 5 in-scope rules — BOLA (API1), Broken Authentication (API2), Mass Assignment (API3, opt-in), Function-Level Authz (API5), Security Misconfiguration (API8). Returns a v0.8 security report block with per-finding rule_id, severity (critical/high/medium/low/info), endpoint, evidence dict, and remediation_hint. Requires QA_API_SECURITY_CONSENT=true at the server level. Non-localhost hosts must be in QA_API_SECURITY_AUTHORIZED_DOMAINS (comma-separated). mass_assignment mutates server state — opt in by passing it in v0.9.4 — Pass Returns: {scan_id, spec_url, base_url, categories_run, rules_ran, ops_scanned, severity_threshold, findings[...], summary{total, by_severity}, findings_below_threshold_count, plan_verification (only when plan_id given)}. Error shapes: consent_required / unauthorized_domain / spec_load_failed / no_base_url / unknown_categories / bad_severity_threshold. |
| qa_planA | v0.9.1 — Store a critical-points checklist before acting on a QA task. The host LLM declares what success looks like (test passes, scan finds X, screenshot shows Y), this tool stores it, returns a Plans live 30 minutes (cache TTL) in memory and are LRU-bounded at 50 outstanding. v0.9.3 — disk persistence: when QA_PROJECT_ROOT is set (or QA_PLAN_PERSIST=true), the plan is also dumped atomically to /test-results/plans/.json. verify_plan transparently falls back to disk on in-memory misses, so plans survive process restarts and cache eviction. Expiry is still honored on disk reads — a TTL'd plan won't silently reload. Persistence is best-effort: filesystem errors never raise into the caller. Returns: {plan_id (12 hex chars), task, kind, critical_points [{id, description, verification_hint}], created_at, expires_at, persisted_to (filesystem path or null when persistence is off)}. Error shapes: no_task / no_critical_points / bad_critical_points (duplicate id, missing description, wrong type) / bad_kind. |
| verify_planA | v0.9.1 (extended v0.9.2 with auto-discovery) — Walk a plan's critical points and check each against evidence. Pairs with Matching rule: a CP is satisfied when its verification_hint appears (case-insensitively, as a substring) in any evidence item's stringified form. Evidence items may be strings, dicts, or nested structures — the matcher flattens them. v0.9.2 — auto_discover mode: set status semantics:
Even if the host claims 'all good', verify_plan returns 'incomplete' when any CP is unsatisfied. That's the design — ground truth wins over capability claims. v0.9.3 — When persistence is enabled (see qa_plan), an in-memory cache miss transparently falls back to disk. The response's Returns: {plan_id, task, kind, status, checklist[{id, description, verification_hint, satisfied, matched_evidence}], unmet[], summary{total, satisfied, unsatisfied}, evidence_sources{explicit_count, autodiscovered, autodiscovered_count, report_path}, plan_source ('memory' or 'disk'), verified_at}. Error shapes: no_plan_id / plan_not_found / no_evidence (only when both explicit evidence AND auto_discover are omitted) / bad_evidence. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Latest Test Report (HTML) | 最近一次測試報告,即時渲染為自包含 HTML |
| Latest Test Report (JSON) | 原始 report.json(各 runner 的原生格式) |
| Optimization Plan (Markdown) | 自我強化分析:每跑完一次自動產出的下一輪行動清單 |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/kao273183/mk-qa-master'
If you have feedback or need assistance with the MCP directory API, please join our Discord server