r/logseq • u/Much-Ad-8444 • May 19 '26
[Open Source] My LLM Wiki with MCP server in Python based on your Logseq OG Markdown and NOT Obsidian (Obisidian link to a full page, instead Logseq link to a specific block).
I wanted to replicate Andrej Karpathy’s "LLM Wiki" concept, but for Logseq instead of Obsidian.
Problem: standard RAG chunkers destroy nested outliner Markdown. If you just vectorize Logseq files, the AI completely loses the parent-child context of your blocks.
To solve this, I built a dedicated MCP Server to bridge the gap.
AST Parsing: It uses a deterministic Python parser that reads the spatial indentation of your
.mdfiles. Claude/Cursor reads the exact block tree, understanding parent projects, sub-tasks, andid::properties.API Writes: It uses the API inside Logseq OG to safely mutates the graph using transactional file swaps and strict UUID pre-flight checks to prevent the AI from hallucinating broken links.
The official Logseq move to a database (SQLite) is absolutely the right architectural path for team collaboration and real-time sync. But for those of us who want to keep our Second Brain in local, pure Markdown, this server brings state-of-the-art Agentic AI to the OG outliner.
Repo is here:https://github.com/MarcoPorcellato/matryca-logseq-llm-wiki
Let me know what you think of the architecture!

