能力标签
🔌
MCP工具

开源MCP工具

基于 JavaScript · 让 AI 助手直接操作你的系统与工具
英文名:memory
⭐ 11 Stars 💻 JavaScript 📄 MIT 🏷 AI 7.5分
7.5AI 综合评分
mcpagentaidifyhooksllmjavascript
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,开源MCP工具 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析
开源MCP工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 开源MCP工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。开源MCP工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 开源MCP工具 评为 AI 评分 7.5 分,属于同类工具中的优质选择。
📋 工具概览

Inspectable local project memory for AI coding agents,帮助开发者更好地理解 AI 编码代理的本地项目内存。

开源MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 11
开发语言
JavaScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
📖 中文文档
以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

Inspectable local project memory for AI coding agents,帮助开发者更好地理解 AI 编码代理的本地项目内存。

开源MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/ctxr-dev/memory

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "--mcp--": {
      "command": "npx",
      "args": ["-y", "memory"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 开源MCP工具 执行以下任务...
Claude: [自动调用 开源MCP工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "__mcp__": {
      "command": "npx",
      "args": ["-y", "memory"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 58/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

🧠 Local Dify MCP Memory

The self-learning RAG that makes your AI stop repeating its mistakes

<p align="center"> <strong>Typed, deduplicated, self-improving project memory for AI coding agents.</strong> </p>

<p align="center"> A local Dify Knowledge stack for high-precision RAG, a stdio MCP bridge for every modern agent client, a two-stage <code>flush + compile</code> pipeline that distils sessions into typed atoms instead of dumping transcripts, and a dedicated <code>self_improvement</code> dataset where the agent records every correction you give it (and looks up the lesson before related work, so it stops making the same mistake twice). </p>

<p align="center"> <a href="https://github.com/ctxr-dev/memory/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/ctxr-dev/memory/actions/workflows/ci.yml/badge.svg"></a> <a href="https://github.com/ctxr-dev/memory/releases/latest"><img alt="Latest release" src="https://img.shields.io/github/v/release/ctxr-dev/memory?display_name=tag&sort=semver"></a> <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-green.svg"></a> <img alt="Local First" src="https://img.shields.io/badge/Local--First-memory-0A7C66"> <img alt="Dify" src="https://img.shields.io/badge/RAG-Dify-2F6FEB"> <img alt="MCP" src="https://img.shields.io/badge/MCP-stdio-6E56CF"> <img alt="Docker Compose" src="https://img.shields.io/badge/Docker-Compose-2496ED"> <img alt="Node.js" src="https://img.shields.io/badge/Node.js-20+-339933"> <img alt="Claude Code" src="https://img.shields.io/badge/Claude%20Code-supported-D97706"> <img alt="Codex/OpenAI" src="https://img.shields.io/badge/Codex-supported-10A37F"> <img alt="Cursor" src="https://img.shields.io/badge/Cursor-supported-111827"> </p>

<p align="center"> <a href="#install">Install</a> | <a href="#how-memory-is-built">Pipeline</a> | <a href="#what-gets-saved">Categories</a> | <a href="#updates">Updates</a> | <a href="#client-config">Clients</a> | <a href="STACK.md">Stack docs</a> | <a href="CONTRIBUTING.md">Contributing</a> | <a href="SECURITY.md">Security</a> | <a href="CHANGELOG.md">Changelog</a> </p>

<p align="center"> <img src="images/memory-installed.png" alt="Dify Knowledge installed and AI aware of it" width="920"> </p>

---

<p align="center"> <img src="images/img.png" alt="Dify Knowledge UI showing project memory knowledge bases" width="920"> </p>

Prerequisites

  • Docker Desktop 4.x+ with Docker Compose 2.24.4+
  • Node 20+ (used at install AND runtime; no jq or other extras needed)
  • bash 3.2+, plus standard POSIX utilities (awk, sed, grep, find, mktemp, tr, cut)
  • git, curl

Cross-platform: macOS and Linux are first-class. Windows works via WSL2 or Git Bash: bootstrap is bash-only and intentionally avoids jq, realpath, gsed, or any other non-portable binary.

<details> <summary>Docker via Rancher Desktop / Colima (non-standard path)</summary>

If your docker comes from Rancher Desktop (~/.rd/bin/docker), Colima, or another non-standard location, the install scripts auto-resolve it: bootstrap.sh and scripts/lib.sh probe ~/.rd/bin, /usr/local/bin, /opt/homebrew/bin, and the Rancher app bundle before giving up, and you can force a specific binary with DOCKER_BIN=/path/to/docker. One caveat the scripts can't fix for you: the Claude Code / MCP-client process that spawns the memory server runs docker exec … from its own environment, and Rancher only adds ~/.rd/bin to your interactive shell PATH (via .zshrc/.bashrc). If the MCP server fails to start with "docker: command not found", ensure your client is launched from a shell that has ~/.rd/bin on PATH (or symlink docker into /usr/local/bin). </details>

<details> <summary>Windows-specific gotchas</summary>

- Line endings: the repo ships .gitattributes forcing LF on shell + Node + config files. If you cloned with core.autocrlf=true (Git for Windows default) BEFORE these directives existed locally, run git add --renormalize . && git checkout . to fix any CRLF in your working tree, otherwise bash will choke on #!/usr/bin/env bash\r. - Docker Desktop file sharing: under Docker Desktop → Settings → Resources, enable the drive (non-WSL) or the WSL2 distro that contains your project. Without this, the workspace bind mounts empty and scan_documents / absorb_files see no source files. - Symlinks: the repo ships zero symlinks; do not introduce any locally without enabling Windows Developer Mode (or accept that Git will substitute a 1-line text file for the symlink target). </details>

"Run dify-setup.sh" hint if any prereq is missing.

./.memory/src/scripts/mcp-smoke.sh

Install

The boilerplate is consumed as ./.memory/src/ inside your project, with its own git history retained for git pull updates. Two phases, drive each manually or via an AI prompt:

PhaseWhat it doesManualAI-driven
**1. Host install**clone, render configs, start Docker stack[Manual install](#manual-install)[🤖 AI-driven install](#-ai-driven-install)
**2. Dify onboarding** *(after MCP-client restart)*API key, dataset slots, metadata schema, optional doc absorb[Manual flow](#manual-flow)[🤖 AI-driven flow](#-ai-driven-flow)
Why two prompts? The MCP server only becomes callable AFTER your client (Claude Desktop, Cursor, Codex) restarts to pick it up. Phase 2 uses MCP tools (list_datasets, create_dataset, absorb_files, ...) that don't exist before that restart, so it can't share a session with Phase 1. Run Phase 1, restart your client, then run Phase 2.

Manual install

```bash

🤖 AI-driven install

Phase 1 of 2. Host-side install only (clone, bootstrap, docker stack up). Run Phase 2 AFTER the stack is up AND your MCP client restarts.

Paste this prompt into your agent (Claude Code, Cursor, Codex) running inside the target project root:

Install the local Dify MCP memory boilerplate into this project. Target the current working directory unless I explicitly give you another path.

Steps:

1. Confirm the boilerplate Git URL with me first if you cannot infer it. Default: https://github.com/ctxr-dev/memory

2. Ask me for the project slug. Lowercase ASCII a-z, 0-9, hyphen (e.g. billing-api, docs-site). If I give you a name, propose a sanitised slug derived from the project folder name and confirm. The slug becomes the per-project Docker container, image, and Compose project name, so multiple projects can run their own memory stacks without collisions.

3. Ask me which LLM provider to use for the flush + compile pipeline:
   - claude (recommended; spawns `claude -p`, no API key needed)
   - codex (spawns `codex exec --json`, no API key needed)
   - anthropic (REST with ANTHROPIC_API_KEY in ./.memory/settings/.env)
   - openai (REST with OPENAI_API_KEY in ./.memory/settings/.env)
   Detect which CLIs are on PATH before asking. If only one is available, default to it and ask me to confirm.

4. Ask whether to install Claude Code hooks (default: yes). Hooks live in .claude/settings.json and wire SessionStart, PreCompact, PostCompact, SessionEnd, and PostToolUse (matcher ExitPlanMode, for auto-capturing approved plans into the `plans` slot) to ./.memory/src/scripts/hooks/. Other clients can adapt .agents/hooks.json manually.

5. Ask which MCP clients I want registered: Claude Desktop, Cursor, Codex/OpenAI, generic. Note the choices for step 8; the actual snippets only exist after bootstrap.sh runs.

6. Verify host prerequisites or tell me exactly what is missing:
   - docker (Docker Desktop or engine) with `docker compose` 2.24.4+
   - node 20+
   - git, curl, bash 3.2+
   bootstrap.sh itself only enforces docker + node + docker-compose-version; git and curl are needed by `git clone` and the Dify-version probe. No `jq`, `realpath`, or other extras are required (the install path is intentionally portable to Git Bash on Windows).

7. Run the install. If I chose Codex/OpenAI as a client in step 5 AND the `codex` CLI is on PATH, append `--register-codex` so bootstrap auto-runs `codex mcp add` for me; otherwise tell me to run that command manually after step 8:
   git clone <boilerplate-git-url> ./.memory/src
   ./.memory/src/bootstrap.sh --slug <slug> --llm-provider <provider> [--no-hooks if I declined] [--register-codex if Codex picked]

8. Static verification only (Docker not yet required; the stack is not up yet):
   bash -n ./.memory/src/bootstrap.sh ./.memory/src/scripts/*.sh ./.memory/src/scripts/hooks/*.sh
   node --check ./.memory/src/scripts/compile.mjs ./.memory/src/scripts/hooks/flush.mjs ./.memory/src/scripts/hooks/session-start.mjs
   node --check ./.memory/src/scripts/lib/*.mjs ./.memory/src/mcp-server/src/*.js
   ( cd ./.memory/src && npm test )

   Then print the requested client snippets from `./.memory/src/.agents/clients/` (now that bootstrap has rendered them):
   ./.memory/src/scripts/mcp-config.sh all
   For Codex (if not auto-registered in step 7):
   codex mcp add <slug>-memory -- docker exec -i <slug>-memory node src/index.js

9. Start the stack. WARN ME this is slow on first run: dify-bootstrap clones the upstream Dify repo (~hundreds of MB) and `up.sh` then pulls and builds Dify + the bridge image (2-5 minutes on a cold pull, multi-GB; ~30-60s once the Docker image cache is warm):
   ./.memory/src/scripts/up.sh
   (`up.sh` invokes `ui-url.sh` itself, so the Dify UI URL is printed when it finishes.)

10. Tell me the exact next steps after the stack is up:
    a) Open the printed Dify UI URL.
    b) Create the admin account, configure an embedding model under Settings -> Model Provider (REQUIRED before any high_quality dataset can be created).
    c) Open Knowledge -> Service API, create a Knowledge API key.
    d) Restart your MCP client (Claude Desktop / Cursor / Codex / your terminal-spawned agent) so it picks up the new memory MCP server. The server only becomes callable after this restart.
    e) Run `./.memory/src/scripts/dify-setup.sh` to wire datasets, install the per-document metadata schema, and (optionally) absorb my existing docs. ALTERNATIVELY paste the second AI prompt from the README (under "Onboarding -> AI-driven flow") to a fresh agent session for an MCP-driven walkthrough that uses list_datasets / create_dataset / scan_documents / absorb_files instead of the wizard.
    f) Final end-to-end smoke (only valid after step e): `./.memory/src/scripts/mcp-smoke.sh` — read-only round-trip across get_memory_config, search_memory (plain + filtered), and recall_lessons.

Stop and ask me whenever you would otherwise guess. Do not proceed past any step on assumption. Your config lives in `./.memory/settings/.env` (created from `.memory/src/.env.example`); the wizard (`dify-setup.sh`) manages it. If you must hand-edit, edit `./.memory/settings/.env` (there is no `.memory/src/.env`).

Atoms extracted by flush+compile

<details> <summary>Expand: atom types table</summary>

Seven atom types are produced by the flush LLM extractor (prompts/flush.md) and routed by compile. Each carries the metadata block (project_module, language, task_type, optional error_pattern) plus tags. The compile prompt biases toward update over create when atom_type, project_module, and (for lessons) error_pattern match: same fact never gets written twice; same lesson converges into one canonical document.

TypeUse whenRoutes to
decision"We chose X over Y because Z." Architectural or product choice with rationale.knowledge
bug-root-causeThe misleading symptom, the actual cause, and the trap to avoid. (Not the diff: that's in git.)knowledge
feedback-ruleA workflow rule the user gave you. Conventions, exit predicates, do/don't.knowledge
project-loreWho's doing what, deadlines, integration quirks not in the code. Decays fast; atoms include dates.knowledge
referenceA pointer to a dashboard, runbook, or external project, with the reason to consult it.knowledge
pattern-gotchaA reusable code-level lesson: API quirk, framework footgun, library behavior.knowledge
self-improvement-lessonNEGATIVE OR CORRECTIVE user feedback revealing a behaviour the AI should change next time.self_improvement

</details>

Tier 1 — Static. Requires: bootstrap.sh only. No Docker, no LLM.

bash -n ./.memory/src/bootstrap.sh ./.memory/src/scripts/.sh ./.memory/src/scripts/hooks/.sh node --check ./.memory/src/scripts/compile.mjs ./.memory/src/scripts/hooks/flush.mjs ./.memory/src/scripts/hooks/session-start.mjs node --check ./.memory/src/scripts/lib/.mjs ./.memory/src/mcp-server/src/.js

Tier 4 — End-to-end MCP smoke. Requires: up.sh + dify-setup.sh + DIFY_KNOWLEDGE_API_KEY + ≥1 dataset bound.

Verify the metadata schema is installed on the self_improvement slot.

docker exec -i "$(grep '^MCP_CONTAINER_NAME=' ./.memory/settings/.env | cut -d= -f2 | tr -d '\r')" \ node src/memory-cli.js list-metadata-fields --datasetId self_improvement

Client config

<details> <summary>Expand: client config</summary>

Generated client snippets live under .agents/clients/ after bootstrap:

./.memory/src/scripts/mcp-config.sh all              # print every client snippet
./.memory/src/scripts/mcp-config.sh codex            # | claude-desktop | cursor

For Codex/OpenAI:

codex mcp add <project-slug>-memory -- docker exec -i <project-slug>-memory node src/index.js

For Claude Desktop, Cursor, or generic MCP clients, merge .agents/mcp.json (or the matching .agents/clients/<client> snippet) into your client's MCP config. Do not paste API keys into client configs; they live only in ./.memory/settings/.env.

When --install-hooks is on (default), .claude/settings.json is rendered with the four lifecycle events wired to ./.memory/src/scripts/hooks/. Other clients can adapt .agents/hooks.json to their own hook format; see STACK.md for the event-to-script table.

</details>

Read-only by design: initialize, get_memory_config, plain + filtered search_memory,

Hook reference

<details> <summary>Expand: hook reference table</summary>

EventScriptEffect
SessionStartscripts/hooks/session-start.mjsEmits an additionalContext reminder; lazily spawns compile in the background once per UTC day.
PreCompactscripts/hooks/flush.mjs pre-compactDistils the recent transcript into typed atoms; writes ONE new daily-<ts>.md doc to the Dify daily dataset. Skips if fewer than MEMORY_HOOK_PRECOMPACT_MIN_TURNS turns.
PostCompactscripts/hooks/flush.mjs post-compactDistils Claude Code's compact_summary into atoms. Min-turns check bypassed for compact_summary input.
SessionEndscripts/hooks/flush.mjs session-endSame as PreCompact, with MEMORY_HOOK_SESSION_END_MIN_TURNS floor.
PostToolUse (matcher ExitPlanMode)scripts/hooks/exit-plan-mode.mjsWhen the user approves a plan, upserts plan-<slug>.md into the plans dataset slot (deterministic, no LLM, no timestamp; same title overwrites). Body is redacted + wrapped in an untrusted-content fence. Skips cleanly (exit 0) with a stderr message on rejection, empty plan, oversized plan (MEMORY_HOOK_EXITPLANMODE_MAX_BYTES, default 256KB), unbound slot, bridge failure, or MEMORY_HOOK_EXITPLANMODE_DISABLE=true. See [plan-capture skill](templates/skills/plan-capture.md).

Hook timeouts: 130s for flush hooks (LLM defaults to 120s per call + headroom), 30s for PostToolUse/ExitPlanMode (no LLM, but multiple bridge round-trips: find + create + metadata + re-list + dedupe-delete), 15s for SessionStart (only emits a reminder + spawns compile detached).

</details>

Tier 6 — Direct CLI checks. Requires: bridge container running.

expect doc_metadata to include atom_type, tags, project_module,

🎯 aiskill88 AI 点评 A 级 2026-05-23

该工具提供了一种Inspectable 本地项目内存的方法,帮助开发者更好地理解 AI 编码代理的行为和决策过程,值得关注。

⚡ 核心功能
👥 适合人群
Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师
🎯 使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
⚖️ 优点与不足
✅ 优点
  • +MIT 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQ
解答
💡 AI Skill Hub 点评

AI Skill Hub 点评:开源MCP工具 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 开源MCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 memory
Topics mcpagentaidifyhooksllmjavascript
GitHub https://github.com/ctxr-dev/memory
License MIT
语言 JavaScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/ctxr-dev/memory

收录时间:2026-05-23 · 更新时间:2026-05-23 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。