Microsoft's latest Playwright MCP server is coming?

Microsoft Playwright MCP server, a new bridge between AI models and front-end development.
Core content:
1. MCP: A new way to connect AI models and data sources
2. Playwright MCP: Interaction between browser automation and LLM
3. Installation and configuration guide of Playwright MCP
Hello everyone, I am glad to see you again. I am " Front-end Technology Advanced "
1. What is MCP
MCP (Model Context Protocol, MCP for short) is a standard way to connect AI models to data sources and tools. It allows AI to access information and functions outside the scope of its initial training. MCP is like a universal connector for AI systems.
Just as standard ports let different devices work together, MCP lets different AI models connect to the same tools and data sources. This means developers can build a tool once and have it work with any MCP-enabled AI model, similar to a USB-C port for AI applications.
AI models are good at generating content and reasoning, but are limited by their training data, and MCP solves this problem by giving them access to external resources when needed.
2. What is Playwright MCP
Playwright MCP is a Model Context Protocol server that provides browser automation using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots without the need for screenshots or visual adjustments to the model.
Playwright MCP key features include:
Fast and lightweight: Use Playwright's accessibility tree instead of pixel-based input LLM-friendly: No vision model required, operates only on structured data. Deterministic tool applications: Avoiding ambiguities common to screenshot-based approaches.
Typical use cases for Playwright MCP include:
Web navigation and form filling Extracting data from structured content Automatic testing driven by LLM Generic browser interaction with proxies
The following is an example of a typical Playwright MCP configuration:
{
"mcpServers" : {
"playwright" : {
"command" : "npx" ,
"args" : [
"@playwright/mcp@latest"
]
}
}
}
Currently, Playwright MCP is open source on Github through the Apache-2.0 protocol, has more than 6k stars, and NPM weekly downloads 16k+. It is a high-quality front-end open source project worthy of attention.
3. How to install Playwright MCP
Developers can install the Playwright MCP server using the VS Code CLI:
// For VS Code
code --add-mcp '{ "name" : "playwright" , "command" : "npx" , "args" :[ "@playwright/mcp@latest" ]}'
// For VS Code Insiders
code-insiders --add-mcp '{ "name" : "playwright" , "command" : "npx" , "args" :[ "@playwright/mcp@latest" ]}'
Once installed, the Playwright MCP server will be available for use with the GitHub Copilot agent in VS Code. Playwright MCP will be rolled out to the Chrome browser with a new profile located at:
- `%USERPROFILE%\AppData\Local\ms-playwright\mcp-chrome-profile` on Windows
- `~/Library/Caches/ms-playwright/mcp-chrome-profile` on macOS
- `~/.cache/ms-playwright/mcp-chrome-profile` on Linux
All login information will be stored in this profile and can be deleted between sessions if you want to clear it offline.
Playwright MCP also supports use in headless browser environments, for example:
{
"mcpServers" : {
"playwright" : {
"command" : "npx" ,
"args" : [
"@playwright/mcp@latest" ,
"--headless"
]
}
}
}
Finally, if developers have needs, they can even access it programmatically:
import {createServer} from '@playwright/mcp' ;
const server = createServer({
launchOptions : { headless : true }
});
transport = new SSEServerTransport( "/messages" , res);
server.connect(transport)