内容
<p align="center">
<a href="https://browser-memory.com">
<img src="https://browser-memory.com/banner.png" alt="browser-memory" width="640">
</a>
</p>
<p align="center">
<a href="https://browser-memory.com"><img src="https://img.shields.io/badge/docs-browser--memory.com-4ade80?style=for-the-badge&labelColor=0a0a0a" alt="文档"></a>
<a href="https://www.npmjs.com/package/browser-memory"><img src="https://img.shields.io/npm/v/browser-memory?style=for-the-badge&logo=npm&color=4ade80&labelColor=0a0a0a" alt="npm 版本"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-4ade80?style=for-the-badge&labelColor=0a0a0a" alt="MIT 许可证"></a>
</p>
<p align="center">
<b>为您的 AI 代理提供可重用的网页操作记忆。</b>
</p>
---
## 安装
需要 Node.js ≥ 20 和 Chrome(如果存在,则使用系统的 Google Chrome,否则使用 Playwright 的 Chromium)。
一行命令配置任何支持的代理 — **Codex、Cursor、VS Code(Copilot)和 Claude Code**。
为宿主安装(`codex` · `cursor` · `vscode` · `claude`):
```bash
npx -y browser-memory install codex
```
卸载(相同的宿主形式):
```bash
npx -y browser-memory uninstall codex
```
它是幂等的(永远不会覆盖现有的条目)。之后请重启应用程序。
**任何其他 MCP 宿主** — 将其添加到其配置中(大多数客户端使用 `mcpServers` 键;VS Code 使用 `servers`):
```json
{ "mcpServers": { "browser-memory": { "command": "npx", "args": ["-y", "browser-memory"] } } }
```
## 注册表(可选)
默认开启 — 它从托管的注册表 (`https://api.browser-memory.com`) 拉取现成的工具。
关闭它以运行 100% 本地:
```bash
npx browser-memory config server off
```
重新开启:
```bash
npx browser-memory config server on
```
指向另一个后端:
```bash
npx browser-memory config set-url https://your-registry.example.com
```