Part of the mdaios ecosystem

Intelligent Markdown
Filesystem

RAG and Knowledge Graphs on a directory of Markdown files. Parses YAML frontmatter, builds a search index, auto-constructs a knowledge graph, and exposes everything through five interfaces.

Quick Start GitHub Paper
3
Search modes
5
Interfaces
7
MCP tools
30+
Compatible agents
scroll

Up and running in seconds

Terminal
$ pip install mdaifs

$ cd /path/to/your/markdown-repo

$ mdaifs status                          # stats: files, chunks, graph
$ mdaifs search "onboarding process"     # full-text search
$ mdaifs search "budget" --mode semantic  # vector similarity
$ mdaifs ls --department hr              # list with filters
$ mdaifs validate                        # check frontmatter schema
$ mdaifs freshness                       # find stale documents
$ mdaifs graph nina.scholz               # knowledge graph query
$ mdaifs impact hr                       # what breaks if HR changes?

Everything you need for semantic Markdown

Q

Search

BM25 lexical, semantic (sentence-transformers), and hybrid (RRF fusion) with frontmatter filtering.

G

Knowledge Graph

Automatically constructed from frontmatter fields and Markdown links. Query neighbors, run impact analysis.

F

Freshness Monitoring

Detect documents not reviewed in >6 months based on last-reviewed frontmatter field.

V

Schema Validation

Validate all files against a JSON Schema for frontmatter. Catch errors before they spread.

5

5 Interfaces

CLI, Python API, MCP server (for AI agents), REST API (for dashboards), FUSE mount (transparent to any tool).

W

File Watcher

Auto-reindex on file changes. Keep your search index and knowledge graph always up to date.

Agent-agnostic: Works with Claude Code, Kivanto, Codex CLI, Copilot CLI, Gemini CLI, Cursor, Aider, and any tool that reads Markdown.

Modular extras

pip install
$ pip install mdaifs            # core: CLI, BM25 search, graph, validation, freshness

Optional extras

ExtraCommandAdds
semanticpip install mdaifs[semantic]Vector embeddings (sentence-transformers)
mcppip install mdaifs[mcp]MCP server for AI agents
apipip install mdaifs[api]REST API (FastAPI)
fusepip install mdaifs[fuse]FUSE virtual filesystem
watchpip install mdaifs[watch]File watcher daemon
allpip install mdaifs[all]Everything

Full control from the terminal

