BugScout
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🐞 BugScout
Let your AI hunt bugs — safely, in Docker, with receipts.
English · العربية · مصري · خليجي · شامي · الدارجة · Español · Français · Deutsch · Português · 中文 · 日本語 · Русский · हिन्दी · Türkçe · 한국어
Table of contents
Why you need this · What it does · How it works · Quick start · Usage · Guards · What was verified · Docs · Contributing · License
Related MCP server: Sandbox MCP
Why you need this
Letting an AI agent "go test my code" usually ends one of three ways: it runs untrusted code on your machine, it forgets what it already tried and loops, or it reports a "bug" that was a flaky test. BugScout is the missing substrate:
Problem with a bare agent | What BugScout does about it |
It executes target code on your laptop | Everything that runs target code runs in a locked-down Docker sandbox (no network, dropped capabilities, CPU/memory limits) |
It has no memory and repeats itself | An asset graph and an append-only exploration tree in Postgres; duplicate test ideas return the existing node |
It hits | Server-side guards: scope, destructive actions, budget, stuck detection, human confirmation for serious bugs |
It reports flaky or one-off failures as bugs | A failure is re-run before it counts; one that does not reproduce becomes |
You (or rather the LLM host: Claude Code, Codex) do the planning. BugScout stores, executes, checks and enforces.
What it does
Maps a Python package or an OpenAPI spec into a graph of functions, classes, endpoints and their relations.
Static stage: complexity (radon), lint (ruff), types (mypy), security (bandit), copy-paste (duplication), dead code (vulture).
Dynamic stage: pytest, Hypothesis property tests, schemathesis, hand-made HTTP requests, user-written rules.
Oracles: crash / HTTP 5xx, response schema, behaviour diff against the previous git commit, your own invariants.
Quality: coverage per function and per test, mutation score, flaky-test detection, duplicate-test detection.
Performance: empirical time complexity (O(n²) vs the allowed O(n log n)), benchmark regressions between commits, CPU hotspots, memory hogs, API profiling.
Reports the deduplicated result: bugs, static issues, coverage, hotspots, regressions.
42 tools, 7 read-only resources (run://{id}/…) and 3 prompts (testing_loop, write_charter, triage_bug).
How it works
host (Claude Code / Codex) ──MCP──▶ BugScout (FastMCP server)
├─ Postgres runs · asset graph · exploration tree · findings · events
├─ guards scope · destructive · budget · stuck · serious-bug
└─ Docker bench (tools + tests) · sut (your API) · ref (previous commit)The host sends a charter: target, scope, oracles, rules, budget.
It works the loop in the
testing_loopprompt: map → static stage → run tests → check oracles → record bugs → performance pass → report.Every executing call passes the guards first. An escalation pauses only its own branch; the host moves on.
record_bugre-runs the repro, fingerprints it and deduplicates. High and critical bugs wait for a human.
Quick start
git clone https://github.com/yassienashrafwasfy/bugscout && cd bugscout
docker compose up -d postgres # Postgres 16 (user/password: test/test)
docker build -t bugscout-sandbox:latest sandbox
uv sync
uv run bugscout # stdio; migrations run on startUsage
Claude Code — .mcp.json in the repo root (already included):
{ "mcpServers": { "bugscout": { "command": "uv", "args": ["run", "bugscout"],
"env": { "DATABASE_URL": "postgresql://test:test@localhost:5432/bugscout" } } } }Codex — ~/.codex/config.toml:
[mcp_servers.bugscout]
command = "uv"
args = ["run", "--directory", "/path/to/bugscout", "bugscout"]
env = { DATABASE_URL = "postgresql://test:test@localhost:5432/bugscout" }Then tell your agent: "Use the testing_loop prompt from bugscout and test ./my_project." (Use write_charter to build the charter together.)
A minimal charter:
{ "target": {"kind": "python", "repo_path": "/path/to/repo", "package": "mypkg"},
"scope": {"include": ["mypkg/*"], "exclude": []},
"oracles": ["crash", "diff_git", "rule"],
"reference": {"git_ref": "HEAD~1"},
"budget": {"max_steps": 300, "max_requests": 1000, "max_minutes": 60} }Try it on the planted-bug examples in examples/ (sample_lib, sample_api).
Guards
Guard | Behaviour |
Scope | A target outside |
Destructive |
|
Budget | Steps, requests, minutes; warning at 90 %, hard stop at 100 % |
Stuck | No new findings / progress over a window of steps raises one escalation |
Serious bug |
|
What was and was not verified
Seedocs/REFERENCE.md for the per-phase table.
Automated: 39 tests against real Postgres and real Docker containers, including a scripted-host e2e over a stdio server that finds every planted bug in both examples.
Live: one real Claude Code session (
claude -pfollowingtesting_loop) found both planted bugs insample_apifor about $0.22; seedocs/LIVE_RUN.md. Not yet run live:sample_lib, Codex.
Docs
docs/REFERENCE.md: all tools, charter fields, sandbox details, design notes · examples/: planted bugs · .github/workflows/ci.yml: CI.
Contributing
Issues and PRs are welcome. Run uv run pytest -m "not docker" for the quick suite and uv run pytest -m docker (one file at a time, on an idle machine) for the sandbox, oracle and performance tests.
License
Star history
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Package, dependency, CI and config safety checks for coding agents. Pay per call.
Proves AI-generated Python does what you asked: lint, types, security, sandbox run, exact fixes.
QA platform for agents: coverage signals, in-repo test plans, verified tests and release governance.
Test your AI agents for security and safety weaknesses, and re-verify the fixes.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceRuns, tests, and finds issues in your Python services with zero code changes, then helps your AI agent fix what breaks and proves it with acceptance tests.48Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI coding agents to safely run commands, install dependencies, test, and modify code inside disposable, policy-enforced Docker sandboxes isolated from the host, returning results and diffs.15MIT
- AlicenseAqualityCmaintenanceEnables coding agents and CI/CD pipelines to audit untrusted code by detecting Python sandbox escapes, SQL injection taint, ReDoS regex vulnerabilities, and CORS misconfigurations, while generating Seccomp BPF filters for safer execution.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run cybersecurity reconnaissance and analysis tools through controlled containerized sandboxes, with input validation, policy allowlists, timeouts, structured JSON output, and immutable audit logging.MIT