
GhostQA
io.github.SyncTekLLC由 GitHub 帳號 SyncTekLLC 發布v0.2.2更新於 Oct 24, 2026
AI personas navigate your web app in real browsers, find bugs and UX issues. No scripts needed.
概覽
GhostQA(SpecterQA)讓 AI 角色在真實瀏覽器中走訪你的 Web、macOS 或 iOS 應用程式,找出缺陷與使用體驗問題,並以 MCP 工具形式提供這些測試。
- 可以做什麼
- 對已設定的產品執行行為測試,可依 smoke 等層級篩選,並回傳結構化執行報告
- 列出已設定的產品及其可用旅程
- 依執行 ID 取回先前執行的完整結構化結果
- 在指定目錄初始化含範例設定的新專案
- 執行由 YAML 中的角色與旅程驅動:引擎擷取畫面、請 Claude 視覺模型決定下一步動作,再由 Playwright 執行,並保存截圖、發現項目與費用明細作為證據
- 適用情境
- 適合希望助理像真實使用者一樣操作執行中的應用程式、在不撰寫選擇器或測試腳本的情況下回報體驗與版面問題,或在 Claude Desktop、Cursor 等 MCP 用戶端中直接觸發並讀取這些測試的情境。
- 執行需求
- 本機 Python 套件(需 Python 3.10 以上),安裝時須包含 mcp 附加項目,並透過其安裝指令下載 Playwright 瀏覽器二進位檔。必須以 ANTHROPIC_API_KEY 提供 Anthropic API 金鑰。macOS 與 iOS 模擬器測試需選用的 native 附加項目。目標應用程式須可連線,且需有包含產品、角色與旅程 YAML 的專案目錄。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 GhostQA,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
SpecterQA
[PyPI version] [Python 3.10+] [License: MIT] [CI] [MCP Compatible] [FTI Trust Score]
AI personas walk your app so real users don't trip.
SpecterQA sends AI personas through your application — they look at the screen, decide what to do, and interact like real humans. No test scripts. No selectors. You describe personas and journeys in YAML, and SpecterQA handles the rest.
What is this?
Traditional E2E tests are brittle. You write selectors, they break. You maintain scripts, they rot. SpecterQA takes a different approach: AI vision models look at your actual UI and navigate it the way a person would.
You define personas (who is using your app) and journeys (what they're trying to do). SpecterQA's engine takes a screenshot, sends it to a Claude vision model, gets back a decision ("click this button", "fill this field"), executes it via Playwright, takes another screenshot, and repeats until the goal is achieved or something goes wrong.
When something goes wrong, you get evidence: screenshots, UX observations, cost breakdowns, and findings categorized by severity.
Installation
SpecterQA is distributed via PyPI and requires Python 3.10 or later.
After installing, download the Playwright browser binaries:
For macOS native app testing and iOS Simulator support, install the optional native extra:
For MCP server support (integrating SpecterQA as a tool in Claude Desktop, Cursor, or other MCP clients):
You will also need an Anthropic API key to run tests:
To verify the installation:
Quick Start
You'll need an Anthropic API key:
That's it. Three commands and an API key.
How It Works
The core loop is simple:
- Screenshot -- Playwright captures the current page state as a PNG
- Decide -- A Claude vision model receives the screenshot + persona context + goal, returns a structured JSON action (
click,fill,navigate,scroll,keyboard,wait,done, orstuck) - Execute -- Playwright performs the action (click at coordinates, type text, navigate to URL, etc.)
- Repeat -- Loop until the goal is achieved, the agent gets stuck, or the budget runs out
The persona's profile shapes how the AI behaves. A "tech-savvy developer" explores differently than a "frustrated first-time user." Persona patience, tech comfort, and frustrations all influence the system prompt.
Model routing keeps costs down. Simple actions (click, scroll) use Haiku. Complex actions (form filling, initial assessment) use Sonnet. You can also route simple actions to a local Ollama model (llava:13b) for zero API cost on straightforward navigation.
Features
- Persona-based testing -- Define AI users with backgrounds, goals, frustrations, and tech comfort levels. They don't just follow scripts; they react to what they see.
- Vision-powered -- No selectors, no DOM queries. The AI interprets screenshots like a human would. Catches visual/layout issues that selector-based tests miss entirely.
- YAML-configured -- Products, personas, and journeys are all YAML files. PMs can read them. No code to maintain.
- Budget enforcement -- Per-run, per-day, and per-month cost caps. The engine hard-stops if you hit the limit. No surprise bills.
- JUnit XML output -- Drop
--junit-xml results.xmland plug it into any CI system. - Tiered model routing -- Haiku for cheap navigation, Sonnet for complex reasoning, optional local Ollama for zero-cost simple actions.
- Multi-platform -- Web apps (via Playwright), macOS native apps (via Accessibility API + pyobjc), iOS Simulator (via simctl). Same YAML format, different runners.
- Evidence collection -- Every run produces screenshots, a findings report, cost breakdown, and a structured JSON result. Everything is saved to an evidence directory.
- Stuck detection -- If the AI repeats the same action or the UI stops changing, the engine escalates to a stronger model, then aborts if nothing works. No infinite loops.
- Template variables -- Use
{{persona.credentials.email}}in your journey steps. Variables resolve from persona configs at runtime. - Precondition checks -- Verify services are up before running tests. Fail fast with clear errors instead of wasting API calls.
Configuration
SpecterQA uses three types of YAML config files, all living in .specterqa/:
Product (products/myapp.yaml)
Persona (personas/alex-developer.yaml)
Journey (journeys/onboarding.yaml)
See docs/configuration.md for the full reference.
YAML schema support
SpecterQA includes a JSON Schema for product YAML files at schemas/product.schema.json.
CI Integration
SpecterQA is built for CI. It runs headless by default and returns proper exit codes.
Exit codes:
0-- all tests passed1-- one or more tests failed2-- configuration error3-- infrastructure error (missing dependencies, API unreachable)
See docs/ci-integration.md for GitHub Actions, GitLab CI, and CircleCI examples.
Cost
SpecterQA uses Anthropic's Claude API. Every run costs money. Here's what to expect:
Typical costs per run:
- 3-step smoke test: ~$0.30-0.60
- 5-step standard journey: ~$0.50-1.50
- Complex 10-step journey with forms: ~$1.00-3.00
The default budget is $5.00 per run. The engine hard-stops if the budget is exceeded -- no silent overruns. You can set per-day and per-month caps too.
You can also set a default budget via an environment variable to avoid passing --budget every time:
Model routing helps: simple clicks and scrolls use Haiku ($0.01 per action), while form fills and initial assessments use Sonnet ($0.03-0.05 per action). If you have a local Ollama instance, simple actions can route there for zero API cost.
See docs/cost-guide.md for detailed cost breakdowns and budgeting strategies.
Multi-Platform
SpecterQA isn't web-only. The same persona/journey YAML format works across platforms:
Web apps (default) -- Uses Playwright for browser automation.
macOS native apps -- Uses the macOS Accessibility API via pyobjc. The AI reads the accessibility tree and screenshots, then executes clicks and keypresses through AX actions.
iOS Simulator -- Uses simctl for screenshots and touch simulation. Useful for testing iOS apps without a physical device.
Native and simulator support require the native optional dependency:
For AI Agents
If you're an AI agent or building agent tooling, SpecterQA provides structured interfaces for programmatic use.
CLI with JSON output
Returns structured JSON to stdout:
Python API
Federated Protocol
SpecterQA exposes a protocols.py module with Python Protocol classes (AIDecider, ActionExecutor) that let you swap in your own AI model or action backend:
MCP Server
SpecterQA ships an MCP (Model Context Protocol) server. Any MCP-compatible agent (Claude Desktop, Cursor, Cline, custom agent tooling) can discover and invoke SpecterQA as a tool -- run tests, read results, manage configs -- without shelling out to the CLI.
Add to your MCP client config (claude_desktop_config.json or equivalent):
Available tools:
See docs/for-agents.md for the full programmatic API reference and MCP integration details.
API Reference
The complete API reference is available at specterqa.synctek.io/docs.
Key classes
CLI reference
MCP tools
For schema definitions, type stubs, and federated protocol details, see docs/for-agents.md.
Security
Directory access: When the environment variable SPECTERQA_ALLOWED_DIRS is unset, the SpecterQA MCP server permits the directory parameter of specterqa_run to point at any path on the filesystem accessible to the process. In shared or multi-user environments — or anywhere the MCP server is exposed to untrusted agents — you should set this variable to an explicit allowlist:
When set, the MCP server rejects any directory value that is not under one of the listed prefixes. This mitigates the MCP directory traversal vector described in SECURITY_ADVISORY.md (GHSA-SPECTERQA-001).
Command injection fix (v0.2.1): The check_command field in product YAML service definitions has been removed. It was the source of a critical command injection vulnerability. Precondition checks are now limited to TCP connectivity and HTTP health endpoint checks, which are safe. See SECURITY_ADVISORY.md for full details.
Credential scrubbing: Run artifacts (JSON result files, log output) automatically scrub known credential patterns — API keys, tokens, passwords — from captured content before writing to disk.
Reporting vulnerabilities: Do not open public issues for security bugs. Email [email protected] or see SECURITY.md for the full disclosure policy.
Limitations
Be honest with yourself about what this is and isn't:
- Requires an Anthropic API key. No API key, no testing. There's no free tier built into SpecterQA itself.
- Costs money. Every run makes API calls. A typical 3-step journey costs $0.30-0.60. Budget enforcement prevents surprises, but the meter is always running.
- Vision models aren't perfect. The AI sometimes misreads small text, clicks the wrong element, or gets confused by complex layouts. It's good, not infallible. You'll occasionally see false positives and false negatives.
- Not a replacement for unit tests. SpecterQA tests behavioral UX flows. It doesn't test your business logic, data integrity, or edge case handling. Use it alongside your existing test suite, not instead of it.
- macOS native testing requires pyobjc. The
specterqa[native]extra pulls in pyobjc packages (~200MB). Only needed for native macOS and iOS Simulator testing. - Alpha software. Version 0.4.0. APIs may change. File structure may change. Expect rough edges.
- Single-persona per journey (for now). Multi-persona concurrent testing (e.g., simulating a chat between two users) is on the roadmap but not yet supported.
- Deterministic reproduction is hard. Because the AI makes decisions at runtime, the exact sequence of actions varies between runs. Same journey, same persona, slightly different clicks. This is by design (it catches more issues) but makes exact reproduction tricky.
Contributing
Contributions welcome. The repo is at github.com/SyncTek-LLC/specterqa.
Open an issue before starting large PRs. We'd rather discuss the approach first.
License
MIT -- see LICENSE for details.
Built by SyncTek LLC.
來源:README.md,提交 3441d0e
工具
0版本歷史
1- v0.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分