CommandDescription
statusShow repository statistics
searchSearch (BM25/semantic/hybrid) with frontmatter filters
lsList files with --department, --type, --status, --owner
validateValidate all frontmatter against JSON Schema
freshnessFind documents not reviewed in >6 months
graphQuery knowledge graph neighbors of an entity
impactImpact analysis: what is affected if an entity changes?
watchWatch for changes and auto-reindex
serveStart REST API (http://localhost:8900)
mcp-serveStart MCP server for AI agents
mountMount as FUSE filesystem

Automatic graph from frontmatter

The graph is automatically constructed from your existing Markdown files — no manual configuration needed.

FM

Frontmatter

Deterministic: owner → has_owner, department → belongs_to, tags → has_tag

LN

Markdown Links

Deterministic: [text](path.md) → references

IN

Inferred

owner + department → works_in

Graph query
$ mdaifs graph nina.scholz
# nina.scholz --[works_in]--> hr
# departments/hr/processes/recruiting.md --[has_owner]--> nina.scholz
# departments/hr/processes/recruiting.md --[has_tag]--> recruiting
Impact analysis
$ mdaifs impact lisa.weber
# Affected documents (4):
#   departments/hr/processes/performance-review.md
#   departments/hr/policies/remote-work.md
#   ...
# Affected departments: hr
# Affected people: nina.scholz, markus.berger

One class, full power

Python
from mdaifs import MdaifsRepo

repo = MdaifsRepo("/path/to/repo")

# Search
results = repo.search("onboarding", department="hr", top_k=5)
for r in results:
    print(f"[{r.score:.2f}] {r.file_path}: {r.heading}")

# Knowledge graph
for t in repo.graph_neighbors("nina.scholz", depth=2):
    print(f"  {t.subject} --[{t.predicate}]--> {t.obj}")

# Impact analysis
impact = repo.graph_impact("hr")
print(impact.affected_documents)
print(impact.affected_people)

# Freshness
for e in repo.freshness():
    if e.category == "overdue":
        print(f"  OVERDUE: {e.file_path} ({e.months_since:.0f} months)")

# List with filters
files = repo.list(department="hr", doc_type="process", status="active")

# Validate
errors = repo.validate()
assert len(errors) == 0, f"{len(errors)} validation errors"

7 tools for AI agents

For AI agents like Claude Code, Kivanto, and others.

Start MCP server
$ mdaifs mcp-serve --repo /path/to/repo
Claude Code config (~/.claude/settings.json)
{
  "mcpServers": {
    "mdaifs": {
      "command": "mdaifs",
      "args": ["mcp-serve", "--repo", "/path/to/repo"]
    }
  }
}

Available MCP tools

ToolDescription
mdaifs_statusRepository statistics
mdaifs_searchSearch with filters
mdaifs_listList files with filters
mdaifs_graph_neighborsQuery knowledge graph
mdaifs_impactImpact analysis
mdaifs_freshnessFreshness report
mdaifs_validateSchema validation

FastAPI with Swagger docs

Start server
$ mdaifs serve --port 8900
# API docs: http://localhost:8900/docs
MethodEndpointDescription
GET/statusRepository statistics
GET/search?q=...Search with filters
GET/files?department=hrList files
GET/frontmatter/{path}File frontmatter
GET/graph/statsGraph statistics
GET/graph/neighbors/{entity}Graph query
GET/graph/impact/{entity}Impact analysis
GET/freshnessFreshness report
GET/validateSchema validation
POST/reloadReload index + graph

Virtual filesystem, transparent to every tool

Mount and query
$ mkdir /mnt/company
$ mdaifs mount /path/to/repo /mnt/company

# Regular files pass through
$ cat /mnt/company/departments/hr/processes/recruiting.md

# Virtual .mdaifs/ directory for queries
$ cat /mnt/company/.mdaifs/status
$ cat /mnt/company/.mdaifs/freshness
$ cat /mnt/company/.mdaifs/search/budget+limits
$ cat /mnt/company/.mdaifs/graph/neighbors/nina.scholz
$ cat /mnt/company/.mdaifs/graph/impact/hr

# Extended attributes expose frontmatter
$ xattr -p user.mdaifs.owner recruiting.md        # nina.scholz
$ xattr -p user.mdaifs.department recruiting.md    # hr
$ xattr -p user.mdaifs.freshness recruiting.md     # 0.87

Structured metadata

Frontmatter schema
---
title: Recruiting Process          # required, string
owner: nina.scholz                 # required, firstname.lastname
type: process                      # required, enum
status: active                     # required, enum
created: 2024-08-10                # required, YYYY-MM-DD
department: hr                     # optional, enum
last-reviewed: 2026-03-25         # optional, used for freshness
tags: [recruiting, hiring]         # optional, array of strings
created-by: claude-code            # optional, marks AI-generated content
---

Valid enums

FieldValid values
typeprocess, template, policy, decision, minutes, result, concept
statusdraft, review, active, archived
departmenthr, finance, product, marketing, engineering, company

Five interfaces, one core

$
CLI
11 commands with Rich output
Py
Python API
from mdaifs import MdaifsRepo
AI
MCP Server
7 tools for AI agents
{}
REST API
FastAPI + Swagger
fs
FUSE Mount
Virtual .mdaifs/ dir
All interfaces delegate to MdaifsRepo in core.py — the single unified API. It lazy-loads on first access, so startup is instant.

From Python to Rust binary

Phase 1 — Python MVP Complete

Core, CLI (11 commands), MCP (7 tools), REST, FUSE, search, graph.

Phase 2 — Hardening Planned

Persistent index, incremental updates, plugins, PyPI.

Phase 3 — Rust Core Planned

Parser, index, graph, FUSE, CLI — single ~5MB binary.

Phase 4 — Distribution Planned

Homebrew, APT, Docker, WASM, editor plugins.

Phase 5 — Advanced Vision

CRDT collaboration, multi-modal, federated graphs.

Full Roadmap

Part of mdaios

mdaifs is the filesystem layer of the mdaios project — a framework for structuring enterprise knowledge in Markdown so that every AI agent can work with it.


Academic papers

P1

mdaios: Markdown-native Intelligent Filesystem for Human-AI Collaboration

The conceptual paper. 4-layer model, RAG on Markdown, automatic knowledge graph construction from frontmatter, freshness scoring, progressive disclosure for agents.

P2

mdaifs: From Concept to Real System

The technical architecture paper. 5 implementation paths: FUSE virtual filesystem, system library (libmdaifs), MCP server, CLI, and REST API. Rust crate structure, migration strategy.

Read Paper 1 (English) Read Paper 2 (English)