Logo MuninnDB

MuninnDB

Tổ chức
scrypster

The cognitive database. A new class of data storage. Not a vector store, not a graph DB, not a RAG wrapper. Ebbinghaus decay, Hebbian learning, and Bayesian confidence are engine-native primitives. Memories evolve on their own. MCP-native. Single binary.

Nhà phát hànhscrypster
Kho mãmuninndb
Ngôn ngữGo
Bản fork
75
Sao
331
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MuninnDB cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    331 sao và 75 bản fork từ kho mã được liên kết.

MuninnDB

Memory that strengthens with use, fades when unused, and pushes to you when it matters — accessible over MCP, REST, gRPC, or SDK.

Provisional patent filed Feb 26, 2026 on the core cognitive primitives (engine-native Ebbinghaus decay, Hebbian learning, Bayesian confidence, semantic triggers). This helps protect the project so we can keep it open and innovative for everyone.

CI License Go Status

Prerequisites: None. Single binary, zero dependencies, zero configuration required. To uninstall: rm $(which muninn) and delete ~/.muninn.


Try It — 30 Seconds

macOS / Linux:

bash
# 1. Install
curl -sSL https://muninndb.com/install.sh | sh

# 2. Start (first-run setup is automatic)
muninn start

Windows (PowerShell):

powershell
# 1. Install
irm https://muninndb.com/install.ps1 | iex

# 2. Start (first-run setup is automatic)
muninn start
bash
# 3. Store a memory
curl -sX POST http://127.0.0.1:8475/api/engrams \
  -H 'Content-Type: application/json' \
  -d '{"concept":"payment incident","content":"We switched to idempotency keys after the double-charge incident in Q3"}'

# 4. Ask what is relevant RIGHT NOW
curl -sX POST http://127.0.0.1:8475/api/activate \
  -H 'Content-Type: application/json' \
  -d '{"context":["debugging the payment retry logic"]}'

That Q3 incident surfaces. You never mentioned it. MuninnDB connected the concepts.

Web UI: http://127.0.0.1:8476 · Admin: root / password (change after first login)


Connect Your AI Tools

MuninnDB auto-detects and configures Claude Desktop, Cursor, OpenClaw, Windsurf, OpenCode, VS Code, and others:

bash
muninn init

Follow the prompts. Done. Your AI tools now have persistent, cognitive memory.

Manual MCP configuration — if you prefer to configure by hand:

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "muninn": {
      "url": "http://127.0.0.1:8750/mcp"
    }
  }
}

Note: "type" is intentionally omitted. Claude Desktop v1.1.4010+ crashes on startup if "type": "http" is present in any mcpServers entry — the transport is inferred from the URL.

Add to ~/.claude.json:

json
{
  "mcpServers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp"
    }
  }
}

Add to ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp"
    }
  }
}

Add to ~/.openclaw/openclaw.json:

json
{
  "mcpServers": {
    "muninn": {
      "command": "muninn",
      "args": ["mcp"],
      "transport": "stdio"
    }
  }
}

OpenClaw uses stdio transport. The muninn mcp proxy (included in the binary) handles bearer token auth automatically — no credential needed in the config file.

Add to ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp"
    }
  }
}

Add to .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp"
    }
  }
}

Add to ~/.config/opencode/opencode.json (macOS/Linux) or %APPDATA%\opencode\opencode.json (Windows):

json
{
  "mcp": {
    "muninn": {
      "type": "remote",
      "url": "http://127.0.0.1:8750/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {file:~/.muninn/mcp.token}"
      }
    }
  }
}

Omit the headers block if you are running MuninnDB without token authentication.

Note: OpenCode tools are exposed as muninn_muninn_remember, muninn_muninn_recall, etc. (server key + tool name prefix). Users preferring shorter names can register the server under the key memory instead, which yields memory_muninn_remember, memory_muninn_recall, etc.

Add to .vscode/mcp.json in your workspace:

json
{
  "servers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_ADMIN_TOKEN"
      }
    }
  }
}

