- Home
- MCP servers
- Playwright Fetch
Playwright Fetch
- python
2
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"threatflux-playwright-fetch": {
"command": "uvx",
"args": [
"mcp-server-playwright-fetch"
]
}
}
}Playwright Fetch MCP Server is a Model Context Protocol (MCP) server that uses Playwright to fetch and render JavaScript-heavy web pages, then converts the result to readable markdown. This enables language models to access web content that relies on client-side rendering and process it efficiently for analysis, summarization, or data extraction.
How to use
You interact with the Playwright Fetch MCP Server by configuring an MCP client to run the server as either a local process or a remote service. The server exposes a tool named playgwright_fetch that fetches a URL and returns the page content as markdown by rendering the page with Playwright.
How to install
Prerequisites you need before installing the server:
-
Python 3.13.2 or newer
-
uv package manager
-
Playwright browsers installed
Additional setup notes
Install the server using one of the two supported methods. The following commands are exact examples you can copy-paste.
Configuration and usage examples
"mcpServers": {
"playwright-fetch": {
"command": "uvx",
"args": ["mcp-server-playwright-fetch"]
}
}
"mcpServers": {
"playwright-fetch": {
"command": "docker",
"args": ["run", "-i", "--rm", "threatflux/playwright-fetch"]
}
}
{
"mcp": {
"servers": {
"playwright-fetch": {
"command": "uvx",
"args": ["mcp-server-playwright-fetch"]
}
}
}
}
Command line options
You can pass the following options when starting the server to customize its behavior. These options influence how the browser runs, how content is waited for, and how proxies are used.
Example usage
# Run with default settings
uv run mcp-server-playwright-fetch
# Run with a custom user agent and proxy
uv run mcp-server-playwright-fetch --user-agent="MyCustomAgent/1.0" --proxy-url="http://myproxy:8080"
# Run with visible browser for debugging
uv run mcp-server-playwright-fetch --headless=false
Debugging
npx @modelcontextprotocol/inspector uvx mcp-server-playwright-fetch
Notes on differences and capabilities
This server uses a browser automation flow to render pages and extract main content, with options to wait for different navigation events and to respect robots.txt. It can be run via uvx or docker, and it supports debugging with a visible browser.
License
This project is licensed under the MIT License.
Security and best practices
When using this server in production, prefer running with headless mode enabled and ensure you manage proxies and robots.txt compliance according to your policies. Inspect returned content before feeding it into any model to prevent leakage of sensitive data.
Troubleshooting
If the server does not start, verify that Python and uv are installed, and that Playwright browsers are installed with the following commands: uv pip install git+https://github.com/ThreatFlux/playwright-fetch.git and uv pip exec playwright install. For container-based runs, ensure the Docker daemon is running and the correct image is pulled.
Available tools
playwright-fetch
Fetches a URL using Playwright browser automation and extracts its contents as markdown.