References
Specs, libraries, and prior art that shaped PEN.
Core Specifications
Chrome DevTools Protocol
The CDP spec covers every domain PEN talks to:
| Domain | Purpose | Reference |
|---|---|---|
Runtime | Console messages, JS evaluation | Runtime |
Network | Request/response interception, waterfall | Network |
Page | Navigation, screenshots, lifecycle | Page |
HeapProfiler | Heap snapshots, allocation tracking | HeapProfiler |
Profiler | CPU profiling | Profiler |
Debugger | Source maps, script sources | Debugger |
Tracing | Performance traces | Tracing |
Audits | Lighthouse-style audits | Audits |
Target | Tab management, target discovery | Target |
Model Context Protocol
- Specification: spec.modelcontextprotocol.io/2025-03-26
- Transport: stdio (stdin/stdout JSON-RPC 2.0)
- Capabilities used: Tools (ListTools, CallTool)
- SDK: github.com/modelcontextprotocol/go-sdk
Go Libraries
| Library | Version | Purpose |
|---|---|---|
github.com/modelcontextprotocol/go-sdk | v1.3.1 | MCP server implementation |
github.com/chromedp/chromedp | v0.13.6 | Chrome DevTools Protocol client |
github.com/chromedp/cdproto | (transitive) | CDP type definitions |
github.com/charmbracelet/huh | v1.0.0 | Interactive terminal wizard (pen init) |
github.com/charmbracelet/lipgloss | v1.1.0 | Terminal output styling |
All versions pulled from go.mod. Requires Go 1.24.2+.
Prior Art
Tools and projects that influenced PEN:
| Tool | Relationship to PEN |
|---|---|
| Chrome DevTools | PEN exposes the same browser internals, but over MCP instead of a GUI |
| Puppeteer | Node.js CDP library; PEN uses chromedp (Go) for the same protocol |
| Playwright | Multi-browser automation; PEN is Chrome-only, MCP-native |
| Lighthouse CLI | PEN shells out to the Lighthouse CLI via exec.CommandContext rather than wrapping CDP audit domains directly |
| web-vitals | Client-side metrics library; PEN grabs the same data server-side via CDP |
Architecture References
- Go concurrency:
sync.Mutexfor operation locks,context.Contextfor cancellation, goroutines for event listeners - Graceful degradation: Partial results over hard failures (see Error Handling)
- Token-aware output: Everything shaped for LLM context windows (see Output Design)
Project Links
| Resource | URL |
|---|---|
| Source code | github.com/edbnme/pen |
| Documentation | pen-docs (this site) |
| Go module | github.com/edbnme/pen |
| License | MIT |