A personal memory server: aspect-tagged raw sources, concept-graph retrieval, and an MCP surface for Claude Code.
Project description
loci
A personal memory server. You save what you read; loci tags each source with aspects (methodology, knowledge-graph, …), wires up concept edges (citations, wikilinks, co-aspect), and serves the result to Claude Code over MCP so the model can recall the parts of your library that actually matter for what you're writing.
No interpretation graph, no draft pipeline, no PageRank. Just:
save → tag → recall
If you want a deeper read, start at docs/getting-started.md
and then docs/architecture.md.
Status
Single-user, local-first. SQLite is the source of truth; raw blobs are content-addressed on disk. Python 3.12+.
Install
# with uv (recommended — isolated environment)
uv tool install loci-wiki
# with pipx
pipx install loci-wiki
The first scan downloads the embedding model (BAAI/bge-small-en-v1.5,
~130 MB) into ~/.loci/models/.
Quick start
# 1. First-run setup: writes ~/.loci/.env (provider keys) and ~/.loci/config.toml
loci config init
# 2. Create a project
loci project create my-research
# 3. Register loci with Claude Code (one-time, user-scope)
claude mcp add loci --transport stdio --scope user -- loci mcp
# 4. Bind a directory to your project (so MCP knows which slug to use)
cd ~/Documents/my-research
loci project bind my-research
# 5. Save sources directly from Claude Code
# (or via CLI: `loci save https://arxiv.org/abs/1612.03975`)
# 6. Recall in Claude Code
# `@loci:source://...` for a single resource
# `loci_recall("how does PPR work")` for ranked chunks with reasons
All user data lives under ~/.loci/. Run loci doctor to see resolved paths.
CLI commands
loci config init # write ~/.loci/.env + config.toml
loci doctor # show storage paths + active project
loci server # HTTP API + worker on 127.0.0.1:7077
loci mcp # MCP stdio server (for Claude Code)
loci worker # background worker only
loci project create <slug> # interactive wizard
loci project list / info / bind / manage
loci current set <slug> # pin project for MCP sessions
loci workspace create / list / add-source / scan / link / unlink
loci scan <project> # scan all linked workspaces
loci use [workspace_slugs...] # bind workspaces for this session
loci save <url_or_path> [--folder] [--aspects]
loci recall "query" [--aspects ...] [-n 10]
loci aspects [resource_id] [--add ... --remove ... --list-vocab]
loci status [project]
loci export [project]
loci reset # wipe everything
MCP surface (Claude Code)
| tool | what it does |
|---|---|
loci_save |
ingest URL/file/text, propose folder + aspects via elicitation, write to DB |
loci_recall |
concept-expand + BM25/ANN over chunks with concept-graph rerank |
loci_aspects |
list/edit aspects on a resource (elicitation form for editing) |
loci_browse |
list resources with folder + top aspects, filterable |
loci_context |
project profile + counts + top aspects for the current session |
loci_research |
paper-search sub-agent (deferred to v1.1) |
@-mentionable resources:
@loci:source://{resource_id}
@loci:folder://{folder_path}
@loci:aspect://{label}
Source layout
src/loci/
ui/cli.py entry point: loci.ui.cli:main
api/ FastAPI REST + WebSocket
routes/ projects, workspaces, sources, aspects, jobs
mcp/ MCP server + project resolution
graph/ sources, aspects, concept_edges, projects, workspaces
retrieve/ lex + vec + hyde + concept_expand + pipeline
capture/ ingest, folder_suggest, aspect_suggest, link_parser
ingest/ walk → hash → extract → chunk → embed
jobs/ queue + worker + handlers (classify_aspects, parse_links, …)
embed/ sentence-transformers wrapper
llm/ pydantic-ai wrapper
db/ schema.sql + connection.py
config.py Settings + ~/.loci/ paths
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loci_wiki-0.1.1.tar.gz.
File metadata
- Download URL: loci_wiki-0.1.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fedfef4c2165da8c066389a421e15435f759ed5782a9122f459599451abba06a
|
|
| MD5 |
c84a965a84eff22632f5e652002eba5f
|
|
| BLAKE2b-256 |
3b4ef2ca9444c6a11ed8d744b851185b2cbf86d0d17d7cafcba3e42a80906c98
|
File details
Details for the file loci_wiki-0.1.1-py3-none-any.whl.
File metadata
- Download URL: loci_wiki-0.1.1-py3-none-any.whl
- Upload date:
- Size: 133.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19db1ce5fde52233c609a8b263a88e81bf91f82a1c238bf1d1eb363a823e262d
|
|
| MD5 |
6d03e7985d0611d704602b7f5bdd0d7b
|
|
| BLAKE2b-256 |
5ac1f2e7b52c96e8ab59d5a26c72d01c2c6307e6e4894067963f3bb8e1c6c24d
|