能力标签
AI内存MCP
🔌
MCP工具

AI内存MCP

基于 Rust · 让 AI 助手直接操作你的系统与工具
英文名:ai-memory-mcp
⭐ 25 Stars 🍴 5 Forks 💻 Rust 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
AIMCPRust
✦ AI Skill Hub 推荐

AI内存MCP 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

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

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

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

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

📋 工具概览

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

GitHub Stars
⭐ 25
开发语言
Rust
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
5

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

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/alphaonedev/ai-memory-mcp

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

# 配置文件位置
# 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 对话中直接使用
# 示例:
用户: 请帮我用 AI内存MCP 执行以下任务...
Claude: [自动调用 AI内存MCP MCP 工具处理请求]

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

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

简介

<p align="center"> <img src="docs/ai-memory-logo.jpg" alt="ai-memory logo" width="200"> </p>

ai-memory™

universal AI memory

CI Bench Session-boot lifetime Rust License SQLite Tests Test Hub Discovery Gate v0.6.4 Cert [MCP]() NSA CSI Evidence v0.6.4 Evidence v0.7.0 Crates.io Version npm PyPI

ai-memory is a persistent memory system for AI assistants. It works with any AI that supports MCP -- Claude, ChatGPT, Grok, Llama, and more. It stores what your AI learns in a local SQLite database, ranks memories by relevance when recalling, and auto-promotes important knowledge to permanent storage. Install it once, and every AI assistant you use remembers your architecture, your preferences, your corrections -- forever.

---

What's new in v0.7

v0.7.0 closes the attested-cortex epic (69/69 across 11 tracks A–K), folds in the originally-v0.7.1 postgres+AGE first-class work, and absorbs the post-grand-slam ship-readiness wave (Batman Forms 1-6 + 7th-form Option-B foundation + QW-1/2/3 + security reconciliation). Canonical feature inventory: docs/internal/v070-feature-inventory.md. Every surface stays default-off or default-equivalent for v0.6.4 callers — see the v0.7 compatibility matrix for the breakdown.

Features

