Causal Memory 标志

Causal Memory

社区
JingxuanC

Causal memory layer for AI agents — MCP server that records decision→outcome relationships. Survives compaction.

发布者JingxuanC
代码仓库causal-memory
语言Rust
复刻数
9
星标数
80
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Causal Memory 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 80 个 Star 和 9 个 Fork。

causal-memory

An agent memory system with a causal core — and the only one that models inhibition.

Facts, temporal state, and decision → outcome causal edges on one SQLite store, powered by a hippocampus-style engine: typed spreading activation (excitatory and inhibitory), Hebbian co-occurrence reinforcement, Q-value dynamics, and immutable SWR consolidation. Agents recall what happened, when it was true, why it worked — and what would happen if they acted differently.

License: Apache-2.0 Status: v0.9.3 Tests: 368 Release: v0.9.3 Hermes plugin DSH plugin

English · 简体中文


Why

Every agent forgets why it made past decisions after a few context compactions. It re-fixes the same bug the same wrong way, re-debates the same architecture choice, relearns the same lesson.

This happens because causal information is the most fragile type under text compaction. Real-LLM benchmark (grok-build's production compaction prompt):

Compactions (k)Textual recallCausal-table recall
1100%100%
285%100%
355%100%
545%100%

The causal table survives because it lives outside the agent's context window — compaction cannot touch it.


Demo

30-second single scene — the agent is about to git push --no-verify; intervention_query fires a DANGER chain citing the lesson it recorded last time ("production login failed for 40 minutes; emergency rollback"):

30-second danger-warning demo

Download video · DANGER-scene screenshot · Regenerate: scripts/capture_demo30.py → scripts/render_demo30.py

A 21-second hands-on demo (real memory store, no mocks): pre-action warning (intervention_query → DANGER chain) → experience recall (search_causal) → counterfactual comparison (counterfactual_query) → write loop (record_decision → immediately searchable).

21-second demo

Download video · Warning-scene screenshot · Brand card · Regenerate: scripts/render_demo.py


Benchmarks

CausalEval — the causal memory benchmark (primary)

Most agent-memory benchmarks (LoCoMo, LongMemEval, Memora) test fact recall ("what is the user's preference"). causal-memory's differentiators — typed causal edges, inhibition, intervention prediction, cross-task transfer — are invisible on those suites. CausalEval measures them.

Design: the causal graph is the answer key. Typed DAGs are generated deterministically; conversations are narrated from the graph; gold answers are derived from graph structure — zero hand annotation, zero ambiguity.

CausalEval v13 (soft supersession) — 140 questions, 20 graphs (same LLM, same judge; v12 baseline was 70q/10 graphs; mem0 comparison ran on the 70q protocol):

Capabilitycausal-memoryv12 (70q)mem0 (70q)What it tests
C7 Update100%50%80%Supersede old belief after falsification (soft superseded_by annotation)
C3 Counterfactual95%90%80%Choosing between alternatives with known outcomes
C2 Intervention75%70%40%Forward prediction: "if X again, what happens?"
C4 Inhibition80%90%50%Distinguishing root-cause fix vs blast-radius limiter (prevented edges)
C1 Attribution85%90%90%Backward causal chain → root cause
C5 Temporal-causal90%100%90%Ordering on a causal chain
C6 Lesson transfer20%20%30%Cross-task analogy via meta edges (open limitation)
Overall78%81%65%

Key result: C7 update 50% → 100% (+50pp, 20/20 questions) and it holds at doubled sample size. Soft supersession annotates superseded edges (superseded_by) instead of hiding them — the falsification signal reaches the answer model while the old lesson stays retrievable for counterfactuals (C3 unharmed at 95%). The C6 gap (20% vs mem0 30%) is the remaining open limitation; C1/C4/C5 dips vs v12 are within re-distillation variance and new-graph difficulty (v12 and v13 do not share a distilled corpus).

Fact-recall benchmarks (not our strong suit)

On traditional fact-recall suites, causal-memory performs competitively but does not beat mem0 — this is expected, because fact recall is mem0's specialty and not where causal-memory adds value.

Benchmarkcausal-memorymem0Note
LoCoMo (strict judge)79.1%91.6%mem0's home turf
LongMemEval-S (full pipeline, deepseek-chat)76.4% @ 11.5K tok/q94.4% @ 6.8K tok/q (official) · 73.8% (ind. repro)single-model stack vs platform stack; see docs/benchmarks/longmemeval.md
Memora MPA67.4%71.8%−4.4pp
Compaction survival100%45%External table = immune to compaction
Agent repeat-mistake33%67%−34pp on trap-world

Capability tests (322 across the workspace)

These test capabilities that no fact store (mem0, Zep, Letta) can offer.

CapabilityWhat it provesTests
Prevented-edge warningprevented edge spreads −0.3 activation (GABA analogue)2
Trace-cause attributionBackward CSR traversal finds root cause2
Multi-hop causal chainForward K-hop spreading reaches 2-3 hop outcomes2
Inhibitory filteringPrevented outcomes appear as negative, not false positives1
Intervention comparisonSame outcome has +0.9 for "skip tests" and −0.3 for "add tests"4
SWR consolidationLTP strengthens replayed edges, LTD weakens unvisited, GC forgets dormant5
Q-value dynamicsGood decisions rank higher; Bellman propagates to parents3
Novelty entropyDiverse experience triggers consolidation; uniform does not3
Meta-edge miningCross-session pattern discovery (similar_to / repeated)3
Hebbian co-occurrenceRepeated co-activation strengthens connection3

What makes it different

Capabilitycausal-memorymem0ZepLettaHeLa-Mem
Typed causal semantics (caused/enabled/prevented)✅❌❌❌❌
prevented negative spread (inhibitory)✅❌❌❌❌
Hebbian co-occurrence edges (excitatory)✅❌❌❌✅
Immutable consolidation (delta + clone)✅❌❌❌❌
Q-value dynamic utility✅❌❌❌❌
Forward simulation (intervention_query)✅❌❌❌❌
SWR offline consolidation (LTP/LTD/GC)✅❌❌❌❌
Novelty-entropy consolidation trigger✅❌❌❌❌
Meta-edge cross-session pattern mining✅❌❌❌❌
Compaction survival evidence✅ +20.8pp❌❌❌❌
One graph unifying all memory types✅❌⚠️❌⚠️
Write-time gatekeeping (raw → session_logs)✅✅❌❌❌
Local ONNX embedding (offline)✅✅❌❌❌

Core innovation: the excitatory/inhibitory duality. HeLa-Mem (ACL 2026) builds the excitatory side (Hebbian co-activation, positive spread). causal-memory adds the inhibitory side (prevented edges spread negative activation — a GABA analogue). A complete memory needs both: "what caused this" and "what prevents this from happening again."


Architecture

architecture

Interactive version: docs/architecture.html

  ┌───────────────────────────────────────────────┐
  │           causal-memory (Rust, MCP)            │
  │                                                │
  │  14 tools ← Agent (stdio / HTTP)                 │
  │    ↓                                           │
  │  Write-time gatekeeping                        │
  │    raw turns → session_logs (audit only)       │
  │    distill → facts + causal edges (searchable) │
  │    ↓                                           │
  │  Unified retrieval (RRF fusion)                │
  │    BM25 + semantic cosine → RRF merge          │
  │    Fact layer (BM25 + embeddings)              │
  │    ↓                                           │
  │  ┌──── Hippocampus engine ──────────────────┐  │
  │  │ CSR graph + spreading activation          │  │
  │  │  caused (+1.0)   enabled (+0.5)           │  │
  │  │  prevented (−0.3) ← GABA inhibitory       │  │
  │  │  fact (+0.8)     meta (+0.6)              │  │
  │  │  co_occurrence (Hebbian, dynamic)         │  │
  │  │                                            │  │
  │  │ DG: SimHash pattern separation             │  │
  │  │ CA3: K-hop spreading (forward + reverse)   │  │
  │  │ CA1: Novelty entropy trigger               │  │
  │  │ SWR: LTP/LTD/GC (immutable delta + clone)  │  │
  │  │ Q-value: Bellman dynamics (MemRL-style)    │  │
  │  └────────────────────────────────────────────┘  │
  │    ↓                                           │
  │  SQLite (causal.db) — never compacted          │
  └───────────────────────────────────────────────┘

The causal_edges table is never compacted — it lives outside the agent's context window. That's the entire point.


Edge types

Edge typeSpread coeffBiological analogueMeaning
caused+1.0Glutamate (strong excitatory)"Doing X caused Y"
fact+0.8Semantic association"User is/has Z"
meta+0.6Cortical top-downCross-task pattern link
enabled+0.5Weak excitatory"Doing X enabled Y"
co_occurrencedynamicHebbian LTP"X and Y frequently co-occur"
prevented−0.3GABA (inhibitory)"Doing X prevented Y"
no_effect0.0—No causal relationship

Quick start

bash
git clone https://github.com/JingxuanC/causal-memory.git
cd causal-memory
cargo build --release

MCP integration (Claude Code, Cursor, grok-build, etc.)

First-class installers: Claude Code (integrations/claude-code/) and Codex CLI (integrations/codex/) — MCP registration + activation prompt/skill in one idempotent script each.

json
{
  "mcpServers": {
    "causal-memory": {
      "command": "/path/to/causal-memory/target/release/causal-memory",
      "env": {
        "CAUSAL_MEMORY_DB": "~/.local/share/causal-memory/causal.db"
      }
    }
  }
}

No Rust toolchain? pip install causal-memory puts the same causal-memory console script on your PATH (the full CLI — bare invocation is the stdio MCP server), so "command": "causal-memory" works as the MCP entry too.

To teach the agent when to use the memory tools (agents don't call them proactively without instruction), install the bundled agent skill skills/causal-memory/SKILL.md:

Guided installer (recommended) — one command installs the skill, the causal-memory server, and the MCP registration across every detected client (Claude Code / Cursor / Opencode / Claude Desktop / Kimi Code):

bash
./install.sh                     # interactive, walks you through each step
./install.sh --yes               # non-interactive, accept all defaults
./install.sh --uninstall         # remove the skill (+ optional MCP)

Or via the Skills CLI, or by hand:

bash
# Skills CLI (skills.sh ecosystem) — works with Claude Code, Cursor,
# Kimi Code CLI, Codex, Copilot and more:
npx skills add JingxuanC/causal-memory@causal-memory

…or copy skills/causal-memory/ into your agent's skills directory (e.g. ~/.agents/skills/causal-memory/), or paste CLAUDE.md into your system prompt / AGENTS.md.

HTTP transport (remote agents, multi-agent shared memory)

bash
./target/release/causal-memory http --port 9938   # MCP Streamable HTTP

Observability endpoints on the same port:

GET /metrics                    Prometheus text (RED + recall metrics)
GET /healthz / /readyz          liveness / readiness (readiness probes the store)
GET /debug/recall?query=...     run a recall now, return the full JSON trace
                                (seeds, hop summary, per-result provenance)
GET /debug/recalls              newest-first recall audit rows (persisted,
                                schema v13 recall_audit table; survives restarts)

/metrics and /debug/* expose the recall corpus, so they accept opt-in bearer auth: set CAUSAL_MEMORY_HTTP_AUTH_TOKEN (env or causal-memory setconfig) and they require Authorization: Bearer <token> (unset = open, the previous behavior). /healthz / /readyz stay open on purpose — kubelet probes cannot send bearer headers and leak nothing. /mcp client auth is a separate mechanism: per-tenant bearer tokens (see Multi-tenant HTTP below). Without the token, do not expose the port to the public internet.

Structured JSON logs on stderr: CAUSAL_MEMORY_LOG_FORMAT=json.

Multi-tenant HTTP (per-tenant databases)

Point CAUSAL_MEMORY_TOKENS_FILE (env or causal-memory setconfig) at a JSON file mapping bearer tokens to tenant names:

json
{ "token-for-alice": "alice", "token-for-bob": "bob" }

With the file configured and non-empty, /mcp requires Authorization: Bearer <token>, and each tenant reads and writes its own SQLite store at <db-dir>/tenants/<tenant>.<fnv1a-hash>.db — one database per tenant, opened lazily on first request, so one tenant can never see another's facts or causal edges (covered by an end-to-end isolation test). Missing or unknown tokens get 401 and never create a database file. The file is reloaded when its mtime changes, so tenants can be added or revoked without a restart; if the file turns unreadable at runtime the last-good map stays in force (fail closed).

Unset (or an empty/unreadable file) keeps the previous behavior: no /mcp auth, one shared store — local and stdio usage are unaffected. The startup log states the mode: auth=multi-tenant (N tokens) vs auth=open.

Memory residency: every active tenant holds its own CausalStore and in-memory graph, so RSS grows with the tenant count — see docs/design/enterprise-scaling.md before packing many tenants into one process. The observability endpoints (/metrics, /debug/*) keep reporting on the default store and are still gated by CAUSAL_MEMORY_HTTP_AUTH_TOKEN, independently of tenant auth.

With local embeddings (no API key needed)

bash
cargo build --release --features local-embed
# Uses BAAI/bge-small-en-v1.5 (384 dims, ~130MB, downloads once then offline)

With HTTP embeddings (OpenAI/ZhiPu/etc.)

bash
export CAUSAL_MEMORY_EMBED_API=https://open.bigmodel.cn/api/paas/v4
export CAUSAL_MEMORY_EMBED_KEY=your-key
export CAUSAL_MEMORY_EMBED_MODEL=embedding-3

Python bindings (PyO3)

All 14 memory operations are also available as a Python package, built on the same causal_memory::memory::Memory facade the MCP server uses:

bash
cd crates/causal-memory-py
pip install maturin
maturin develop          # builds and installs into the active venv
python
from causal_memory import CausalMemory

mem = CausalMemory("~/.local/share/causal-memory/causal.db")  # or CausalMemory.in_memory()
mem.record_decision("used Redis mutex for cache stampede protection",
                    "deadlock under load", "caused", "concurrency",
                    context="go 1.22, single redis, 5k rps")
print(mem.search_causal(query="cache stampede protection"))
print(mem.intervention_query("skip the test suite before shipping"))

Methods mirror the 17 MCP tools one-to-one and return the same text. Embedding and LLM features use the same CAUSAL_MEMORY_EMBED_* / CAUSAL_MEMORY_LLM_* environment variables; without them the bindings degrade gracefully to BM25-only retrieval. Smoke tests: maturin develop && pytest tests/.

macOS note: always build the bindings through maturin. Plain cargo build -p causal-memory-py --release fails to link — the Xcode CLT Python ships no libpython3.9 dylib (this is why the py crate sits outside the workspace default-members).


Integrations

Hermes memory provider

hermes-plugin/ turns causal-memory into a drop-in Hermes MemoryProvider — flat facts + decision→outcome causal lessons on one local SQLite store, per-profile by construction (<hermes_home>/causal-memory/causal.db). Wired hooks: system-prompt causal directory, budgeted prefetch recall, non-blocking sync_turn write-behind, and a hermes causal-memory stats CLI. Because the store lives outside the context window, Hermes compaction can't touch it. Install and configuration: hermes-plugin/README.md.

DeepSeek Harness (DSH) native plugin

dsh-plugin/ mounts all 16 causal-memory tools onto DSH's ctx.tools with clean names (no mcp__ prefix) and injects a system-prompt block telling the model when to consult the causal store. Zero runtime dependencies — JSON-RPC over stdio straight to the causal-memory binary. One-line install: dsh plugin --profile web add "$PWD/dsh-plugin" (needs the causal-memory binary — pip install causal-memory, or a repo cargo build --release). Details: dsh-plugin/README.md.


Seventeen MCP tools

ToolWhen to callWhat it does
record_decisionAfter acting on a decisionLogs decision → outcome as a causal edge with relation type; optional context records the world state — same task_tag + context becomes a comparable branch (fork)
rememberAfter any meaningful exchangeZero-friction alternative: paste conversation text, LLM auto-extracts facts/lessons/causal edges
search_causalBefore a non-trivial decisionBM25 + semantic retrieval of past causal episodes
record_factWhen learning a stable factRecords flat facts with scope + confidence; idempotent
search_factsWhen you need "what is" infoBM25 + semantic retrieval over the fact layer
search_memoryWhen unsure which typeUnified: facts + causal lessons fused by RRF
trace_causeWhen something failsSingle-hop reverse: which decision caused this outcome
trace_cause_chainDeep failure analysisMulti-hop backward traversal through the causal graph
invalidate_decisionWhen a lesson is wrongSoft-invalidate (hidden from search, kept for audit)
invalidate_patternWhen a mined pattern is wrongSoft-invalidate a meta edge (the #N handle from search_patterns)
resolve_updatesAfter contradicting outcomesLLM-judged supersession pass over diverged repeated decisions
search_patternsTo recall cross-task lessonsMined meta edges: similar_to / repeated / contradicts / refines
causal_directoryPinned in system promptL0 compact pointer list of what the agent knows
intervention_queryBefore taking an actionForward simulation: predicts outcomes (safe/warning/danger)
counterfactual_queryWhen choosing between optionsContrastive: compares recorded outcomes of two alternatives; renders same-context branches (natural experiments) when they exist; every verdict logs a falsifiable prediction
prediction_reportPeriodic calibration checkPrediction-ledger accuracy overall / per method / per task_tag + pending list
reconstruct_lessonWhen you want the distilled lessonReconstructive retrieval: Markov-blanket subgraph → coherent narrative, with optional N-way calibration

Sleep consolidation

bash
causal-memory sleep --dry-run   # preview what would change
causal-memory sleep             # run consolidation cycle

Immutable SWR 2.0: produces a delta + clone (original graph untouched), with full audit log. Triple-criterion GC (weak AND dormant AND zero-access). Triggers automatically when novelty entropy exceeds threshold.


Causal distill pipeline

The distiller extracts structured memories from raw conversations:

Raw conversation → V3 extraction prompt (130 lines, 6 rules, 5 few-shot)
                   ↓
  Fact/Preference → agent_facts table (BM25 + embedding searchable)
  Lesson/Event    → causal edges (self-referential, searchable)
  Causal          → proper directed edge: decision → outcome
                    with relation type (caused/enabled/prevented)

Raw turns go to session_logs (audit/replay only) — they never enter the retrieval pool. This write-time gatekeeping keeps BM25 precision high.


System layer coverage

All 16 designed layers have end-to-end validation (322 workspace tests):

LayerBenchmarkTests
Fact layerMemora / LoCoMo—
Causal edges (caused/enabled/prevented)Capability12
Hippocampus spreading activationCapability—
SWR consolidation (LTP/LTD/GC)Longitudinal5
Q-value dynamicsLongitudinal3
Novelty entropy triggerLongitudinal3
Sleep-wake cycleLongitudinal1
Meta-edge pattern miningAdvanced3
Co-occurrence HebbianAdvanced3
Intervention query (forward sim)Advanced4
Trace cause chainCapability2
Inhibitory ablationInhibition2
Distill / retrieval / factsMemora / LoCoMo / LME—
Compaction survivalCompact—
Agent trap-worldAgent—
Pipeline e2eMigration / Pipeline2

Build & test

bash
cargo build --release                    # Build binary
cargo test --workspace --no-fail-fast  # Run 322 tests
cargo test --features local-embed     # Run with ONNX embedding tests
cargo clippy --workspace -- -D warnings # Lint

Agent Memory Challenge (AMC/01)

causal-memory enters the Agent Memory Leaderboard first evaluation cycle via an Add/Search integration server — a thin HTTP frontend over the same Memory facade the MCP server runs (BM25 + semantic + entity retrieval, RRF-fused; one store per user_id):

bash
cargo build --release --bin causal-memory-amc
./target/release/causal-memory-amc --db-dir amc_data --port 8787 --write-mode raw
# --write-mode raw (no LLM, platform default) | distill (write-time LLM extraction)
# POST /add (store memory, user_id-isolated) · POST /search (ordered evidence) · GET /health

Docker route: docker build -t causal-memory-amc . && docker run -p 8787:8787 -v amc-data:/data causal-memory-amc. Submission details, method description, and the participation checklist live in docs/benchmarks/amc-2026.md.

Test suite breakdown:

  • 186 library unit tests (types, store, distill, patterns, hippocampus)
  • 45 library integration tests (capability, longitudinal, advanced, pipeline)
  • 91 CLI, benchmark-harness & MCP e2e tests

Research background

Full documentation map: docs/README.md — design docs, benchmark protocols, evaluation reports, paper drafts, and the literature survey.

This project is the engineering output of 17 research notes on agent memory architecture (insights/01-17), a teardown of 7 production agent frameworks, and deep analysis of 10+ memory research papers. Key references:

  • HeLa-Mem (ACL 2026) — Hebbian spreading activation (our closest competitor; we add the inhibitory side)
  • Anthropic Dreams API — immutable consolidation pattern (aligned in SWR 2.0)
  • mem0 — write-time gatekeeping architecture (adopted: session_logs separation)
  • MemRL (arXiv:2601.03192) — Q-value memory dynamics (implemented)
  • Graph World Models — causal-memory maps to "Graph as Reasoner"

Status

v0.9.3 — alpha.

What works (16/16 layers with end-to-end validation):

  • ✅ 17 MCP tools (stdio + HTTP transport)
  • ✅ Write-time gatekeeping (session_logs separation, V3 distill prompt)
  • ✅ BM25 + semantic RRF unified retrieval
  • ✅ Hippocampus engine: CSR spreading activation, DG SimHash, CA1 novelty, SWR 2.0
  • ✅ 7 edge types: caused/enabled/prevented/fact/meta/co_occurrence/no_effect
  • ✅ Causal distill: extracts typed causal edges (caused/enabled/prevented) from conversations
  • ✅ Hebbian co-occurrence reinforcement
  • ✅ Q-value Bellman dynamics
  • ✅ Novelty-entropy consolidation trigger + sleep-wake cycle
  • ✅ Meta-edge cross-session pattern mining
  • ✅ Forward simulation (intervention_query) with prevented-edge warnings
  • ✅ Benchmark harnesses: LoCoMo, LongMemEval, Memora, CausalEval, compaction, agent ablation, capability, longitudinal, advanced
  • ✅ C7 LLM update-resolver (resolve-updates CLI + sleep stage 1.7 supersession)
  • ✅ Vela-style half-life decay tiers (90d / 7d / legacy 0.99-per-day)
  • ✅ Multi-session multi-pass retrieval (LongMemEval multi-session 42.9% → 57.9%, same-codebase)
  • ✅ PyO3 Python bindings (crates/causal-memory-py)
  • ✅ Hermes memory-provider plugin (hermes-plugin/)
  • ✅ DSH native plugin (dsh-plugin/) + architecture visualization (docs/architecture.html)
  • ✅ 368/368 tests passing + clippy clean

What's not done yet:

  • ❌ TS bindings
  • ❌ Forward-simulation prediction-accuracy benchmark (designed, not yet run)
  • ❌ 7×24 production deployment validation

License

Apache-2.0. See LICENSE.

安装

TypingMind
{
  "mcpServers": {
    "causal-memory": {
      "command": "./target/release/causal-memory",
      "args": []
    }
  }
}

将 Causal Memory MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Causal Memory 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Causal Memory 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Causal Memory MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "causal-memory": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Causal Memory MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Causal Memory MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Causal Memory 帮我完成这项任务吗?
Causal Memory
当然。我已阅读。
以下是我使用 Causal Memory 得到的结果。

常见问题

Causal Memory MCP 服务器有什么用途?

Causal Memory 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Causal Memory MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Causal Memory,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Causal Memory MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Causal Memory 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Causal Memory MCP 连接到 TypingMind?

Causal Memory 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Causal Memory MCP 在 TypingMind 中提供哪些工具?

Causal Memory 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Causal Memory MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Causal Memory 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