Deno 2 Playwright Model Context Protocol Server Example
镜像
概述
这是一个基于 Deno 2 的 Playwright 模型上下文协议(MCP)服务器,允许大型语言模型直接与浏览器交互,执行网页自动化任务。
构建指南
根据您的操作系统,运行以下命令之一:
# macOS
deno task build-mac
# Linux
deno task build-linux-x86_64
# 或
deno task build-linux-ARM64
# Windows
deno task build-windows-x86_64
配置与运行
-
构建完成后,编辑 Claude 配置文件:
- 位置:
~/Library/Application Support/Claude/claude_desktop_config.json
- 位置:
-
添加 Playwright 服务器配置:
{
"mcpServers": {
"playwright": {
"command": "/path/to/deno2-playwright-mcp-server/playwright-server"
}
}
}
- 保存配置文件后,重启 Claude 应用以使更改生效
参考信息
- 本项目基于官方 Puppeteer MCP 服务器:GitHub 链接
- 适用于需要网页交互、截图和执行 JavaScript 的 AI 应用场景