autolearn-mcp
自动学习浏览器/桌面应用 MCP Server:让任意支持 MCP 的 AI 助手(Trae / Claude / Cursor / Codex...) 成为你的"眼睛和手"——自主探索任意 Web 系统/网页与 Windows 桌面应用(不限单一系统)、 回放学会的操作、并把经验沉淀成三层记忆(情景轨迹 / 语义知识 / 操作技能),越用越聪明。
大脑由 AI 助手担任(无需单独的 LLM API Key),本包只提供感知、执行与记忆。
桌面应用探索(Windows)
open_system(url="app://应用名") 即可绑定已打开的桌面应用窗口(按窗口标题/类名子串匹配,
如 app://记事本、app://计算器),感知/操作仅限该窗口:
- 感知:UIA 控件树 → 交互元素编号(Button/Edit/MenuItem/ListItem 等),使用方式与 Web 一致;
- 动作:
click/click_text/type(ValuePattern 优先,中文安全) /select/scroll/key(SendKeys 语法)/drag; - 每步窗口截图归档;应用未打开时工具会列出当前可见窗口供选择;
- 记忆按系统归档(slug 为
app_应用名),暂不支持技能回放; - 注意:以管理员权限运行的应用(如任务管理器)需 autolearn 同权限才能感知。
多系统学习
open_system(url=任意网址) 即可探索任何网页/系统;登录态、凭据、记忆、技能、会话轨迹
全部按系统自动归档(slug 由域名自动生成,也可用 list_systems 查看已注册系统):
~/.autolearn/
├── .env # 全局配置(TARGET_URL 为默认系统兜底)
├── credentials.json # 各系统登录凭据 {"系统slug": {"username","password"}}
└── data/
├── systems/
│ ├── zfs/ # 每个系统一个档案目录
│ │ ├── profile.json # 名称/URL/描述/类型
│ │ ├── state.json # 该系统登录态(互不覆盖)
│ │ └── memory/ # 该系统语义记忆 + 技能 + 索引
│ └── _global/ # 跨系统通用记忆(任何系统可读写/回放)
└── sessions/<slug>/<ts>/ # 情景记忆按系统归档
要点:
- 登录态按系统隔离:探索系统 B 不会覆盖系统 A 的登录态;
- 技能按系统归属:
run_skill会拒绝跨系统回放,_global技能任何系统可用; recall无参数返回跨系统总览,传system查指定系统;- 凭据支持多系统:
credentials.json按系统条目优先,回退.env全局AUTO_USERNAME/AUTO_PASSWORD; - 自动登录三级策略:通用登录策略链(自动找账号/密码框)→ 回放该系统
login技能 → 转人工。
安装
# 推荐:uvx 一键运行(无需管理 Python 环境)
uvx autolearn-mcp
# 或 pip 安装
pip install autolearn-mcp
autolearn-install # 首次自检:优先复用系统 Chrome/Edge,缺失时才下载内核
要求:Python ≥ 3.10。首次启动优先复用系统 Chrome/Edge(免下载);两者都不可用时才自动下载 Chromium(进度走 stderr)。
国内网络建议配镜像:
pip install autolearn-mcp -i https://pypi.tuna.tsinghua.edu.cn/simple
配置
配置文件位于 ~/.autolearn/.env(也可用环境变量 / AUTOLEARN_HOME 自定义目录):
TARGET_URL=http://your-system/ # 默认系统地址(open_system 无参时兜底)
AUTO_USERNAME= # 全局登录凭据(默认系统用;多系统见 credentials.json)
AUTO_PASSWORD=
HEADLESS=false # 是否无头模式(人工登录需要 false)
接入 AI 工具
Trae / Claude Desktop / Cursor(通用 stdio):
{
"mcpServers": {
"autolearn": { "command": "uvx", "args": ["autolearn-mcp"] }
}
}
Claude Code:
claude mcp add autolearn -- uvx autolearn-mcp
Codex CLI(config.toml):
[mcp_servers.autolearn]
command = "uvx"
args = ["autolearn-mcp"]
工具清单
| 工具 | 作用 |
|---|---|
list_systems() |
列出已注册系统档案(记忆概况/登录态) |
open_system(system, url, goal) |
打开目标系统/网页/桌面应用(app://应用名),开始探索会话(自动注册档案) |
auto_login() |
自动登录当前系统(通用策略 → login 技能 → 人工兜底) |
save_login_state() |
保存登录态到当前系统档案,下次免登录 |
perceive_page() |
读取页面可交互元素(iframe 穿透 + 自动截图) |
act(action_json, expect_name) |
执行动作(点击/输入/拖拽/链式),返回最新页面状态 |
run_skill(skill_id, params) |
回放已沉淀的操作技能(归属校验 + 自愈 + 校验) |
recall(query, system) |
检索记忆(跨系统总览 / 指定系统) |
export_memory_digest(system) |
导出未消化轨迹,供大脑蒸馏 |
save_semantic_memory(system) / save_skill(system) |
写入语义知识 / 操作技能(按系统归档) |
finish(summary) |
结束会话 |
典型用法
open_system(url=...)打开任意系统/网页(首次人工登录,之后auto_login免密)- 让 AI 助手自主探索:它感知页面 → 决策 → 执行 → 记录
- 会话结束调用沉淀工具,轨迹蒸馏为该系统的记忆
- 下次同类任务
run_skill直接回放,越用越快;换系统探索互不干扰
数据全部落在本地 ~/.autolearn/(记忆、截图、登录态、凭据),不上传任何服务器。
Metadata
Release files for autolearn-mcp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autolearn_mcp-0.3.0.tar.gz | 129.6 kB | With provenance | Details for autolearn_mcp-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autolearn_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for autolearn_mcp-0.3.0-py3-none-any.whl |
Total release size: 179.5 kB
Release files / autolearn_mcp-0.3.0.tar.gz
| Download URL | autolearn_mcp-0.3.0.tar.gz |
|---|---|
| Size | 129.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
508689a6f45d7483aa3794532cedcc42f8c678e27232e28feda0ba3560351b30
|
|
BLAKE2b-256 checksum How to use checksums |
4805b947161ebd357b6fd6d627e54a1385d5b62672b133eebb1fac69dd1b5aa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / autolearn_mcp-0.3.0-py3-none-any.whl
| Download URL | autolearn_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 49.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98af798756602af38e6d18aedbe3859eaf275c05c7419fcfda754c990fcb916e
|
|
BLAKE2b-256 checksum How to use checksums |
425461157a2dbe4d185e3ab7a92e0da75a2e0e43d9f9166af30657babf0fb52c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for autolearn-mcp 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for autolearn_mcp-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.