playwright-slim-mcp
Click on "Deploy 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., "@playwright-slim-mcp go to example.com and click the login button"
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.
playwright-slim-mcp
A proxy MCP server for Playwright that summarizes accessibility snapshots using Claude Haiku to reduce context usage.
Quickstart
Add to your Claude Code MCP config (~/.claude.json):
{
"mcpServers": {
"playwright-slim": {
"command": "npx",
"args": ["playwright-slim-mcp"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}That's it! The proxy will automatically download and run.
Related MCP server: SlimAtlas AI
Problem
The official @playwright/mcp returns full accessibility tree snapshots after every action (click, type, navigate, etc.). These snapshots can be 2-10KB+ each, quickly consuming context window.
Solution
This proxy:
Forwards all requests to the real Playwright MCP
Intercepts responses containing page snapshots
Uses Anthropic API (Claude Haiku) to summarize snapshots to ~10 lines
Preserves
[ref=XXX]values for interactive elements so you can still click/type
Installation
Via npx (recommended)
No installation needed - just add to your MCP config as shown in Quickstart.
Global install
npm install -g playwright-slim-mcpThen use in your MCP config:
{
"mcpServers": {
"playwright-slim": {
"command": "playwright-slim-mcp",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}From source
git clone https://github.com/jsdf/playwright-slim-mcp.git
cd playwright-slim-mcp
npm install
npm run buildRequirements
ANTHROPIC_API_KEYenvironment variableNode.js 18+
Environment Variables
Variable | Required | Description |
| Yes | Your Anthropic API key |
| No | Model for summarization (default: |
| No | Set to |
Configuration
The proxy summarizes snapshots for these tools:
browser_clickbrowser_typebrowser_press_keybrowser_select_optionbrowser_hoverbrowser_dragbrowser_navigatebrowser_navigate_backbrowser_handle_dialogbrowser_file_uploadbrowser_fill_formbrowser_snapshot
Small snapshots (<500 chars) are passed through unchanged.
Unsummarized Snapshots
Use browser_snapshot_full to get the raw accessibility tree without summarization. This tool is automatically added as an alias.
Testing
# Create .env file with your API key
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
# Run tests (includes real API calls and browser tests)
npm testExample
Before (2KB+):
- generic [ref=e327]:
- generic [ref=e328]:
- heading "Go back James's Workspace" [level=4] [ref=e329]:
- button "Go back" [ref=e330] [cursor=pointer]:
- img [ref=e331]
- text: James's Workspace
# ... 100+ more linesAfter (~200 bytes):
Admin settings for "James's Workspace"
Tabs: Overview [e343], Feature flags [e348, selected], Members [e353], Tables [e358]
Actions: Go back [e330], Impersonate [e334]License
MIT
Available Tools
25 toolsbrowser_clickBDestructive
Perform click on a web page
Inputs: target (required), button, element, modifiers, +1 more.
browser_closeBDestructive
Close the page
Inputs: no named parameters.
browser_console_messagesBRead-only
Returns all console messages
Inputs: level (required), all, filename.
browser_dragADestructive
Perform drag and drop between two elements
Inputs: endTarget (required), startTarget (required), endElement, startElement.
browser_dropADestructive
Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
Inputs: target (required), data, paths, element.
browser_evaluateBDestructive
Evaluate JavaScript expression on page or element
Inputs: function (required), target, element, filename.
browser_file_uploadBDestructive
Upload one or multiple files
Inputs: paths.
browser_fill_formBDestructive
Fill multiple form fields
Inputs: fields (required).
browser_findARead-only
Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
Inputs: text, regex.
browser_handle_dialogCDestructive
Handle a dialog
Inputs: accept (required), promptText.
browser_hoverADestructive
Hover over element on page
Inputs: target (required), element.
browser_network_requestARead-only
Returns full details (headers and body) of a single network request, or a single part if part is set. Use the number from browser_network_requests.
Inputs: index (required), part, filename.
browser_network_requestsARead-only
Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
Inputs: static (required), filter, filename.
browser_press_keyBDestructive
Press a key on the keyboard
Inputs: key (required).
browser_resizeBDestructive
Resize the browser window
Inputs: width (required), height (required).
browser_run_code_unsafeADestructive
Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
Inputs: code, filename.
browser_select_optionBDestructive
Select an option in a dropdown
Inputs: target (required), values (required), element.
browser_snapshotBRead-only
Capture accessibility snapshot of the current page, this is better than screenshot
Inputs: boxes, depth, target, filename.
browser_snapshot_fullBRead-only
Capture full accessibility snapshot without summarization
Inputs: boxes, depth, target, filename.
browser_tabsADestructive
List, create, close, or select a browser tab.
Inputs: action (required), url, index.
browser_take_screenshotARead-only
Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
Inputs: scale (required), type, target, element, +2 more.
browser_typeBDestructive
Type text into editable element
Inputs: text (required), target (required), slowly, submit, +1 more.
browser_wait_forARead-only
Wait for text to appear or disappear or a specified time to pass
Inputs: text, time, textGone.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Most tools have clearly distinct purposes, but browser_snapshot vs browser_snapshot_full, browser_evaluate vs browser_run_code_unsafe, and browser_close vs browser_tabs (closing page vs tab) create some overlap. Descriptions help but an agent must read carefully to pick correctly.
All tools use the browser_ prefix with snake_case and clear verb_noun or noun patterns (e.g., browser_click, browser_navigate, browser_take_screenshot). The convention is consistent throughout with no deviations.
25 tools is at the high end for a single server; while many are necessary for full browser control, some could be consolidated (e.g., snapshot variants, separate network request tools). The count feels heavy and borderline for the 'slim' name.
The surface covers navigation, interaction, forms, keyboard, mouse, tabs, network, console, dialogs, file upload, drag/drop, screenshots, and snapshots. Minor gaps include no explicit forward navigation (only back) or page reload, but these are workaroundable.
Related MCP Connectors
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted Screenshots MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceA lightweight local MCP server that runs axe-core accessibility audits via Playwright and returns compressed, actionable results optimized for Claude's context window.515 npmMIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for lightweight browser automation using Lightpanda with Chrome fallback, providing LLM-optimized accessibility tree snapshots for precise element targeting.3MIT
- AlicenseAqualityCmaintenanceAn MCP server that gives Claude direct control of a real browser via Playwright, enabling AI-driven web testing, autonomous test execution, and live failure analysis through natural language.88,154 npm3MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides browser automation using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots.ISC