ML and LLM Dependencies (semantic tier+)

  • candle-core, candle-nn, candle-transformers -- Hugging Face Candle ML framework for native Rust inference
  • hf-hub -- download models from Hugging Face Hub
  • tokenizers -- Hugging Face tokenizers for text preprocessing
  • instant-distance -- approximate nearest neighbor search
  • reqwest -- HTTP client for LLM-backend communication (smart/autonomous tiers — any provider per #1067: Ollama, xAI, OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Qwen, Mistral, Groq, Together, Cerebras, OpenRouter, Fireworks, LMStudio, vLLM, llama.cpp server)

---

Choose your installation path

You are…Your deployment is…Start here
**A single developer** trying ai-memoryOne AI client on a laptop[docs/install-quickstart.md](docs/install-quickstart.md) — 5-min super-simple install + LLM-backend wired in one block
**An engineer / architect**Single-node production, or multiple agents on one node[docs/INSTALL.md](docs/INSTALL.md) → [docs/production-deployment.md](docs/production-deployment.md)
**An engineer / architect**Multi-server / multi-rack / multi-DC / swarm / hive / federation[docs/enterprise-deployment.md](docs/enterprise-deployment.md) — 8 topologies, singleton → multi-region
**An engineer / architect**PostgreSQL + Apache AGE storage (multi-writer, 10M+ memories, KG-heavy)[docs/postgres-age-guide.md](docs/postgres-age-guide.md) — first-class postgres operator guide
**A decision-maker** evaluating adoption[docs/audience/decision-maker.html](https://alphaonedev.github.io/ai-memory-mcp/audience/decision-maker.html)
Configuring the LLM backend (xAI Grok, OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Qwen, Mistral, Groq, Together, Cerebras, OpenRouter, Fireworks, LMStudio, vLLM, llama.cpp server, or local Ollama)? See docs/integrations/llm-backends.md — the MCP env-block recipe is the same regardless of installation path.

---

v0.7.0 (attested-cortex) rolls together the cortex-fluent legibility work with the full v0.7 trust + A2A scope from ROADMAP §7.3, plus (per operator directive 2026-05-09) the originally-v0.7.1 postgres+AGE first-class work, plus the post-grand-slam ship-readiness wave (Batman Forms 1-6 + 7th-form Option-B foundation + QW-1/2/3 + reconciliation security sweep). The substrate becomes both more articulate (capabilities v3, named loader tools, compacted schemas, Batman MemoryKind vocabulary, persona/atomisation/multistep-ingest primitives) and cryptographically trustworthy (Ed25519 attestation, sidechain transcripts, programmable 25-event hook pipeline, enforced namespace inheritance, V-4 cross-row signed-events hash chain). v0.7.0 also ships postgres + Apache AGE as a first-class storage backendai-memory serve --store-url postgres://… for live daemon use, schema parity across both backends (sqlite + postgres converge on logical schema v57CURRENT_SCHEMA_VERSION = 57 (canonical anchors: src/storage/migrations.rs for sqlite + src/store/postgres.rs for postgres); on-disk migration files end at migrations/sqlite/0047_v56_list_composite_indexes.sql and the postgres in-process migrate_v57() ladder arm (file-name counters lag the logical schema version because both ladders apply post-v34 deltas via in-process arms — see docs/MIGRATION_v0.7.md §schema-ladder for the v35-v57 narrative; v48 #933 added the federation-push DLQ table; v49 #1025 added 14 nullable columns to archived_memories so archive → restore is lossless for the full v0.7.0 Memory shape; v50 #1156 extended agent_quotas PRIMARY KEY from (agent_id) to (agent_id, namespace) so per-namespace K8 quota allotments hold even when a single agent operates across many namespaces — pre-v50 rows backfill to the _global sentinel namespace; v51 #1255 (PR #1296) added the federation_nonce_cache table so peer-replay-prevention nonces persist across daemon restarts; v52 #1389 added the transcript_line_dedup table backing RFC-0001 memory_capture_turn L4 + recover_from_transcript L2 idempotency so a SIGKILL between turns never produces a duplicate memory on subsequent rehydration; v53 #1418 scoped the memories_au FTS5 sync trigger to (title, content, tags) only so non-FTS column updates no longer fire a needless sync; v54 #1466 backfilled tier-default expiry onto legacy NULL-expiry mid/short rows to close the TTL-leak immortal-rows class; v55 #1476 made the W=2 federation-catchup query (updated_at > ? ORDER BY updated_at ASC LIMIT) sargable and added the sqlite idx_memories_updated_at index — postgres adds no new index because memories_updated_at_idx DESC already serves the range scan via Index Scan Backward; v56 #1579 added the composite list/archive ordering indexes (idx_memories_list_order, idx_memories_ns_list_order, idx_archived_ns_archived_at) paired with the sargable storage::list rewrite — sqlite-side DDL; the postgres migrate_v56() arm is a version-stamp no-op; v57 #1579 added the postgres stored generated tsv tsvector column + memories_tsv_gin GIN index so the search/recall shapes match AND rank on the precomputed column instead of re-computing the tsvector per matched row — the legacy memories_content_fts expression index is dropped and the sqlite twin is a version-stamp no-op because FTS5 already materialises the indexed text)), the new ai-memory schema-init CLI verb, and 6-factor recall scoring parity. The v0.6.4 default surface grows by two always-on loaders to 7 tools (memory_load_family + memory_smart_load join the original five); the runtime ceiling at --profile full is 74 advertised entries (73 callable memory tools + the always-on memory_capabilities bootstrap; verified against Profile::full().expected_tool_count() — see src/profile.rs). Everything new is additive and (for the trust + postgres surfaces) opt-in. Upgrading from v0.6.x? Read docs/MIGRATION_v0.7.md first — most v0.6.4 callers see no behavior change, but pre-v0.6.3.1 v0.6.x users hit the G1 namespace-inheritance fix. Switching to postgres+AGE? See docs/postgres-age-guide.md and docs/migration-v0.7.0-postgres.md. Full release notes: docs/v0.7.0/release-notes.md.

v0.6.4 (quiet-tools) — the MCP server ships with a 5-tool default surface (memory_store, memory_recall, memory_list, memory_get, memory_search) plus the always-on memory_capabilities bootstrap. The other 38 tools remain reachable via --profile graph|admin|power|full or runtime expansion through memory_capabilities --include-schema family=<name>. Eager-loading harnesses (Claude Desktop / Codex CLI / Grok CLI / Gemini CLI) drop ~4,700 input tokens of tool schemas per request — a 76.4% reduction measured against cl100k_base BPE. To preserve v0.6.3 behavior 1:1, run ai-memory mcp --profile full. See docs/MIGRATION_v0.6.4.md.

Install in 60 Seconds

Pre-built binaries require no dependencies. Building from source needs Rust and a C compiler.

Fastest: Pre-built binary (no Rust required)

```bash

Quickstart

Get from zero to a working memory in under two minutes.

1. Install

curl -fsSL https://raw.githubusercontent.com/alphaonedev/ai-memory-mcp/main/install.sh | sh

2. Configure MCP (example for Claude Code -- other platforms work the same way)

Merge into ~/.claude.json:

{
  "mcpServers": {
    "memory": {
      "command": "ai-memory",
      "args": ["--db", "~/.claude/ai-memory.db", "mcp", "--tier", "semantic"]
    }
  }
}

3. Store your first memory

ai-memory store -T "Project uses PostgreSQL 15" -c "Main DB is PG 15 with pgvector." --tier long

4. Recall it

ai-memory recall "database"

5. Check stats

ai-memory stats

6. Use with your AI. Restart your AI client. It now has 7 default memory tools advertised on boot (74 advertised entries reachable via runtime expansion or --profile full at v0.7.0) over MCP -- it can store and recall memories natively during conversations.

---

~/.config/ai-memory/config.toml

schema_version = 2

[llm] backend = "xai" model = "grok-4.3" base_url = "https://api.x.ai/v1" api_key_env = "XAI_API_KEY" # process-env-var name (NOT the literal key)


Export `XAI_API_KEY` in your shell rc (`.zshrc` / `.bashrc`); the MCP config stays minimal:
json { "mcpServers": { "memory": { "command": "ai-memory", "args": ["--db", "~/.claude/ai-memory.db", "mcp", "--tier", "autonomous"] } } }

Verify: `ai-memory boot --quiet --limit 1` should report `llm=xai:grok-4.3`. Canonical schema reference: [`docs/CONFIG_SCHEMA.md`](docs/CONFIG_SCHEMA.md).

> **Override path — `env:` block.** Adding an `env:` block to the MCP config with `AI_MEMORY_LLM_BACKEND` / `_API_KEY` / `_MODEL` still works and takes precedence over `config.toml` — useful for CI / per-session tweaks:
>
> 
json > "env": { > "AI_MEMORY_LLM_BACKEND": "xai", > "AI_MEMORY_LLM_API_KEY": "xai-...", > "AI_MEMORY_LLM_MODEL": "grok-4.3" > } >
>
> MCP clients spawn the server as a fresh subprocess with only the `env:` keys from the MCP config — shell exports in `.zshrc` / `.bashrc` don't reach it. The `[llm]` config-file path above retires this paper-cut (every surface reads the same file). **Inline API keys in `config.toml` are rejected at parse time** — use `api_key_env` or `api_key_file`. Background: [#1144](https://github.com/alphaonedev/ai-memory-mcp/issues/1144) → [#1146](https://github.com/alphaonedev/ai-memory-mcp/issues/1146). Full per-backend recipes: [`docs/integrations/llm-backends.md`](docs/integrations/llm-backends.md).

> **Windows paths:** Use forward slashes or escaped backslashes in `--db`. Example: `"--db", "C:/Users/YourName/.claude/ai-memory.db"`.

> **Tier flag:** The `--tier` flag selects the feature tier: `keyword`, `semantic` (default), `smart`, or `autonomous`. Smart and autonomous tiers need an LLM backend — **post-[#1067](https://github.com/alphaonedev/ai-memory-mcp/issues/1067) (v0.7.0)** that is any of: local [Ollama](https://ollama.com), xAI Grok, OpenAI, Anthropic, Google Gemini, DeepSeek, Kimi (Moonshot), Qwen (Alibaba), Mistral, Groq, Together AI, Cerebras, OpenRouter, Fireworks, LMStudio, vLLM, or llama.cpp server — selected via `AI_MEMORY_LLM_BACKEND`. The `--tier` flag **must** be passed in the args — the `config.toml` tier setting is not used when the MCP server is launched by an AI client.

> **Important:** MCP servers are **not** configured in `settings.json` or `settings.local.json` — those files do not support `mcpServers`.

**Make Claude proactively use ai-memory:** Add a `CLAUDE.md` file to your project root with ai-memory directives. This ensures Claude recalls context at the start of every conversation and stores findings as it works. See the [CLAUDE.md integration guide](CLAUDE.md#using-claudemd-in-your-projects) for a copy-paste template and placement options.

</details>

<details>
<summary><strong>OpenAI Codex CLI</strong></summary>

Add to `~/.codex/config.toml` (global) or `.codex/config.toml` (project). Windows: `%USERPROFILE%\.codex\config.toml`. Override with `CODEX_HOME` env var.
toml [mcp_servers.memory] command = "ai-memory" args = ["--db", "~/.local/share/ai-memory/memories.db", "mcp", "--tier", "semantic"] enabled = true

Or add via CLI: `codex mcp add memory -- ai-memory --db ~/.local/share/ai-memory/memories.db mcp --tier semantic`

> **Notes:** Codex uses TOML format with underscored key `mcp_servers` (not camelCase, not hyphenated). Supports `env` (key/value pairs), `env_vars` (list to forward), `enabled_tools`, `disabled_tools`, `startup_timeout_sec`, `tool_timeout_sec`. Use `/mcp` in the TUI to view server status. See [Codex MCP docs](https://developers.openai.com/codex/mcp).

</details>

<details>
<summary><strong>Google Gemini CLI</strong></summary>

Add to `~/.gemini/settings.json` (user) or `.gemini/settings.json` (project). Windows: `%USERPROFILE%\.gemini\settings.json`.
json { "mcpServers": { "memory": { "command": "ai-memory", "args": ["--db", "~/.local/share/ai-memory/memories.db", "mcp", "--tier", "semantic"], "timeout": 30000 } } }

Or add via CLI: `gemini mcp add memory ai-memory -- --db ~/.local/share/ai-memory/memories.db mcp --tier semantic`

> **Notes:** Avoid underscores in server names (use hyphens). Tool names are auto-prefixed as `mcp_memory_<toolName>`. Env vars in the `env` field support `$VAR` / `${VAR}` (all platforms) and `%VAR%` (Windows). Gemini sanitizes sensitive patterns from inherited env unless explicitly declared. Add `"trust": true` to skip confirmation prompts. CLI management: `gemini mcp list/remove/enable/disable`. See [Gemini CLI MCP docs](https://geminicli.com/docs/tools/mcp-server/).

</details>

<details>
<summary><strong>Cursor IDE</strong></summary>

Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project). Windows: `%USERPROFILE%\.cursor\mcp.json`. Project config overrides global for same-named servers.
json { "mcpServers": { "memory": { "command": "ai-memory", "args": ["--db", "~/.local/share/ai-memory/memories.db", "mcp", "--tier", "semantic"] } } }

> **Notes:** Restart Cursor after editing `mcp.json`. Verify server status in Settings > Tools & MCP (green dot = connected). Supports `env`, `envFile`, and `${env:VAR_NAME}` interpolation (env var interpolation can be unreliable for shell profile variables — use `envFile` as workaround). **~40 tool limit** across all MCP servers. See [Cursor MCP docs](https://cursor.com/docs/context/mcp).

</details>

<details>
<summary><strong>Windsurf</strong> (Codeium)</summary>

Add to `~/.codeium/windsurf/mcp_config.json` (global only — no project-level scope). Windows: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`.
json { "mcpServers": { "memory": { "command": "ai-memory", "args": ["--db", "~/.local/share/ai-memory/memories.db", "mcp", "--tier", "semantic"] } } }

> **Notes:** Supports `${env:VAR_NAME}` interpolation in `command`, `args`, `env`, `serverUrl`, `url`, and `headers`. **100 tool limit** across all MCP servers. Can also add via MCP Marketplace or Settings > Cascade > MCP Servers. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp).

</details>

<details>
<summary><strong>Continue.dev</strong></summary>

Add to `~/.continue/config.yaml` (user) or `.continue/mcpServers/` directory in project root (per-server YAML/JSON files). Windows: `%USERPROFILE%\.continue\config.yaml`.
yaml mcpServers: - name: memory command: ai-memory args: - "--db" - "~/.local/share/ai-memory/memories.db" - "mcp" - "--tier" - "semantic"

> **Notes:** MCP tools only work in agent mode. Supports `${{ secrets.SECRET_NAME }}` for secret interpolation. Project-level `.continue/mcpServers/` directory auto-detects JSON configs from other tools (Claude Code, Cursor, etc.). See [Continue MCP docs](https://docs.continue.dev/customize/deep-dives/mcp).

</details>

<details>
<summary><strong>Grok CLI</strong> (AlphaOne fork — deep integration with auto-recall)</summary>

The [AlphaOne fork of grok-cli](https://github.com/alphaonedev/grok-cli) has built-in ai-memory support with session-scoped MCP connections, automatic memory recall on session start, compaction summary storage, and memory-aware system prompts.

Add to `~/.grok/user-settings.json`:
json { "mcp": { "servers": [ { "id": "ai-memory", "label": "AI Memory", "enabled": true, "transport": "stdio", "command": "ai-memory", "args": ["mcp", "--tier", "semantic"] } ] } }

> **Features:** Auto-recall on session start (injects relevant memories into system prompt), compaction summaries stored as mid-tier memories, MCP tools available in all modes (agent, plan, ask), session-scoped connections (no per-message cold starts). Uses `--tier semantic` by default (local embeddings, no LLM backend required). See [grok-cli docs](https://github.com/alphaonedev/grok-cli/blob/main/docs/CONFIGURATION.md) for full setup.

</details>

<details>
<summary><strong>xAI Grok API</strong> (API-level, remote MCP)</summary>

Grok connects to MCP servers over HTTPS (remote only, no stdio). No config file — servers are specified per API request.
bash ai-memory serve --host 127.0.0.1 --port 9077

89 REST route registrations (75 unique URL paths) at http://127.0.0.1:9077/api/v1/

```

</details>

Step 4: Done. Test it.

Restart your AI assistant. If using MCP, it now has the 7-tool default surface advertised on session boot (the original 5 + memory_load_family + memory_smart_load; the other 66 of the 73 callable tools load on demand via --profile or memory_capabilities --include-schema). Ask it: "Store a memory that my favorite language is Rust." Then in a new conversation, ask: "What is my favorite language?" It will remember.

---

SDKs

In addition to the MCP / HTTP / CLI surfaces, ai-memory ships first-party language SDKs for HTTP clients and helper utilities (e.g. requireProfile for runtime profile assertions on v0.6.4+ daemons).

TypeScript / JavaScript@alphaone/ai-memory on npm

npm install @alphaone/ai-memory

Pythonai-memory-mcp on PyPI (the import name remains ai_memory)

pip install ai-memory-mcp
from ai_memory import AiMemoryClient, require_profile

with AiMemoryClient(base_url="http://127.0.0.1:9077", api_key="...") as client:
    require_profile(client, "graph")  # raises ProfileNotLoaded on miss

Both SDKs are versioned with the server (0.6.4 matches ai-memory 0.6.4). v0.6.4+ daemons enforce the profile contract; pre-v0.6.4 daemons fall back to a permissive warn-and-continue so SDK upgrades don't break old servers. Source lives in sdk/typescript/ and sdk/python/.

---

Interfaces

  • 89 HTTP routes (75 unique paths) -- full REST API on 127.0.0.1:9077 (works with any AI or tool)
  • 82 CLI subcommands at v0.7.x under --features sal OR --features sal-postgres (80 in the default build) -- complete CLI with identical capabilities
  • 74 MCP tools at full profile (7 default at v0.7.0; verified against Profile::full().expected_tool_count()) -- native integration for any MCP-compatible AI
  • Interactive REPL shell -- recall, search, list, get, stats, namespaces, delete with color output
  • JSON output -- --json flag on all CLI commands

Integration Methods

🇨🇳 中文文档镜像 AI 翻译 2026-06-16
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

ai-memory 是一个通用的 AI 记忆管理系统,旨在为 AI 智能体提供持久化的上下文存储能力。通过实现 MCP 协议,它能够让 AI 助手(如 Claude)拥有跨会话的记忆功能,实现真正的“通用 AI 记忆”,让你的 AI 助手能够记住用户的偏好、历史信息及复杂知识。

⚡ 功能介绍

在 v0.7.0 版本中,ai-memory 完成了重大升级,正式整合了 postgres+AGE 数据库支持,并实现了生产级��就绪状态。目前系统已具备完善的特性清单,包括增强的安全机制、优化的 Batman Forms 架构以及 QW 系列功能,能够为复杂的 AI 任务提供稳定且高性能的记忆支撑。

📋 环境依赖

本项目依赖于高性能的机器学习运行时环境。核心依赖包括 Hugging Face 的 Candle ML 框架(用于 Rust 原生推理)、hf-hub(用于模型下载)、tokenizers(用于文本预处理)以及 instant-distance 等向量计算组件,确保在语义层级上的高效处理。

🛠 安装步骤(Docker/pip/源码)

根据您的使用场景,ai-memory 提供多种安装路径。个人开发者可以通过快速安装脚本在 5 分钟内完成本地 LLM 后端配置;工程师或架构师则可以根据需求选择单节点生产部署或多 Agent 节点部署。对于追求速度的用户,推荐直接使用无需 Rust 环境的 Pre-built binary 预编译二进制文件进行安装。

🚀 使用教程

通过简单的命令行脚本即可在两分钟内完成从零到可用记忆系统的搭建。首先使用 curl 脚本进行安装,随后根据您的 AI 客户端(如 Claude Code)修改配置文件(如 ~/.claude.json),将 ai-memory 作为 MCP Server 接入,即可让 AI 助手获得记忆能力。

⚙️ 配置说明(含 MCP / env)

系统的核心配置位于 ~/.config/ai-memory/config.toml。用��可以通过该文件定义 LLM 后端(如 xai)、模型名称及 API 基础路径。为了安全起见,建议通过环境变量(如 XAI_API_KEY)传递 API Key,保持 MCP 配置文件简洁且不泄露敏感信息。

🔌 API 说明

ai-memory 提供丰富的接口能力,包括基于 HTTP 的 REST API 服务,注册了多达 89 个路由路径。此外,系统还支持 MCP 协议和 CLI 命令行界面。通过特定的 profile 配置,用户可以按需加载不同的工具集,实现从基础 7-tool 表面到 70+ 高级工具的灵活切换。

🔄 工作流/模块

ai-memory 不仅支持 MCP 和 HTTP 协议,还提供了官方原生语言 SDK(如 TypeScript/JavaScript),方便开发者在 HTTP 客户端中集成。通过 SDK 提供的辅助工具(如 requireProfile),开发者可以在运行时对守护进程进行 Profile 断言,确保 AI 记忆调用的准确性与安全性。

🎯 aiskill88 AI 点评 A 级 2026-06-15

高质量的AI内存MCP工具

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
ai-memory-mcp 中文教程ai-memory-mcp 安装报错怎么办ai-memory-mcp MCP 配置ai-memory-mcp 与同类工具对比ai-memory-mcp 最佳实践ai-memory-mcp 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

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

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

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

ai-memory-mcp 是一款Rust开发的AI辅助工具。开源MCP工具:Persistent memory for any AI — MCP server, HTTP API, CLI. Works with Claude, Cha。⭐25 · Rust 主要应用场景包括:AI内存优化。
💡 AI Skill Hub 点评

经综合评估,AI内存MCP 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

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

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

📚 深入学习 AI内存MCP
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 ai-memory-mcp
原始描述 开源MCP工具:Persistent memory for any AI — MCP server, HTTP API, CLI. Works with Claude, Cha。⭐25 · Rust
Topics AIMCPRust
GitHub https://github.com/alphaonedev/ai-memory-mcp
License Apache-2.0
语言 Rust
🔗 原始来源
🐙 GitHub 仓库  https://github.com/alphaonedev/ai-memory-mcp 🌐 官方网站  https://alphaonedev.github.io/ai-memory-mcp/

收录时间:2026-06-15 · 更新时间:2026-06-16 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →