Skip to main content
Glama

๐Ÿ”ฅ Motherflame

The Org Brain for teams that use AI

Harvest your company's context once. Let every AI agent โ€” yours, Claude, Cursor โ€” draw on it forever.

CI Python Dependencies MCP Compatible Zero-Knowledge License: MIT

Bring your own AI key. Self-hosted. Your data never leaves your control.


The problem

"The models are not the bottleneck anymore. A frontier model that knows nothing about your company still writes a confident, generic, wrong answer."

Every AI agent your team uses starts from zero. It doesn't know your pricing, your customers, your decisions, your voice. So everyone re-explains the same context, in every chat, forever โ€” and the knowledge stays trapped in scattered files, individual configs, and dead Slack threads.

Motherflame fixes this. It harvests the context that already exists โ€” your markdown, your docs, your notes โ€” into one Org Brain that any agent can query. No migrating into a new workspace. No re-typing context. Just point it at your files and go.


Related MCP server: keystone-mcp

See it in 20 seconds

$ motherflame
  ๐Ÿ”ฅ Motherflame  v0.1.0
  The Org Brain for teams that use AI

๐Ÿ”ฅ Acme Org Brain ยท 18 items
Connected: openai/gpt-4o-mini  ยท  session 20260628-005937
Type a message, '/' for commands, or /exit to quit.

you โ€บ what are our pricing tiers?
  โš™ query_brain(topic=pricing) โ†’ [Product] pricing: Starter/Pro/Enterprise...
ai  โ€บ Three tiers: Starter $29/mo, Pro $99/mo, Enterprise custom.

you โ€บ we just raised a $2M seed round
  โš™ add_fact(category=Company, key=seed_round, value=$2M seed) โ†’ Added
ai  โ€บ Got it โ€” added the $2M seed round to the Org Brain.
  โœ“ Org Brain updated

you โ€บ /optimize
  ๐Ÿ” Org Brain Optimization Report
  Coverage by category:
    Company    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 6
    Product    โ–ˆโ–ˆโ–ˆโ–ˆ 4
    Team       โ–ˆโ–ˆ 2
    ...

Quickstart (under a minute)

# 1. Install (zero dependencies โ€” just Python 3.9+)
git clone https://github.com/opelpleple/motherflame
cd motherflame
python3 -m venv .venv && source .venv/bin/activate   # recommended
pip install -e .

No virtualenv? On modern macOS/Linux a bare pip install may be blocked (PEP 668). Either use the venv above, or pipx install -e ., or pip install -e . --break-system-packages. There are no third-party deps to install โ€” only Motherflame itself.

# 2. Try it immediately โ€” no API key, no signup
motherflame connect          # generates a local Flame Key for you
motherflame start            # harvest your files (keyword mode works key-free)
motherflame                  # drop into the agent

# 3. (Optional) Connect your own AI for high-quality extraction + chat
motherflame setup            # pick Anthropic / OpenAI / Ollama, paste your key

That's it. Type / any time to see every command. See CONCEPTS.md for a glossary of terms (Flame Key, claims, contested, etc.).

Two ways to run

No API key

With your AI key (setup)

Harvest

keyword extraction (works, lower precision)

LLM extraction (high quality)

Chat / query

โ€”

full agentic chat

Everything else

โœ…

โœ…


What it does

Feature

What it means

๐Ÿง 

Org Brain

One structured knowledge base โ€” company, product, team, voice, strategy

๐Ÿค–

Agent chat

A real tool-using agent (not Q&A) that reads and writes the brain

๐Ÿ“‹

Planning

/plan breaks a goal into steps, then executes them autonomously

๐ŸŒพ

Smart harvest

LLM extraction from your files (keyword fallback when offline)

โ™ป๏ธ

Freshness

/refresh re-scans only files that changed since last time

๐Ÿ”

Zero-knowledge sync

push/pull your brain across the team โ€” encrypted client-side

๐Ÿ”Œ

