motherflame

motherflame

MCP server that connects AI agents to a shared organizational knowledge base, allowing them to query company-specific context like pricing, team, and strategy.

Category
Visit Server

README

<div align="center">

๐Ÿ”ฅ 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.

</div>


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.


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

  • [x] Agent chat with tool-use + planning
  • [x] LLM-powered harvest + freshness
  • [x] Zero-knowledge client-side encryption
  • [x] MCP server
  • [x] Git-based team sync (host the encrypted repo yourself)
  • [x] 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.

<div align="center">

๐Ÿ”ฅ Light your org's flame.

</div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured