Skip to main content
Glama
archivist
by sonixz

AIrchivist

The repository, the package and the command are named archivist; the documents say Archivist.

A knowledge store for coding agents, with an archivist. Agents connect over the Model Context Protocol (MCP), read what the store holds and propose items; they never write directly: the archivist files each proposal (a place, themes, links) and answers with a receipt. You run it from a control panel in the terminal, where you can also fill it yourself. Everything lives in one folder on your machine, in SQLite.

The result of a capture: where the archivist filed the note, and who the journal names

Site · Front page · Devlog · Status · Documents

Archivist is the engine of Second Brain GD, a desktop app, extracted into a repository of its own: the same code and the same data model, without the desktop interface.

Does it work today?

Yes, locally, on Linux. STATUS.md is the full account; in short:

  • What works: the store, the MCP server (twelve tools that read, two that propose, one token and one level per client), the archivist filing with one model call, the control panel and the same actions as plain commands, several Brains on one machine, capture of a note, a file, a folder or a web address, backups with verify and restore.

  • How it was checked: 398 tests run offline, without a model key, on Python 3.12 and 3.13. Two coding agents, Claude Code and Codex, were connected for real (the trial); the filing was tried with a real model on 26 cases (results).

  • What was not tried: the panel's key dialog and capture dialog with the real provider (the commands were); any terminal other than tmux on Linux under WSL; Windows and macOS; a Brain made by the desktop app; search at 10,000 items with real vectors.

  • What it is not yet: safe on a network (below); isolated (Brains on one machine are separate folders and processes of the same user); able to file with more than one model provider, OpenAI's API. The archivist's prompt and receipts are in French for now.

Related MCP server: Piia Engram

Local only: do not expose it

The engine is local only. It is not safe to expose on a network, and it refuses to try: it binds 127.0.0.1 (any other kind of address stops the start), speaks plain HTTP, and answers POST /mcp to this computer only. Do not put it behind a reverse proxy or a tunnel: a proxy on the same machine makes every caller look local. SECURITY.md lists what is known to be weak.

Quick start

You need Linux, Python 3.12 or 3.13, uv and git.

git clone https://github.com/sonixz/archivist.git
cd archivist
uv sync --locked
uv run archivist

uv sync --locked installs the pinned packages into .venv. uv run archivist opens the control panel (a terminal of 80 x 24 at least). It is keyboard only: every screen lists its keys on its last line, ? lists them all, Escape goes back and changes nothing, q quits.

No model key at hand? export ARCHIVIST_ASSISTANT_PROVIDER=fake first: the archivist then files with the stand-in model the tests use, with no key and no outside call.

From the empty panel to a connected agent:

  1. n, a name, Enter: a project is created. A project is a Brain, with its own folder (under ~/.local/share/archivist/brains/), its own engine and its own port on 127.0.0.1.

  2. Enter opens the Brain. 2 then k asks for its model key (an OpenAI API key; how to make one, with which permissions and models: docs/model-key.md): it shows as dots, the provider checks it, and it is never shown again. Without a key nothing is lost: what comes in waits in the Inbox.

  3. 4 then n creates a user: one agent, one token, one level. The token is shown once, with the line to paste in a shell for Claude Code (claude mcp add …) or Codex, and the block for any other agent's MCP configuration.

  4. a captures something yourself: a note, a file, a folder or a web address. The next window says where the archivist filed it and why.

The same without the panel, as plain commands:

uv run archivist projects create "Research"
uv run archivist key set research
uv run archivist users add research "my agent"
uv run archivist capture note research --title "Garden compost" --text "Compost needs air and water."
uv run archivist status

key set asks for the key at a prompt that does not show it (skip it with the stand-in model). users add prints the token once, with the configuration block. capture answers:

Filed: « Garden compost » in Resources › Garden (a new place) · themes: garden
Receipt: « Garden compost » classé dans Ressources › Garden. Nouvelle place créée.
Journal: created by owner; filed by the archivist

(The stand-in model's answer; a real model writes its own receipt.)

Engines keep running when the panel closes, so that agents still reach their Brains. uv run archivist projects stop research stops one; its data stays.

Connect an agent

A coding agent connects as an MCP client with the Brain's address and its own token. The panel and archivist users add print this block with both already in it:

{
  "mcpServers": {
    "archivist-research": {
      "type": "http",
      "url": "http://127.0.0.1:8765/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

The key names and the file this block goes in differ from one agent to another: check the agent's own documentation. A file that holds a token is a secret: keep it out of a repository. The agent then sees twelve tools that read and, by its level, propose_item and propose_change. What it proposes waits for your approval (p in the panel, or archivist proposals list), unless you marked that user as trusted.

docs/mcp.md has the tools, the levels, the relay for agents that can only start a command, and a way to check a token by hand.

Read more

docs/README.md

every document, one line each

docs/commands.md

every archivist command, its options and exit codes

docs/panel.md

the screens, the tabs, the keys

docs/capture.md

what a capture does, and its limits

docs/mcp.md

the MCP tools, the levels, the relay

docs/configuration.md

environment variables, the home folder, the model

docs/engine-api.md

one engine by hand, and its HTTP routes

STATUS.md

what is verified, loop by loop, and what is not

PRODUCT.md, VISION.md

what it is for, and what it will never be

ARCHITECTURE.md

the parts, with diagrams, and the known weaknesses

BACKLOG.md

what is left, in order

devlog

one page per loop, with pictures of the real panel

The devlog and the front page are HTML: GitHub shows their source, so open them from a clone, or on the project's site: https://sonixz.github.io/archivist/.

Contributing and security

CONTRIBUTING.md says how to set up, test and propose a change. SECURITY.md says what is known to be weak and how to report a fault privately.

uv run ruff check archivist tests tools quality
uv run python -m unittest discover -s tests/python -t . -v

The tests need no key and no network once the packages are installed; they take about ten minutes.

Licence

MIT, see LICENSE. Third-party packages and their licences: THIRD_PARTY_NOTICES.md.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Serves one shared knowledge store over MCP so multiple coding agents can read and write the same facts, standing rules and research notes, with duplicate detection, per-repository scopes and inheritance from a global scope. This lets a correction taught to one agent apply to all of them at once, while tracking usage and keeping concurrent writes safe.
      1
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables coding agents to start from one local, user-owned identity and knowledge store, so preferences, quality bars, lessons, decisions, and project context carry across sessions and MCP-compatible clients. Everything stored is inspectable, editable, and overridable, with approval gating and previews of exactly what a caller would receive.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to search, read, ingest, annotate, and manage a self-hosted knowledge base of archived links, Git repositories, documents, and notes over MCP.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      A self-hosted MCP knowledge server that gives agents a filesystem-shaped store of rules, context, skills, and granted connections — opened in full for standing rules and as an index otherwise, then listed, searched, and read on demand. Agents can only propose diffs and new entries (reviewable and correctable by the owner) and receive credentials for exactly the connections they're bound to.
      1
      MIT