mirror of
				https://github.com/microsoft/playwright-mcp.git
				synced 2025-10-12 00:25:14 +03:00 
			
		
		
		
	feat: add --(allowed|blocked)-origins (#319)
Useful to limit the agent when using the playwright-mcp server with an agent in auto-invocation mode. Not intended to be a security feature.
This commit is contained in:
		
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							| @@ -76,6 +76,8 @@ The Playwright MCP server supports the following command-line options: | ||||
| - `--user-data-dir <path>`: Path to the user data directory | ||||
| - `--port <port>`: Port to listen on for SSE transport | ||||
| - `--host <host>`: Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces. | ||||
| - `--allowed-origins <origins>`: Semicolon-separated list of origins to allow the browser to request. Default is to allow all. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked. | ||||
| - `--blocked-origins <origins>`: Semicolon-separated list of origins to block the browser to request. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked. | ||||
| - `--vision`: Run server that uses screenshots (Aria snapshots are used by default) | ||||
| - `--output-dir`: Directory for output files | ||||
| - `--config <path>`: Path to the configuration file | ||||
| @@ -153,6 +155,15 @@ The Playwright MCP server can be configured using a JSON configuration file. Her | ||||
|   // Directory for output files | ||||
|   outputDir?: string; | ||||
|  | ||||
|   // Network configuration | ||||
|   network?: { | ||||
|     // List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked. | ||||
|     allowedOrigins?: string[]; | ||||
|  | ||||
|     // List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked. | ||||
|     blockedOrigins?: string[]; | ||||
|   }; | ||||
|  | ||||
|   // Tool-specific configurations | ||||
|   tools?: { | ||||
|     browser_take_screenshot?: { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ross Wollman
					Ross Wollman