AI Skill Hub 推荐使用:本地首选MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
本地首选MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
本地首选MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/michielinksee/linksee-memory
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"----mcp--": {
"command": "npx",
"args": ["-y", "linksee-memory"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 本地首选MCP工具 执行以下任务... Claude: [自动调用 本地首选MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"____mcp__": {
"command": "npx",
"args": ["-y", "linksee-memory"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Your agent forgets everything when a session ends. Linksee Memory is the fix. Local-first cross-LLM memory MCP — one SQLite file that Claude Code, Cursor, Windsurf, OpenAI Codex, and Gemini CLI all read from. Not just "what happened" but WHY it happened: 6-layer structured memory with precision recall that surfaces the right context at the right moment. npx linksee-memory-setup — one command, done.
🌐 Landing page: linksee-site.vercel.app (includes non-developer onboarding for Claude Desktop / Cursor / Claude Code / OpenAI Codex / Gemini CLI)
「Cordex/Cursor/Code/Gemini 全部につなげられるから、 横断的にできてる MCP ってところがこれのすごいところ」 — Hatena Bookmark, May 2026 (165+ users)
---
| Feature | Detail |
|---|---|
| **One-command setup** | npx linksee-memory-setup — registers MCP server, installs skill, configures auto-capture hook. One command instead of three. |
| **Structured memory v2** | 3-axis classification (altitude × type × state) for every memory. Auto-extraction from sessions produces machine-scannable JSON, not raw chat dumps. |
| **Precision recall guide** | SKILL.md now teaches agents HOW to write effective queries, WHEN to recall vs skip, and WHEN to proactively surface caveats before risky actions. |
| **"Use Linksee" trigger** | Add "Use Linksee" to any prompt to force memory recall — same adoption pattern as Context7. |
| **Five MCP Blocks** | Tools + Resources + Prompts + Sampling + Roots + Elicitation. Most MCP servers expose only Tools; linksee-memory implements all six primitives. |
<details> <summary>Click to expand manual installation</summary>
Install & register:
claude mcp add -s user linksee -- npx -y linksee-memory
Tools appear as mcp__linksee__remember, mcp__linksee__recall, mcp__linksee__recall_file, mcp__linksee__read_smart, mcp__linksee__forget, mcp__linksee__consolidate.
Install the skill (auto-invocation):
npx -y linksee-memory-install-skill
Copies SKILL.md to ~/.claude/skills/linksee-memory/. Agent auto-fires on phrases like "前に…", "また同じエラー", "覚えておいて", new task starts, file edits, etc.
Configure auto-capture (Stop hook):
Add to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{ "type": "command", "command": "npx -y linksee-memory-sync" }
]
}
]
}
}
Each turn end takes ~100 ms. Failures are silent. Logs at ~/.linksee-memory/hook.log.
</details>
npx linksee-memory-setup
This does everything: 1. Registers the MCP server with Claude Code 2. Installs the agent skill (teaches the agent when to recall/remember) 3. Configures auto-capture (every session saved to your local brain)
Restart Claude Code, then just chat normally. Add "Use Linksee" to any prompt to trigger memory recall.
| Command | Purpose |
|---|---|
npx linksee-memory-setup | **v0.4.1** One-command setup: MCP server + skill + Stop hook. Idempotent — skips what's already done. |
npx linksee-memory | MCP server (stdio) |
npx linksee-memory-sync | Claude Code Stop-hook entry point |
npx linksee-memory-import | Batch-import Claude Code session JSONL history |
npx linksee-memory-install-skill | Install the Claude Code Skill that teaches the agent when to call recall/remember/read_smart |
npx linksee-memory-stats | Summary of the local DB (entity count / layer breakdown / top entities / top edited files). Add --json for machine-readable output. |
Claude Code ships a built-in memory feature at ~/.claude/projects/<path>/memory/*.md — flat markdown notes for user preferences. linksee-memory complements it:
Use both.
<details> <summary><b>The skill isn't firing — Claude Code doesn't call <code>recall</code> when I ask about past work.</b></summary>
1. Verify the skill was installed:
ls ~/.claude/skills/linksee-memory/SKILL.md
If absent, run npx -y linksee-memory-install-skill. 2. Restart Claude Code. Skills are indexed on session start. 3. Check that the MCP is registered under the name linksee (the skill expects mcp__linksee__* tool names): claude mcp list | grep linksee
If it's registered as something else, either re-register or edit ~/.claude/skills/linksee-memory/SKILL.md to match. </details>
<details> <summary><b>Stop hook isn't recording my sessions.</b></summary>
1. Check the hook log: cat ~/.linksee-memory/hook.log 2. Run a manual test:
echo '{"session_id":"test","transcript_path":"/path/to/some.jsonl"}' | npx linksee-memory-sync
3. Make sure the Stop hook in ~/.claude/settings.json points to npx -y linksee-memory-sync (not the old -import). </details>
<details> <summary><b>Upgrading from v0.0.5 or earlier — my recalls are mostly tagged "Card_Navi" or my project-dir name.</b></summary>
v0.0.6+ fixed the entity detection bug that collapsed all memories into the session's starting cwd. To re-index existing history with correct project attribution, run:
npx linksee-memory-import --all
The importer is idempotent (wipes existing session data before re-inserting). Typical runtime: a few minutes for hundreds of sessions. Expect a dramatic improvement in recall precision afterward. </details>
<details> <summary><b><code>recall</code> returns too much — the context window fills up fast.</b></summary>
Reduce max_tokens:
recall({ query: "...", max_tokens: 800 }) // default is 2000 Or narrow with entity_name and layer: recall({ query: "...", entity_name: "my-project", layer: "caveat" }) </details>
<details> <summary><b>How do I reset / delete all memory?</b></summary>
rm -rf ~/.linksee-memory # nuke everything; next run creates a fresh DB
Or delete individual memories via the forget tool with a specific memory_id. </details>
<details> <summary><b>DB is getting large (>100 MB). How do I trim it?</b></summary>
Run consolidate — it clusters old cold memories into compressed learning-layer summaries:
consolidate({ scope: "all", min_age_days: 7 }) Caveat and active-goal layers are always preserved. Consider scheduling a weekly run via cron / Task Scheduler. </details>
<details> <summary><strong>How is this different from Mem0 / Letta / Zep?</strong></summary>
Three axes: 1. Local-first: those tools require cloud accounts and send your data to their servers. linksee-memory runs entirely on your machine — one SQLite file, no network calls by default. 2. WHY-layered: they store flat facts or knowledge-graph nodes. linksee-memory has 6 explicit layers (goal/context/emotion/implementation/caveat/learning) so retrieval returns structured reasoning, not just data. 3. File diff cache: read_smart tool saves 86–99% of tokens on file re-reads via AST-aware chunking. None of the memory services do this — it's a feature usually shipped in IDEs. </details>
<details> <summary><strong>Why not just use Claude's built-in auto-memory?</strong></summary>
Claude Code's auto-memory is Claude-only (doesn't help if you switch to Cursor, OpenAI Codex, or Gemini CLI) and stores flat markdown with no structure. linksee-memory is the same local-first principle but: - Works across Claude Code, Cursor, OpenAI Codex, Gemini CLI (shared SQLite) - Structured 6-layer format makes recall explainable - Provides explicit forget/consolidate primitives rather than the agent guessing </details>
<details> <summary><strong>Is 86% token savings real? Where does it come from?</strong></summary>
Yes — see tools/bench-read-smart.ts in the repo. The read_smart tool: 1. Hashes file content on first read, returns full content + chunk metadata (AST/heading/indent boundaries). 2. On re-read with unchanged mtime+sha256, returns ~50 tokens of "unchanged" confirmation instead of re-sending the file. 3. On real edits, returns only the changed chunks as full content + unchanged chunks as metadata-only references.
For a typical TypeScript file edit in an agentic loop, this cuts round-trip token costs by ~86%. On pure re-reads (user navigating back to a previously-read file), savings exceed 99%. </details>
<details> <summary><strong>Does "local-first" mean no way to sync across my machines?</strong></summary>
The default is no sync — the SQLite file lives at ~/.linksee-memory/memory.db and stays there. If you want multi-machine sync, put that directory under Syncthing / iCloud Drive / Dropbox / Google Drive — it's a single file, so any file-sync tool works. (Avoid simultaneous edits from two machines while the MCP server is running on both; SQLite's WAL mode handles single-writer well but multi-writer conflicts can corrupt.) </details>
<details> <summary><strong>What happens when the DB gets huge?</strong></summary>
Two mechanisms: 1. Ebbinghaus forgetting: cold low-importance memories decay naturally, eligible for auto-forget sweeps. caveat layer and memories with importance ≥ 0.9 are always protected. 2. consolidate(): compresses clusters of cold low-importance memories by entity into a single learning-layer summary, then deletes the originals. Run via linksee-memory-consolidate CLI (or schedule weekly).
In practice a solo developer hits ~100MB after 6 months of heavy use. A year-old DB I tested with 80K memories still recalls in <10ms. </details>
<details> <summary><strong>Can I use this without Claude Code?</strong></summary>
Yes — any MCP-compatible client works: - Claude Code: claude mcp add -s user linksee -- npx -y linksee-memory - Claude Desktop: add to claude_desktop_config.json (see onboarding on the LP) - Cursor: add to MCP settings in Cursor → Settings → Features → Model Context Protocol - OpenAI Codex: codex mcp add linksee -- npx -y linksee-memory (or ~/.codex/config.toml with [mcp_servers.linksee] block) - Gemini CLI: add to ~/.gemini/settings.json mcpServers section - ChatGPT (web/mobile app): stdio MCP not supported by the consumer app — requires Remote MCP server over HTTPS. linksee-memory-remote planned for v0.4. - Custom agent: the MCP stdio protocol is documented at modelcontextprotocol.io </details>
<details> <summary><strong>What telemetry does it send?</strong></summary>
By default: zero network calls, zero telemetry. There's an optional Level-1 telemetry mode you can enable that sends anonymized aggregate metrics (tool call counts, error rates, latency percentiles — never memory content, never file paths, never queries). The exact payload schema is documented in the Telemetry section and you see every byte before opting in. </details>
<details> <summary><strong>How do I verify it's actually working?</strong></summary>
After install, in a new Claude session ask: "Can you remember that I prefer TypeScript over JavaScript?" Claude should confirm it called mcp__linksee__remember and stored this. Then in a different session ask: "What languages do I prefer?" It should recall via mcp__linksee__recall and return the preference with match_reasons showing why. </details>
一个有趣的开源MCP工具,具有本地首选和跨代理脑功能
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,本地首选MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | linksee-memory |
| 原始描述 | 开源MCP工具:Local-first agent memory MCP — cross-agent brain with token-saving file diff cac。⭐11 · JavaScript |
| Topics | mcpjavascript本地首选 |
| GitHub | https://github.com/michielinksee/linksee-memory |
| License | MIT |
| 语言 | JavaScript |
收录时间:2026-05-27 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端