Nextru
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Nextru
A personal knowledge base for AI agents, served over MCP.
Nextru keeps what you know: documents, course or project registers, notes and files of any type. Every piece keeps where it came from, which version it is and how it relates to the rest. Agents such as ChatGPT, Claude or a local model then search and read it, and, if you allow it, write back, with every change undoable.
Sources, not summaries. Every paragraph has a stable anchor (
h2.3-a1b2c3d4) and points to the exact source revision. Answers can cite what a document said at that revision.Files of any type. Originals are stored as is, under their SHA-256, written once. PDF pages and text files become searchable page by page. A PDF page or an image can be handed to a vision model with
nexus_file_view.Relations. Documents, files, people, courses and topics are objects, and typed relations connect them. Relations an agent adds stay
UNVERIFIED, with cited evidence, until you accept them.Undoable writes. Native documents keep every revision. Agents edit by compare-and-swap on the revision they read; restore and archive undo any change.
Small core. SQLite plus the Python standard library. MCP, PDF/image handling, Sheets import and embeddings are optional extras.
Status: early (0.1). It runs one person's daily knowledge base, but the interfaces may still change. See What is verified.
Quick start
Python 3.11+ with SQLite 3.34+ (for the FTS5 trigram tokenizer; check with python -c "import sqlite3; print(sqlite3.sqlite_version)"). Tested on SQLite 3.37 and 3.5x.
git clone https://github.com/<owner>/nextru && cd nextru
python -m venv .venv
. .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[all]" # MCP server + PDF/image files + Sheets importStore a file and search it:
python -m nexus.files --db data/kb.sqlite --scope personal:me put notes.pdf
python -m nexus.files --db data/kb.sqlite --scope personal:me render file/<id> --page 2 --out p2.pngConnect an MCP client over stdio (Claude Desktop, Codex, Cursor and others). Example client config:
{
"mcpServers": {
"nextru": {
"command": "/path/to/nextru/.venv/bin/python",
"args": ["-m", "nexus.mcp_server", "--db", "/path/to/data/kb.sqlite",
"--scope", "personal:me", "--agent-name", "claude"]
}
}
}Leave out --agent-name for a read-only server. Everything is in one scope, which is fixed when
the server starts: agents don't choose it.
A synthetic demo database (no personal data) for trying the read tools:
python scripts/build_db.py --db var/demo.sqlite
python -m nexus.mcp_server --db var/demo.sqlite --scope project:DLC-01Related MCP server: loci
MCP tools
Read (always available):
Tool | What it does |
| Full-text search (SQLite FTS5 trigram, CJK-aware; optional embedding channel) over documents, file pages, registers and objects |
| Read a document or file text by anchor, paged, at a given revision |
| Everything related to an object, strongest first |
| Turn a name, code or link into an object id |
| Source, revision and anchor behind any item |
| One-call context for a course topic (register, receipts, state) |
| What a stored file is: type, size, pages, SHA-256, sources, relations |
| A PDF page or an image, returned as an image the model can look at |
Write (only with --agent-name <name>; the writer is recorded as agent:<name>):
Tool | What it does |
| Native documents; every edit is a new revision |
| Undo an edit or a create |
| A person, place, course, topic, ... (needs evidence) |
| Typed relations; an agent's relation is |
| Store a file attached in a chat (ChatGPT |
| Store a small file sent as base64 |
| Rows and fields of a course register |
Getting data in
Source | Command |
Any file (PDF, image, text, anything) |
|
A Drive file (read-only) |
|
A Google Doc (read-only) |
|
A Google Sheet register |
|
An Obsidian vault (two-way) |
|
A chat attachment |
|
Drive access is read-only. --token-dir holds your own OAuth client_secret.json and token.json;
both are git-ignored and never leave your machine.
How data is kept
One SQLite file (
--db) holds objects, sources, sections, revisions, relations and the search index. Revisions, sealed sources and file rows are append-only, enforced by triggers.File originals live next to it in
<db>.files/<sha[:2]>/<sha>, read-only, verified withpython -m nexus.files ... verify.Archive (optional,
--archive <dir>): the exact bytes of every ingested source revision, write-once, with a manifest (python -m nexus.archive verify).Backup:
python -m nexus.native --db ... backup <file>makes an online, integrity-checked copy.deploy/backup/nexus-backupis a daily job that also mirrors the file originals;deploy/backup/restore-drill.pyrestores a backup into a scratch folder and checks it.
Running on a server
The HTTP transport (--transport http) binds to loopback only and refuses any other address.
There is no authentication in the server itself. Expose it only through something that
authenticates: an SSH tunnel, an OAuth proxy, Tailscale, or a provider tunnel such as OpenAI's
Secure MCP Tunnel. deploy/ has hardened systemd units (dedicated user,
ProtectSystem=strict, minimal writable paths). See SECURITY.md.
What is verified
Verified, with tests or recorded runs:
368 automated tests (unittest;
python scripts/run_tests.py), passing on Windows (Python 3.14) and Linux (Python 3.12), including a fresh-virtualenv install from PyPI.Files: PDF pages searchable by page, page and image rendering, write-once storage, hash verification and tamper detection, one file with many sources.
In daily use on a small VPS behind the loopback-only HTTP transport, with ChatGPT, Claude and Grok as clients.
Not verified yet:
How every MCP client handles
nexus_file_putattachments andnexus_file_viewimages (it differs between clients; ChatGPT has not been tested end to end).Link suggestions for very short titles (course topic labels) are weak: the right candidate ranks first but often stays below the display threshold.
Images have no searchable text beyond their name.
Concurrency beyond a few clients on one SQLite file.
Layout
src/nexus/ core (db, core, search, native docs, files, relations, MCP server, ingest)
tests/ unittest suite (synthetic data only)
deploy/ systemd units and backup / restore scripts
integrations/ Claude Code hook, a minimal API agent, an agent skill
experiments/ the MCP file-transfer probe used to design nexus.files
docs/ agent surface, context modes, archive, research evidenceLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared knowledge for teams and AI agents: search, brief, and record decisions with provenance.
A home for your agents: an owned book of record any AI agent can write to, with provenance and undo.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI agents to securely read, search, and write to a local Markdown knowledge base with hybrid RAG retrieval, privacy zones, hash-locked writes, audit logging, and rollback-safe archiving.13MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search and question a personal knowledge base of notes and documents through hybrid vector and BM25 retrieval, with section-level citations. It also lets agents store, retract, and explore durable memories, links, and indexing statistics across tools.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents and their human owners to browse, search (keyword, semantic, and hybrid), create, and revise a versioned personal knowledge base of Markdown documents, checkpoint summaries, and structured tasks. Access is OAuth-protected with separately grantable read and write scopes, and edits are history-tracked with conflict protection so concurrent clients don't overwrite each other.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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