Enables automated web browsing and interaction using the Firefox browser engine, allowing for tasks such as site navigation, data extraction, and web automation within a secure, proxy-monitored environment.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@KagamiGo to news.ycombinator.com and list the top 5 stories."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kagami
Claude Code Web exclusive Playwright MCP server. Enables browser automation via JWT authentication proxy.
Overview
This project is designed exclusively for Claude Code Web environment and provides an MCP (Model Context Protocol) server for using Playwright.
Important: This project is designed to work only in Claude Code Web environment. It will not work in local environments or other environments.
Key Features:
Auto-setup functionality (automatically installs required components on first startup)
External access via JWT authentication proxy
Automation using Firefox browser
Automatic CA certificate import
MCP protocol compliant
Architecture
mcp.py: MCP server entry point. Responsible for initial setup and launching proxy.py
@playwright/mcp: Playwright MCP server implementation (Node.js)
Firefox: Browser engine
proxy.py: Local proxy server
JWT Auth Proxy: Authentication proxy for external access
Setup
Automatic Setup (Recommended)
The following will be automatically set up on first startup:
certutil installation
@playwright/mcp installation
Firefox installation
Firefox profile creation
CA certificate import
Configuration file generation
Note:
First startup may take 30 seconds or more
Usage
Launch as MCP Server
Configure in .mcp.json and Claude Code will automatically launch it:
File Structure
Technical Details
Startup Flow
mcp.py uses a two-phase setup approach to avoid timeout issues:
Phase 1: Synchronous Setup (runs before responding)
Minimal Setup (
setup_minimal.py)Install
@playwright/mcpvia npmCreate minimal Firefox configuration file
Fetch Tool List
Start temporary
@playwright/mcpprocessFetch available tool definitions
Store tool list for immediate response to
tools/listrequestsTerminate temporary process
Start MCP Server
Begin responding as MCP server
Return stored tool list for
tools/listrequestsReturn "setup in progress" error for
tools/callrequests
Phase 2: Asynchronous Setup (runs in background)
Full Setup (
setup_mcp.py- runs in background thread)Install
certutil(for certificate management)Install
proxy.pyvia uvInstall Firefox browser
Create Firefox profile (
/home/user/firefox-profile)Import CA certificates for TLS inspection
Generate final configuration file
Start Services
Start
proxy.py(localhost:18915)Start
@playwright/mcpwith full configurationBegin proxying all requests to
@playwright/mcp
Communication Flow (After Setup)
Claude Code sends request to
mcp.pyvia MCP protocol (stdin/stdout)mcp.pyproxies request to@playwright/mcp@playwright/mcplaunches Firefox (proxy setting: localhost:18915)proxy.pyforwards requests to JWT authentication proxyAccess external sites through authenticated proxy
Security
Import CA certificate for TLS inspection into Firefox profile
All HTTPS traffic goes through JWT authentication proxy
Firefox runs with dedicated profile (/home/user/firefox-profile)
Note: Claude Code Web environment performs TLS Inspection on all HTTPS communications for security auditing purposes. This project imports the necessary CA certificates to enable secure browsing within this monitored environment.
References
License
MIT