Developer Builds WebMCP Agent Using Playwright and Gemini API Outside Chrome Extension
A developer has created a minimal AI agent that connects Google's Gemini API to WebMCP tools running inside a real Chrome browser, using Playwright for browser automation. WebMCP allows web pages to expose tools that AI agents can discover and execute, but testing them with powerful models was previously limited to the Model Context Tool Inspector Chrome extension. To avoid building another extension, the developer used Playwright to launch and control Chrome directly, enabling Gemini to request tool calls that Playwright then executes within the live page. The project is built on Node.js with TypeScript, using the @google/genai SDK and dotenv for configuration. The approach requires enabling an experimental WebMCP flag in Chrome and offers a lightweight alternative for developers who want to test WebMCP tools with stronger AI models.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in