feat: Add headless browser MCP tools for AI agent web automation#22
Open
root3315 wants to merge 1 commit intogoogle:mainfrom
Open
feat: Add headless browser MCP tools for AI agent web automation#22root3315 wants to merge 1 commit intogoogle:mainfrom
root3315 wants to merge 1 commit intogoogle:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #14
Adds 9 browser tools (navigate, click, type, screenshot, evaluate, getText, fillForm, getContent, close) backed by Playwright running on the host. Browser starts lazily on first tool call, maintains stateful session across calls.
Architecture
Node.js Playwright server runs on host, Rust wrapper manages process lifecycle via subprocess with HTTP API. All calls logged to session.db telemetry.
Key files
crates/capsem-core/src/mcp/browser_tools.rs(new, 1244 lines)crates/capsem-core/src/mcp/playwright_server.js(new, 160 lines)skills/dev-browser/SKILL.md(new documentation)crates/capsem-core/src/mcp/gateway.rs(updated for browser routing)Requirements
Node.js + Playwright on host:
Testing
cargo test -p capsem-core mcp::browser_tools