Replace YOUR_ADMIN_TOKEN with the token from your muninn.env file. Omit the headers block if running without token auth. If Copilot shows an OAuth error, the headers block is missing — adding it resolves it. Full Copilot setup guide →

Add to your Codebuff MCP config:

json
{
  "mcpServers": {
    "muninn": {
      "type": "http",
      "url": "http://127.0.0.1:8750/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_ADMIN_TOKEN"
      }
    }
  }
}

For proactive memory behavior — Codebuff storing useful discoveries without being asked — add the memory instructions to your AGENT.md. Full Codebuff setup guide →

MuninnDB exposes 35 MCP tools — store, activate, search, batch insert, get usage guidance, manage vaults, and more. On first connect, call muninn_guide for vault-aware instructions. No token required against the default vault. Full MCP reference →


What Just Happened

Most databases store data and wait. MuninnDB stores memory traces — called engrams — and continuously works on them in the background. When you called activate, it ran a 6-phase pipeline: parallel full-text + vector search, fused the results, applied Hebbian co-activation boosts from past queries, injected predictive candidates from sequential patterns, walked the association graph, and scored everything with ACT-R temporal weighting — in under 20ms. (The graph walk is currently inert on real corpora and is being reconsidered — the association graph reaches your results through the Hebbian boost, not through hops. See docs/internals/decision-record.md, #801.)

The Q3 incident surfaced because MuninnDB understood that "payment retry logic" and "idempotency keys after a double-charge" are part of the same conversation. You never wrote that relationship. It emerged from semantic proximity and how these concepts travel together. That is the difference between a database and memory.

Deep dive: How Memory Works →


Why MuninnDB

  • Temporal priority — the database continuously recalculates what matters based on how recently and how often you've accessed each memory. Memories you use stay sharp. Memories you ignore fade naturally. The database moves while you sleep.
  • Hebbian learning — memories activated together automatically form associations. Edges strengthen with co-activation, fade when the pattern stops. You never define a schema of relationships.
  • Predictive activation — the database tracks sequential patterns across activations and learns to surface the next memory before you ask for it. Recall@10 improves 21% in workflow-oriented use cases.
  • Semantic triggers — subscribe to a context. The database pushes when something becomes relevant — not because you queried, but because relevance changed. No polling. No cron. The DB initiates.
  • Bayesian confidence — every engram tracks how sure MuninnDB is. Reinforcing memories raise confidence; contradictions lower it. Grounded in evidence, not a label you assign.
  • Plug-and-play AI onboarding — call muninn_guide and the database tells your AI exactly how to use memory, customized to the vault's configuration. No manual prompt engineering.
  • Retroactive enrichment — add the embed or enrich plugin and every existing memory upgrades automatically in the background. No migration. No code change. The database improves what it already holds.
  • Bulk insert — batch up to 50 memories in a single call across all protocols (REST, gRPC, MCP). Efficient for data seeding, migration, and high-throughput agents.
  • Four protocols — MBP (binary, <10ms ACK), REST (JSON), gRPC (protobuf), MCP (AI agents). Pick your stack; they all hit the same cognitive engine.
  • Single binary — no Redis, no Kafka, no Postgres dependency. One process. One install command. Runs on a MacBook or a 3-node cluster.

Examples

REST — the full cycle:

bash
# Write
curl -sX POST http://127.0.0.1:8475/api/engrams \
  -H 'Content-Type: application/json' \
  -d '{
    "concept": "auth architecture",
    "content": "Short-lived JWTs (15min), refresh tokens in HttpOnly cookies, sessions server-side in Redis",
    "tags": ["auth", "security"]
  }'

# Activate by context (returns ranked, time-weighted, associated memories)
curl -sX POST http://127.0.0.1:8475/api/activate \
  -H 'Content-Type: application/json' \
  -d '{"context": ["reviewing the login flow for the mobile app"], "max_results": 5}'

# Search by text
curl 'http://127.0.0.1:8475/api/engrams?q=JWT&vault=default'

Python SDK:

python
from muninn import MuninnClient

async with MuninnClient("http://127.0.0.1:8475") as m:
    # Store
    await m.write(vault="default", concept="auth architecture",
                  content="Short-lived JWTs, refresh in HttpOnly cookies")

    # Activate — context-aware, ranked, cognitively weighted
    result = await m.activate(vault="default",
                              context=["reviewing the login flow"],
                              max_results=5)
    for item in result.activations:
        print(f"{item.concept}  score={item.score:.3f}")
bash
pip install muninn-python

LangChain integration:

python
from muninn.langchain import MuninnDBMemory
from langchain.chains import ConversationChain

memory = MuninnDBMemory(vault="my-agent")
chain = ConversationChain(llm=your_llm, memory=memory)
# Every turn is stored. Every response draws on relevant past context.

Go SDK:

go
import "github.com/scrypster/muninndb/sdk/go/muninn"

client := muninn.NewClient("http://127.0.0.1:8475", "your-api-key")
id, _ := client.Write(ctx, "default", "auth architecture",
    "Short-lived JWTs, refresh in HttpOnly cookies", []string{"auth"})
resp, _ := client.Activate(ctx, "default", []string{"login flow"}, 5)
bash
go get github.com/scrypster/muninndb/sdk/go/muninn

Node.js / TypeScript SDK:

typescript
import { MuninnClient } from '@muninndb/client';

const client = new MuninnClient({ token: 'your-api-key' });
const { id } = await client.write({ concept: 'auth architecture',
    content: 'Short-lived JWTs, refresh in HttpOnly cookies' });
const result = await client.activate({ context: ['login flow'] });
bash
npm install @muninndb/client

PHP SDK:

php
use MuninnDB\MuninnClient;

$client = new MuninnClient(token: 'your-api-key');
$result = $client->write(concept: 'auth architecture',
    content: 'Short-lived JWTs, refresh in HttpOnly cookies');
$memories = $client->activate(context: ['login flow']);
bash
composer require muninndb/client

More examples → · Full API reference →


License

MuninnDB uses the Business Source License 1.1 (BSL 1.1).

  • Free for individuals, hobbyists, researchers, and open-source projects.
  • Free for small organizations (<50 employees and <$5M revenue).
  • Free for all internal use.
  • Commercial hosted/SaaS/DBaaS/managed services require a license from the author.
  • Automatically becomes Apache 2.0 on February 26, 2030.
  • Provisional patent filed Feb 26, 2026 on the core cognitive engine.

Full terms: LICENSE. See also CLA for contributors.


Configuration

MuninnDB works out of the box with no configuration. The bundled local embedder is included — offline, no API key, no setup.

When you're ready to customize:

