MCP memory server with error-correcting attractor dynamics. Claude forgets everything — Slate fixes that.
Project description
Slate Memory
Claude forgets everything between sessions. Slate fixes that.
An MCP memory server and Python library with error-correcting attractor dynamics. Ask a sloppy question with typos and missing words — Slate still finds the right answer.
The numbers
| Feature | Basic vector memory | Slate |
|---|---|---|
| Typo in your query | Accuracy drops 17% | Drops 2% |
| Half the words missing | Loses 42% of memories | Loses 28% |
| Speed (30K memories) | ~160ms | ~39ms |
| Storage per memory | 1.5KB (float32) | 48 bytes (packed binary) |
Numbers from head-to-head benchmarks on the same 30K-memory dataset. Patent pending (#64/109,622).
| Setup | Accuracy | Cost per 1k queries | Latency |
|---|---|---|---|
| haiku + slate | 100% | $0.10 | 0.6s |
| opus + full context | 100% | $64.04 | 1.7s |
| opus bare | 0% | $0.19 | 1.2s |
| haiku bare | 0% | $0.04 | 0.7s |
A cheap model with Slate ties the most expensive model with the entire corpus in context — at 1/640th the cost. Full methodology in slate-bench.
Use as MCP server (Claude Desktop / Claude Code)
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"slate-memory": {
"command": "python",
"args": ["/path/to/slate-memory/run_mcp.py"]
}
}
}
Claude Code
claude mcp add slate-memory python /path/to/slate-memory/run_mcp.py
MCP Tools
slate_recall— Ask a question, get the matching memory. Works even with typos, partial queries, or vague phrasing.slate_commit— Store a new memory. Automatic deduplication.slate_status— Check how many memories are stored and system health.
MCP Requirements
pip install slate-memory[mcp]
Use as Python library
pip install slate-memory
from slate_memory import SlateBank
bank = SlateBank(dim=384)
# Commit facts one-shot
bank.commit(embed("The capital of France is Paris"), {"text": "Paris is the capital"})
# Recall — even from a noisy or partial query
winner, ranked, confidence, cycles = bank.recall(embed("whats the captial of farnce"))
print(winner["text"]) # "Paris is the capital"
With sentence-transformers
from slate_memory import SlateBank
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("all-MiniLM-L6-v2")
bank = SlateBank(dim=384)
texts = ["The Earth orbits the Sun", "Water boils at 100C", "Light travels at 299,792 km/s"]
for text in texts:
bank.commit(model.encode(text), {"text": text})
winner, ranked, confidence, cycles = bank.recall(model.encode("what temperature does water boil"))
print(winner["text"]) # "Water boils at 100C"
Persistence
bank.save("./my_memory")
bank2 = SlateBank(dim=384)
bank2.load("./my_memory")
Two files: patterns.npy + meta.json. No server. No database. Copy them anywhere.
How it works
Slate is a modern Hopfield network (Ramsauer et al. 2020) — the same math as transformer attention, but used as a memory instead of a layer. Embeddings are sign-projected onto 10,000 bipolar cells and stored one-shot. On recall, the query settles into the nearest stored attractor via softmax-weighted feedback. Two cycles. No training. No index. No database.
The attractor dynamics error-correct: noisy, partial, or corrupted queries converge to the exact stored pattern. Verified at 20,000 stored patterns with 25% corruption.
Trust signals
Each recall returns quality signals so you know how confident the answer is:
winner, ranked, conf, cycles, sig = bank.recall(query, with_signals=True)
if sig["margin"] < 0.02:
# thin margin — treat as "don't know"
pass
- margin — gap between the best and second-best match. The calibrated retrieval-quality signal (AUC 0.88). Wide margin = confident memory. Thin margin = guess.
- familiarity — how well the query matches anything stored. Low = topic was never stored (AUC 1.00 for out-of-domain).
API
SlateBank(dim, n_cells=10000, beta=60.0, distinctiveness=True, dedup_threshold=0.95, seed=7)
- dim: Embedding dimensionality (must match your embedder)
- n_cells: Bipolar cells. 10,000 verified for up to 20K patterns
- beta: Winner-take-all sharpness. 60.0 is benchmarked
- dedup_threshold: Refuse commits with overlap above this. 0.95 prevents near-duplicates
bank.commit(embedding, meta) -> (bool, str)
One-shot storage. Returns (True, "committed") or (False, "duplicate (...)").
bank.recall(embedding, top_k=3, max_cycles=5, with_scores=False, with_signals=False)
Full attractor settle. Returns (winner, ranked, confidence, cycles[, signals]).
bank.remove(predicate) -> int
Remove patterns matching predicate(meta). For re-ingestion when source data changed.
bank.save(path) / bank.load(path)
Persist to / restore from a directory.
Benchmarks
Full retrieval benchmarks across 5 corruption conditions and 4 capacity levels in slate-bench.
License
Apache 2.0. Patent pending.
Project details
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 slate_memory-1.0.0.tar.gz.
File metadata
- Download URL: slate_memory-1.0.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8fef604c155ae916f86023e692f70bd0e7bcb5ec3ca300a9bc75ecde6b12eab
|
|
| MD5 |
4f85aecfca9b5b915a684512890658d8
|
|
| BLAKE2b-256 |
1dd0d9db7bfcc79f4da20f576802c89d0e106779d5465a01d1b5f0135d1a9510
|
File details
Details for the file slate_memory-1.0.0-py3-none-any.whl.
File metadata
- Download URL: slate_memory-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b402fe3cb40d47d41614d853f7dd3fa5e3ed8c85146956b8eadfc633d77f85b3
|
|
| MD5 |
bd8b2ca4d46e03d6cbc92e8df650cb58
|
|
| BLAKE2b-256 |
43cfa7caa22c8b030bbfbdbdea2d24ab16625cb9f661494e4bfc5311552c9f39
|