Cross-machine, file-first memory layer for Claude Code (MCP server)
Project description
anamnesis (server)
The Anamnesis MCP memory server for Claude Code. Python + FastMCP.
Markdown files are the source of truth; a local SQLite (WAL + FTS5) index is derived from them and
can always be rebuilt. Memory syncs across your own machines as a git repo over a private Tailscale
mesh; the index is never synced (it is rebuilt locally). See the (local-only) docs/architecture.md
and docs/roadmap.md for the full design.
MCP tools
| Tool | Signature | Approval |
|---|---|---|
memory_search |
(query, project?, type?, k=8) -> ranked notes |
read-only |
memory_list |
(project?, type?) -> titles + metadata |
read-only |
memory_status |
() -> counts, store paths, git sync state |
read-only |
memory_write |
(type, title, body, project="global", tags?) |
write - confirm |
memory_sync |
(force=False) -> commit, pull --rebase, push |
write - confirm |
Read-only query tools carry the readOnlyHint annotation so a client can auto-approve them; writes
are flagged for confirmation. type is one of procedural / semantic / episodic. memory_sync
rebuilds the local index after pulling, so notes from other machines are immediately searchable.
Configuration (environment)
| Variable | Default | Purpose |
|---|---|---|
ANAMNESIS_HOME |
~/.anamnesis |
Store root (memory/ markdown + index.db). |
ANAMNESIS_MACHINE_ID |
the hostname | Machine-of-origin stamped on notes you write. |
ANAMNESIS_GIT_REMOTE |
(unset) | Git remote for sync; unset = local commits only. |
Run it
# from server/
uv venv --python 3.12
uv pip install -e ".[mcp,dev]"
anamnesis # serves over stdio (Ctrl-C to stop)
Register with Claude Code
The repo ships a project-scoped .mcp.json that launches the server:
{
"mcpServers": {
"anamnesis": { "command": "uv", "args": ["run", "--project", "server", "anamnesis"] }
}
}
Set ANAMNESIS_HOME / ANAMNESIS_MACHINE_ID / ANAMNESIS_GIT_REMOTE in that server's "env"
block. Claude Code launches MCP servers with a filtered environment, so shell exports are not
inherited - the "env" block is the place to set them. Keep your real ANAMNESIS_GIT_REMOTE out of
the public repo (use a local or user-scoped MCP config).
Cross-machine sync (git over Tailscale)
Memory is a git repo (~/.anamnesis/memory/) pushed and pulled over your
Tailscale mesh. Point every machine at one shared bare repo (on an
always-on node, or peer-to-peer):
# once, on the node that hosts the shared repo:
git init --bare -b main ~/anamnesis-memory.git
# on each machine (Tailscale MagicDNS resolves the node name on your tailnet):
export ANAMNESIS_GIT_REMOTE='you@host.your-tailnet.ts.net:anamnesis-memory.git'
Then memory_sync (commit -> pull --rebase -> push) keeps every machine in step. The SQLite index
is never pushed; it is rebuilt locally after each pull. On a same-note conflict, v0 surfaces it and
keeps your local edits rather than dropping either side.
Development
# from server/
uv run ruff check src tests && uv run ruff format --check src tests
uv run mypy src
uv run pytest
Machine-local note: if this host sources ROS 2 (it puts
launch_testingonPYTHONPATH), run tests isolated from it:PYTHONPATH= PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run pytest.
Storage layout (runtime)
Memory lives in ~/.anamnesis/ (never in this repo):
~/.anamnesis/
├── memory/ # markdown notes - the source of truth (a git repo, synced)
│ └── <type>/<id>.md
└── index.db # SQLite FTS5 index - rebuilt locally, never synced
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 anamnesis_memory-0.0.2.tar.gz.
File metadata
- Download URL: anamnesis_memory-0.0.2.tar.gz
- Upload date:
- Size: 127.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d931aec76759e92309227b4e15e6df74fc33ad7478e3b36912d0c83920ca61c4
|
|
| MD5 |
2a422b551f2bd6c4764120e263b82e93
|
|
| BLAKE2b-256 |
a0f2664ea668ee4b8f0b72eca0016a53688950f51888072b4c1ae3956594f47a
|
Provenance
The following attestation bundles were made for anamnesis_memory-0.0.2.tar.gz:
Publisher:
publish.yml on oscardvs/anamnesis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anamnesis_memory-0.0.2.tar.gz -
Subject digest:
d931aec76759e92309227b4e15e6df74fc33ad7478e3b36912d0c83920ca61c4 - Sigstore transparency entry: 1901177309
- Sigstore integration time:
-
Permalink:
oscardvs/anamnesis@6744135d4c4c157eb57eec2f077d5f9720a658ed -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/oscardvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6744135d4c4c157eb57eec2f077d5f9720a658ed -
Trigger Event:
release
-
Statement type:
File details
Details for the file anamnesis_memory-0.0.2-py3-none-any.whl.
File metadata
- Download URL: anamnesis_memory-0.0.2-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63155ff3f5de17f0a6affae6983a300e95abc4e5da6dd18cf511bd94d4ad60f5
|
|
| MD5 |
a4e3ec79671a504f4f252291d3ca7f56
|
|
| BLAKE2b-256 |
a41fd897402262d74fce6ba302b290e820c7580a08ead205c332f50ee31ebb2d
|
Provenance
The following attestation bundles were made for anamnesis_memory-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on oscardvs/anamnesis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anamnesis_memory-0.0.2-py3-none-any.whl -
Subject digest:
63155ff3f5de17f0a6affae6983a300e95abc4e5da6dd18cf511bd94d4ad60f5 - Sigstore transparency entry: 1901177522
- Sigstore integration time:
-
Permalink:
oscardvs/anamnesis@6744135d4c4c157eb57eec2f077d5f9720a658ed -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/oscardvs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6744135d4c4c157eb57eec2f077d5f9720a658ed -
Trigger Event:
release
-
Statement type: