MuninnDB

Protocols & Interfaces

MuninnDB starts four listeners on launch. Each serves a different use case and client type.

MBP
:8747
Binary TCP
fastest
gRPC
:8748
Protobuf RPC
standard
REST
:8749
HTTP/JSON
easy
MCP
:stdio
AI agent tools
agents

MBP — Muninn Binary Protocol

MBP is MuninnDB's native binary protocol over TCP. It uses length-prefixed frames with msgpack serialization and supports pipelining — send multiple requests without waiting for responses. Use MBP for production AI agents where latency matters.

go — Go SDK (uses MBP by default)
// MBP is default when using muninn:// scheme
mem := muninn.NewMemory("api-key", "muninn://localhost:8747")

REST API

The REST API is available at port 8749 and accepts JSON. It's great for quick integration, scripting, and testing. All endpoints follow a consistent resource model.

bash — curl examples
# Store an engram
curl -X POST http://localhost:8749/v1/engrams \
  -H "Authorization: Bearer mn_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{"concept": "api key rotated", "content": "...", "tags": ["security"]}'

# Activate — cognitive retrieval
curl -X POST http://localhost:8749/v1/activate \
  -H "Authorization: Bearer mn_live_abc123" \
  -H "Content-Type: application/json" \
  -d '{"context": "what security events happened?", "limit": 5}'

Full REST API reference: REST API Reference →

gRPC

gRPC on port 8748 uses Protobuf for serialization. Good for teams who standardize on gRPC, or when building clients in languages other than Go. The proto definitions are in the repo at proto/muninn.proto.

MCP — Model Context Protocol

MCP (Model Context Protocol) is a standard that lets AI agents like Claude and Cursor connect to external tools. MuninnDB ships with 11 MCP tools built in — no separate server needed.

Tool Description
muninn_store Store a new engram
muninn_activate Activate — cognitive retrieval
muninn_get Point read by engram ID
muninn_update Update an existing engram
muninn_archive Archive an engram
muninn_search Full-text search
muninn_list List engrams with filters
muninn_link Create explicit association between engrams
muninn_subscribe Create a semantic trigger
muninn_stats Vault statistics
muninn_health Server health check
claude_desktop_config.json — Add MuninnDB MCP server
{"mcpServers": {
  "muninndb": {
    "command": "/path/to/muninndb",
    "args": ["mcp"],
    "env": {
      "MUNINN_KEY": "mn_live_abc123",
      "MUNINN_VAULT": "my-agent"
    }
  }
}
← Previous Next →