浏览器mcp
浏览器扩展和MCP服务器,允许您与正在使用的浏览器进行交互。
用法
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@djyde/mcp-browser@latest"
]
}
}
}工具
所有可用工具都列在 server/src/tools.ts.
get_current_page_markdown
从当前浏览器浏览页面获取标记。
例子:
Summarize the current page.append_style
将css样式附加到当前浏览器浏览页面。
例子:
Change the current page to dark mode.history_search
搜索浏览器历史记录。
例子:
Search the browser history for "github".路线图
- \[\]将扩展发布到扩展存储。
- \[\]编写文档。
- \[\]添加更多工具。
构建
pnpm i扩展
cd extension
# chrome
npm run build
# edge
npm run build:edge
# firefox
npm run build:firefox建成后,扩建部分将位于 extension/.output 目录。
服务器
cd server
# dev
npm run dev
# build
npm run buildserver/dist/cli.js 是MCP服务器条目。
贡献
添加新工具
- 将工具架构添加到
tools数组inserver/src/tools.ts. - 在中添加扩展可调用处理程序
extension/calls.ts. - 在中添加工具处理程序
server/src/tools.ts.使用call函数调用扩展处理程序。
许可证
AGPL-3.0或更高版本

