
tontoko/fast-playwright-mcp
Browser automationЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
tontoko/fast-playwright-mcp - кандидат на сервер MCP, импортированный из https://github.com/tontoko/fast-playwright-mcp.
Обзор
tontoko/fast-playwright-mcp - кандидат на сервер MCP, импортированный из https://github.com/tontoko/fast-playwright-mcp.
Обзор (машинный перевод)
Быстрый* драматург MCP
Этот MCP-сервер является форком Microsoft.
Сервер Model Context Protocol (MCP), который предоставляет возможности автоматизации браузера с помощью Playwright. Этот сервер позволяет LLM взаимодействовать с веб-страницами через структурированные снимки доступности, минуя необходимость в скриншотах или визуально настроенных моделях.
Ключевые особенности
- Быстрый и легкий. Использует дерево доступности Playwright, а не вход на основе пикселей.
- ** LLM-дружественный** Модели видения не нужны, работают исключительно на структурированных данных. ** Детерминированное применение инструмента**. Избегает двусмысленности, общей с подходами, основанными на скриншотах.
Функции быстрого сервера (This Fork)
** Оптимизация токенов**. Все инструменты поддерживают параметр expectation для управления контентом ответа:
includeCode: false - Подавить генерацию кода Playwright для уменьшения токенов
includeSnapshot: false- Снимок страницы для минимальных ответов (70-80% снижение токена)includeConsole: false- Исключить консольные сообщенияincludeTabs: false- Скрыть информацию вкладки- Сжатие изображения Инструмент для скриншотов поддерживает
imageOptions:format: 'jpeg'- Используйте JPEG вместо PNG quality: 1-100- Сжатие изображений (например.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Fast Playwright MCP
This MCP server is a fork of the Microsoft one.
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
Key Features
- Fast and lightweight. Uses Playwright’s accessibility tree, not pixel-based input.
- LLM-friendly. No vision models needed, operates purely on structured data.
- Deterministic tool application. Avoids ambiguity common with screenshot-based approaches.
Fast Server Features (This Fork)
- Token Optimization. All tools support an
expectationparameter to control response content:includeCode: false- Suppress Playwright code generation to reduce tokensincludeSnapshot: false- Skip page snapshot for minimal responses (70-80% token reduction)includeConsole: false- Exclude console messagesincludeTabs: false- Hide tab information
- Image Compression. Screenshot tool supports
imageOptions:format: 'jpeg'- Use JPEG instead of PNGquality: 1-100- Compress images (e.g., 50 for 50% quality)maxWidth: number- Resize images to max width
- Batch Execution. Use
browser_batch_executefor multiple operations:- Significant token reduction by eliminating redundant responses
- Per-step and global expectation configuration
- Error handling with
continueOnErrorandstopOnFirstErroroptions
- Snapshot Control. Limit snapshot size with
snapshotOptions:selector: string- Capture only specific page sections (recommended over maxLength)format: "aria"- Accessibility tree format for LLM processing
- Diff Detection. Track only changes with
diffOptions:enabled: true- Show only what changed from previous state (massive token saver)format: "minimal"- Ultra-compact diff output- Perfect for monitoring state changes during navigation or interactions
- Diagnostic System. Advanced debugging and element discovery tools:
browser_find_elements- Find elements using multiple search criteria (text, role, attributes)browser_diagnose- Comprehensive page analysis with performance metrics and troubleshooting- Enhanced error handling with alternative element suggestions
- Page structure analysis (iframes, modals, accessibility metrics)
- Performance monitoring with execution time under 300ms
- Enhanced Selector System. Unified element selection with multiple strategies:
- Selector Arrays: All element-based tools now support multiple selectors with automatic fallback
- 4 Selector Types:
ref: System-generated element IDs from previous tool results (highest priority)role: ARIA roles with optional text matching (e.g.,{role: "button", text: "Submit"})
Установка
npx @tontoko/fast-playwright-mcp@latestКонфигурация
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@tontoko/fast-playwright-mcp@latest"
]
}
}
}