MCP server

Connect Claude Code, Cursor, or any MCP agent to your Org Brain

๐Ÿ“‘

Provenance

/sources + /history โ€” know exactly what was scanned and where every fact came from

๐Ÿ’พ

Sessions

Conversations persist; resume context with --resume


Commands

Setup
  motherflame setup              Connect your AI key (Anthropic/OpenAI/Ollama)
  motherflame connect <key>      Connect to your Org Brain (Flame Key)

Core
  motherflame                    Smart entry โ†’ drops into agent chat when ready
  motherflame start              Harvest org context (AI extraction + interview)
  motherflame chat [--resume]    Talk to your Org Brain agent
  motherflame query "<q>"        One-off question
  motherflame brain              View everything in the Org Brain
  motherflame status             Connection & brain status

Sync (zero-knowledge)
  motherflame push               Encrypt & sync your brain to the cloud
  motherflame pull               Pull & merge teammates' context

Integrate
  motherflame mcp                Run MCP server (for Claude Code / Cursor)

In-chat slash commands

Type / and pick from a menu, or type the command directly:

/plan       Plan a multi-step task, then execute it
/harvest    Scan folders โ†’ add facts
/refresh    Re-scan only changed files (freshness)
/optimize   Find gaps, duplicates, coverage + AI suggestions
/sources    Where each fact came from (provenance)
/history    What's been scanned & sent to the brain
/gaps       What's still missing
/brain      Show the full brain

Architecture

                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   your files  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚   harvest (LLM / keyword)โ”‚
   (md/html/txt/pdf)    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚  fingerprints (freshness)
                                     โ–ผ
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚                  ORG BRAIN                        โ”‚
   โ”‚   facts ยท gaps ยท provenance ledger ยท sessions     โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚               โ”‚                  โ”‚
     agent chat       MCP server         push / pull
     (tool-use)    (Claude/Cursor)   (zero-knowledge sync)

Modules (stdlib Python; sync uses the audited cryptography lib):

Module

Responsibility

core.py

Commands, harvest, display, the interactive REPL

runtime.py

Agentic tool-use loop + planning (OpenAI + Anthropic)

agent.py

LLM calls, arrow/checkbox TTY pickers, providers

ledger.py

Provenance events + file fingerprints (freshness)

sessions.py

Persistent chat history

sync.py

Client-side encryption + cloud backend

mcp_server.py

JSON-RPC MCP server over stdio


๐Ÿ” Zero-knowledge sync

Your Org Brain is encrypted on your machine before it ever touches the network. The backend only ever sees ciphertext.

  • Key derivation: scrypt(flame_key, salt) โ†’ 32-byte key

  • Cipher: AES-256-GCM (authenticated encryption) via the audited cryptography library โ€” we deliberately do not hand-roll crypto.

  • Backward compat: brains written by older versions (a hand-rolled cipher) are still decryptable, but everything new is AES-GCM.

Wrong key? Tampered bytes? Decryption fails loudly (GCM tag check) โ€” never silently returns garbage.

On dependencies: Motherflame's only runtime dependency is cryptography. For security-sensitive code, a single audited, widely-used crypto library is the right call โ€” "no crypto dependency" would mean hand-rolling primitives, which is exactly what you don't want from a tool that stores company secrets.

# Solo / single machine (default โ€” zero setup):
motherflame push    # encrypt locally โ†’ store ciphertext in ~/.motherflame/cloud/
motherflame pull    # decrypt locally โ†’ merge

# Real team sync โ€” point at a git repo you control:
motherflame config set sync_remote git@github.com:yourco/org-brain.git
motherflame push    # commits the encrypted blob to that repo
motherflame pull    # teammates pull + merge (their claims survive, never clobbered)

The git backend stores only ciphertext in your repo โ€” the host (GitHub/GitLab/ self-hosted) never sees your data. Merges union everyone's claims, so conflicting values surface as contested rather than overwriting each other.