WhatHow
Embedder: bundled (default)On automatically — set MUNINN_LOCAL_EMBED=0 to disable
Embedder: OllamaMUNINN_OLLAMA_URL=ollama://localhost:11434/nomic-embed-text
Embedder: OpenAIMUNINN_OPENAI_KEY=sk-... (+ optional MUNINN_OPENAI_URL=http://localhost:8080/v1; invalid override disables OpenAI init)
Embedder: VoyageMUNINN_VOYAGE_KEY=pa-...
Embedder: CohereMUNINN_COHERE_KEY=...
Embedder: Google (Gemini)MUNINN_GOOGLE_KEY=...
Embedder: JinaMUNINN_JINA_KEY=...
Embedder: MistralMUNINN_MISTRAL_KEY=...
LLM enrichmentMUNINN_ENRICH_URL=anthropic://claude-haiku-4-5-20251001 + MUNINN_ANTHROPIC_KEY=sk-ant-...
Data directoryMUNINNDB_DATA=/path/to/data (default: ~/.muninn/data)
Memory limitMUNINN_MEM_LIMIT_GB=4

Docker:

bash
docker run -d \
  --name muninndb \
  -p 8474:8474 -p 8475:8475 -p 8476:8476 -p 8750:8750 \
  -v muninndb-data:/data \
  ghcr.io/scrypster/muninndb:latest

Full self-hosting guide →


Documentation

For an intent-organized reading guide, see docs/index.md.

QuickstartDetailed install, Docker, embedder setup, first vault
How Memory WorksThe neuroscience behind why this works
ArchitectureERF format, 6-phase engine, wire protocols, cognitive workers
CapabilitiesTechnical capability statement with code references for every feature
Cluster OperationsMulti-node clustering, replication, and leader election
Cognitive PrimitivesTemporal scoring, Hebbian learning, Bayesian confidence, PAS
EngramCore data structure: fields, lifecycle states, and key-space layout
Entity GraphNamed entity extraction, relationships, and cross-vault entity index
Semantic TriggersPush-based memory — how and why
Auth & VaultsTwo-layer model, API keys, full vs. observe mode
Hierarchical MemoryTree-structured memory for outlines, plans, and task hierarchies
IndexIntent-organized reading guide
PluginsEmbed + enrich — retroactive enrichment without code changes
Retrieval DesignThe 6-phase ACTIVATE pipeline: how recall queries are processed
Self-HostingDeployment options, environment variables, and data directory setup
Feature ReferenceComplete list of every feature, operation, and config option
vs. Other DatabasesFull comparison with vector, graph, relational, document

Contributing

PRs welcome. For large changes, open an issue first.

By submitting a pull request, you agree to the Contributor License Agreement.

Ports at a glance: 8474 MBP · 8475 REST · 8476 Web UI · 8477 gRPC · 8750 MCP


Troubleshooting

MuninnDB speaks both http and sse MCP transports — the server handles either. The "type" field in your config must match what your client expects:

  • Claude Desktop v1.1.4010+: omit "type" entirely — the transport is inferred from the URL. Adding "type": "http" crashes Claude Desktop on startup.
  • Most other tools (Cursor, Windsurf, VS Code, etc.): "type": "http" is correct.
  • Older clients (Claude Code before v2.1.53): use "type": "sse".

If your tool reports a schema validation or config parsing error, try removing "type" or switching between "http" and "sse".

Check that the server is running: muninn status. If the server is running but tools hang, check muninn logs for errors. The most common cause is a stale MCP config pointing to the wrong port — verify the URL in your config matches http://127.0.0.1:8750/mcp.

The binary must be in your PATH. On macOS/Linux, the default install location is ~/.local/bin/muninn — run echo $PATH to verify it includes ~/.local/bin. If not, add export PATH="$HOME/.local/bin:$PATH" to your ~/.zshrc or ~/.bashrc and restart your shell. On Windows, the default is %LOCALAPPDATA%\muninn — run $env:PATH in PowerShell to verify.

The bundled local embedder uses ONNX Runtime, which requires the Visual C++ Redistributable on Windows. Most machines already have it. If you see an error about onnxruntime.dll or "ORT environment init", install the Visual C++ 2019+ Redistributable (x64) and restart muninn.


Named after Muninn — one of Odin's two ravens, whose name means "memory" in Old Norse. Muninn flies across the nine worlds and returns what has been forgotten.

Built by MJ Bonanno · muninndb.com · BSL 1.1


MuninnDB is patent pending (U.S. Provisional Patent Application No. 63/991,402) and licensed under BSL 1.1.

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "scrypster-muninndb": {
      "command": "",
      "args": []
    }
  }
}

Dùng MCP MuninnDB với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MuninnDB, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MuninnDB làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MuninnDB.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "scrypster-muninndb": {
      "command": "npx",
      "args": [
        "-y",
        "muninndb"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MuninnDB, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MuninnDB.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MuninnDB giúp tôi làm việc này không?
MuninnDB
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MuninnDB.

Câu hỏi thường gặp

Máy chủ MCP MuninnDB dùng để làm gì?

MuninnDB là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MuninnDB với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MuninnDB với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MuninnDB với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MuninnDB, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MuninnDB với TypingMind?

MuninnDB hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MuninnDB cung cấp những công cụ nào trong TypingMind?

MuninnDB cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MuninnDB không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MuninnDB yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