Built for AI Agents
bdg is designed from the ground up for programmatic consumption by AI agents. Unlike traditional browser automation tools that prioritize human ergonomics, bdg optimizes for information density, predictability, and token efficiency.Why bdg Over MCP?
We benchmarked bdg against Chrome DevTools MCP Server on real developer debugging tasks.Token Efficiency
33% better token efficiency through selective queries vs full accessibility tree dumps
Capability Coverage
300+ CDP methods exposed directly vs MCP’s limited tool set
CLI Score
77/100 points on benchmark suite
MCP Score
60/100 points on same suite
Benchmark Highlights
| Capability | bdg | MCP |
|---|---|---|
| Console errors with stack traces | ✓ Full | Partial |
| Memory profiling | ✓ | ✗ |
| Network HAR export | ✓ | ✗ |
| Batch JavaScript execution | ✓ | ✗ |
| Selective DOM queries | ✓ | ✗ |
| Direct CDP method access | ✓ 300+ | ✗ |
Full benchmark analysis: MCP vs CLI for AI Agents
Self-Documenting Features
bdg implements progressive discovery - agents learn capabilities through interaction, not documentation.Machine-Readable Help
Domain Introspection
Agents can discover all 644 CDP methods without external documentation:Semantic Search
Agents can search by concept without knowing exact method names:Real-World Examples
Example 1: Memory Leak Detection
bdg provides direct CDP access for performance debugging:44% embedder heap growth detected - clear indication of memory leak
Example 2: Batch Operations
bdg enables efficient batch testing through JavaScript evaluation:This captured 18 errors (14 unique) in a single operation - impossible with MCP’s click-by-click approach
Example 3: Network Analysis
Export network activity to standard HAR format:Example 4: Form Testing
Token-efficient form interaction with automatic validation:Token Efficiency in Practice
Selective Queries vs Full Dumps
| Approach | bdg | MCP |
|---|---|---|
| Query strategy | Fetch what you need | Dump everything |
| 195-option dropdown | ~50 tokens | ~5,000 tokens |
| Complex page (Amazon) | ~1,200 tokens | ~52,000 tokens |
Real Benchmark Data
Form validation testing:- bdg: 3,500 tokens for 4 test scenarios
- MCP: 15,200 tokens for 3 test scenarios
- 4.3× more efficient with better coverage
- bdg: 18,700 tokens capturing 18 errors (14 unique)
- MCP: 9,300 tokens capturing 3 errors
- 6× more errors for 2× tokens = better value
Token Efficiency Score
bdg: 202.1 (Score × 100 / Tokens in thousands)MCP: 152.3+33% advantage for bdg
Unix Composability
bdg output pipes naturally with standard Unix tools:All commands separate data → stdout and logs → stderr for clean piping
Predictable Output
Agents can estimate token cost before calling:take_snapshot which returns unpredictable output:
- Could be 5K tokens
- Could be 52K tokens
- Agent cannot control size
When to Use bdg
Use bdg
- Developer debugging workflows
- Memory/performance profiling
- Network analysis with HAR export
- Batch operations and testing
- Token-constrained agents
- Unix pipeline integration
Consider MCP
- Cross-platform integration needs
- Sandboxed environments
- WCAG compliance auditing
- Already invested in MCP infrastructure
Next Steps
Discovery Pattern
Learn how agents discover capabilities programmatically
Error Handling
Semantic exit codes and recovery suggestions
Benchmarks
Full CLI vs MCP benchmark analysis