๐Ÿ”Œ Connect any agent (MCP)

Motherflame speaks the Model Context Protocol. Add it to your MCP client's config:

{
  "mcpServers": {
    "motherflame": {
      "command": "motherflame",
      "args": ["mcp"]
    }
  }
}

Where that config lives:

  • Claude Code โ€” run claude mcp add motherflame -- motherflame mcp, or edit ~/.claude.json

  • Claude Desktop โ€” ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)

  • Cursor โ€” ~/.cursor/mcp.json (or Settings โ†’ MCP)

If motherflame isn't on your PATH (e.g. it's in a venv), use the absolute path to the executable as command โ€” find it with which motherflame.

Exposes three tools to the external agent: query_brain, list_facts, add_fact. The agent decides when to call them from their descriptions โ€” e.g. it calls query_brain whenever it needs company-specific facts instead of guessing. Returns are token-budgeted, and contested facts are flagged so the agent never states a disputed value as settled.

Read-only mode. The MCP server has no transport-level auth (it's stdio, local by design). If you connect an agent you don't fully trust, run it read-only so it can query but not write: MOTHERFLAME_MCP_READONLY=1 motherflame mcp (or set readonly_mcp: true in config). add_fact is then refused.


Why Motherflame (vs. the alternatives)

Motherflame

Tana

Augment Code

Notion AI

Harvest from existing files

โœ…

โŒ

โŒ

โŒ

No migration into a new workspace

โœ…

โŒ

โŒ

โŒ

Bring-your-own-AI key

โœ…

โŒ

โŒ

โŒ

Zero-knowledge encryption

โœ…

โŒ

โŒ

โŒ

MCP server for any agent

โœ…

โœ…

โš ๏ธ

โŒ

Runs as a CLI (scriptable)

โœ…

โŒ

โš ๏ธ

โŒ

Cost model

Self-hosted + your own AI key

$$$

$$$$

$$$


๐Ÿชถ Almost zero dependencies

The entire CLI โ€” agent loop, MCP server, TTY pickers, conflict engine โ€” is built on the Python standard library. The one runtime dependency is cryptography for AES-256-GCM, because security code should use audited primitives, not hand-rolled ones. Clone it, read it, audit it, fork it.

requires-python = ">=3.9"
dependencies = ["cryptography>=42"]   # audited AES-256-GCM โ€” the only one

๐Ÿ”’ Privacy: what leaves your machine

Be deliberate about this โ€” it's the difference between safe and sorry:

  • Encrypted sync (push/pull) only ever transmits ciphertext. Safe.

  • AI harvest sends the contents of the files you scan to your AI provider (OpenAI/Anthropic/etc). Bringing your own key does NOT make this private โ€” the text leaves your machine. Motherflame masks emails/keys/cards/SSNs with regex first, but regex redaction is best-effort, not a guarantee.

  • Motherflame asks for explicit consent before the first AI harvest, and you can always choose local keyword extraction (nothing leaves your machine).

Do not point AI harvest at folders containing real customer PII or credentials. Use keyword mode, or a local model (Ollama), for sensitive data.


Roadmap

  • Agent chat with tool-use + planning

  • LLM-powered harvest + freshness

  • Zero-knowledge client-side encryption

  • MCP server

  • Git-based team sync (host the encrypted repo yourself)

  • pytest suite + CI

  • Watch mode / git hooks โ€” capture context as work happens

  • Per-member access control (today: one Flame Key = shared access)

  • Web dashboard

See STRATEGY.md for the full product thesis and gap analysis.


Contributing

PRs welcome. The codebase is small, readable, and dependency-free by design.

git clone https://github.com/opelpleple/motherflame
cd motherflame && pip install -e .

License

MIT โ€” see LICENSE. Use it, fork it, ship it.

๐Ÿ”ฅ Light your org's flame.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opelpleple/motherflame'

If you have feedback or need assistance with the MCP directory API, please join our Discord server