Self-hosting
The Mneva engine source isn't open right now, but the mneva-connect client is MIT-licensed and the protocol is a thin HTTP API. If you need to run the engine in your own environment for compliance or air-gapped reasons, contact support@mneva.dev for a self-hosting license.
Why self-host
Most users should not. The hosted service has wander running, Anthropic configured, nginx + TLS in place, the nightly timer, the audit trail, all of it. Self-hosting is for cases where the brain data cannot leave your infrastructure:
- Healthcare or finance with strict residency rules
- Air-gapped dev environments
- Corporate policies prohibiting third-party LLM memory stores
- You want to point the engine at a private LLM (your own Ollama / vLLM cluster)
If none of these apply, the hosted plan is the right answer.
Stack
The engine is Node 18+ and SQLite via better-sqlite3. Hard dependencies:
- Node 18 or newer
- A POSIX filesystem with enough room for one SQLite file per tenant
- Ollama with
mxbai-embed-large(for semantic recall) — or skip Ollama and accept keyword-only recall - An LLM endpoint for wander — Anthropic Haiku is the default; can be swapped for Ollama text-gen (e.g.
qwen2.5:3b) by settingMNEVA_WANDER_OLLAMA_MODELand leavingANTHROPIC_API_KEYunset
Optional:
- nginx (or any reverse proxy) for TLS termination
- systemd (or any process manager) for the engine + nightly wander timer
Run it
After your self-hosting license includes the source tarball, set up environment:
# /etc/mneva/admin.env (root:root, 0600)
MNEVA_ADMIN_SECRET=<64 hex chars>
ANTHROPIC_API_KEY=sk-ant-... # optional; Ollama fallback works without
systemd unit (extracted shape):
[Service]
User=mneva
WorkingDirectory=/opt/mneva-engine
ExecStart=/usr/bin/node src/server-http.js
Environment=MNEVA_HTTP_PORT=8787
Environment=MNEVA_HTTP_HOST=127.0.0.1
Environment=MNEVA_ROOT=/var/lib/mneva/tenants
Environment=OLLAMA_BASE=http://127.0.0.1:11434
EnvironmentFile=/etc/mneva/admin.env
Wander timer (mneva-wander.timer) at OnCalendar=*-*-* 04:17:00 with RandomizedDelaySec=30m.
Reverse proxy /v1/ to the engine; do not expose /admin/* or /demo/*. The engine listens on 127.0.0.1:8787 by default — keep it there.
Pointing mneva-connect at it
The published npm package defaults to the hosted service. Override:
{
"mcpServers": {
"mneva": {
"command": "npx",
"args": ["-y", "mneva-connect"],
"env": {
"MNEVA_KEY": "mnv_...",
"MNEVA_API": "https://mneva.your-domain.com"
}
}
}
}
MNEVA_API must be a base URL — no trailing /v1. The wrapper appends /v1/:tool to every call.
The protocol is the same as the hosted service — every tool, every endpoint documented in these docs works identically against your self-hosted engine.