A local-first, verification-first context engine for AI workflows
Project description
MemStrata
A local-first, verification-first context engine for AI workflows.
MemStrata sits between you and every AI tool you use. It captures conversations from the browser, indexes your codebase locally, and serves a context block to whichever LLM you're talking to next. Your code stays on your machine. Your conversation history stays on your machine. No telemetry leaves the box.
This repository is the open-source core: the local daemon, the chat-capture browser extension, the MCP server, and the dashboard. It is MIT-licensed and fully usable on its own.
The commercial Pro tier (token-budgeted context injection through a proxy harness, money-back-guaranteed savings, IDE integration) lives in a separate, private repository and consumes this package as a PyPI dependency. See memstrata.dev if you want the paid product.
What's in this repo
| Path | What it does |
|---|---|
memstrata/layer3/api_server.py |
The local daemon's FastAPI app — telemetry, dashboard, MCP routing |
memstrata/layer3/ingestion/ |
File watcher, tree-sitter chunker, opt-in lifecycle, denylists |
memstrata/layer3/mcp_server.py, mcp_app.py |
MCP server (Anthropic-spec) for Claude Desktop / Cursor / etc. |
memstrata/layer3/_db.py |
SQLite schema with sqlite-vec for local vector search |
memstrata/layer3/retrieval.py |
Token-budgeted context retrieval against the local store |
memstrata/layer3/pricing/ |
Live OpenRouter price sync + bundled static fallback for offline use |
memstrata/layer3/ollama_health.py |
Shared Ollama reachability probe (used by the dashboard) |
memstrata/workers/embedding_worker.py |
Background worker that embeds new turns into the vector store |
memstrata/cli/ |
The memstrata CLI: register, ingest, the cd-hook generator |
memstrata/config/keychain.py |
OS keyring wrapper for storing per-provider API keys |
browser-extension/ |
Chrome / Edge / Firefox extension that captures chat turns from every major LLM front-end |
migrations/ |
SQL migrations |
shared/telemetry_schema.json |
The JSON schema for telemetry events (public contract) |
Quickstart
pip install memstrata
memstrata init # one-time interactive setup
memstrata api # start the daemon on 127.0.0.1:8000
The daemon binds to 127.0.0.1:8000. Open http://127.0.0.1:8000/dashboard
to see what's captured.
Install the browser extension from your browser's add-on store (see the browser-extension/ directory for build instructions if you want to load it unpacked).
Architecture commitments
These aren't aspirational — they're enforced in the code and tested for in CI:
-
Localhost-only binding. Every HTTP server in this repo hard-codes
host="127.0.0.1". No0.0.0.0, no LAN exposure, no remote access. -
No TLS interception. The MCP server and the dashboard speak plain HTTP on loopback. The browser extension talks directly to provider APIs and to this daemon's loopback endpoint. There is no MITM proxy in the open-source stack.
-
Local storage only. All telemetry, all chat history, all vectors, all API keys live in
~/.memstrata/(or$ML_DATA_DIRif set). Nothing is uploaded to a MemStrata-owned cloud service. There is no such service. -
Telemetry never includes user content. The dashboard and the MCP server expose your data back to you. Nothing is sent off-machine.
-
The Pro tier is structurally separate. Pro code lives in a different repository under a different license. This repo has zero
importstatements that touch Pro code.
Provider pricing (for the dashboard's savings calculator)
The dashboard's session-level savings columns compute against a price
table. By default the daemon syncs the table once per day from
OpenRouter. When the network is
down or OpenRouter is unreachable, the bundled
memstrata/layer3/pricing/pricing_matrix.json provides a static
fallback. The fallback covers the most common Claude, OpenAI, Gemini,
DeepSeek, xAI, and Mistral models. Prices in the fallback are
USD-per-million-tokens, last verified mid-2026.
Contributing
See CONTRIBUTING.md. The short version: open issues
first for non-trivial changes, run pytest before submitting, and keep
the architectural commitments above intact.
Security
See SECURITY.md. Vulnerability reports go to
security@memstrata.dev, not GitHub issues.
License
MIT. See LICENSE for the full text.
Related
- Commercial Pro tier: memstrata.dev — the token-budgeting interception harness, the money-back guarantee, and the IDE extension. Proprietary, paid, separate codebase.
- Browser extension store listings: shipped from the same source tree in this repo; see browser-extension/README.md for build + sideload instructions.
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 memstrata-0.6.0.tar.gz.
File metadata
- Download URL: memstrata-0.6.0.tar.gz
- Upload date:
- Size: 139.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342e6741c2f2cbcaef88d75d415e61c5a4489048e784ee0a3fbec8a279f9e49a
|
|
| MD5 |
757f83f6a00e1f849433d62aae26ddde
|
|
| BLAKE2b-256 |
46eab57165f3f059a20ad7c07043fbee59521198cb64ca64e3a06c2aee5e9461
|
Provenance
The following attestation bundles were made for memstrata-0.6.0.tar.gz:
Publisher:
publish.yml on yadu9989/memstrata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memstrata-0.6.0.tar.gz -
Subject digest:
342e6741c2f2cbcaef88d75d415e61c5a4489048e784ee0a3fbec8a279f9e49a - Sigstore transparency entry: 1811721075
- Sigstore integration time:
-
Permalink:
yadu9989/memstrata@47a13d205e463dd8bedb8effd639177ac8daebbb -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/yadu9989
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47a13d205e463dd8bedb8effd639177ac8daebbb -
Trigger Event:
push
-
Statement type:
File details
Details for the file memstrata-0.6.0-py3-none-any.whl.
File metadata
- Download URL: memstrata-0.6.0-py3-none-any.whl
- Upload date:
- Size: 109.4 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 |
c34ebbd6b7bebb761ea73f2459a692a928577c91775441675359b3b1a4d31064
|
|
| MD5 |
22c821d9e253e3b2d575ee03ed4fb882
|
|
| BLAKE2b-256 |
05f4cfafc1fcbdb686d70def6174dbce146420e5e7053cca549cc125c62a3dd4
|
Provenance
The following attestation bundles were made for memstrata-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on yadu9989/memstrata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
memstrata-0.6.0-py3-none-any.whl -
Subject digest:
c34ebbd6b7bebb761ea73f2459a692a928577c91775441675359b3b1a4d31064 - Sigstore transparency entry: 1811721181
- Sigstore integration time:
-
Permalink:
yadu9989/memstrata@47a13d205e463dd8bedb8effd639177ac8daebbb -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/yadu9989
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47a13d205e463dd8bedb8effd639177ac8daebbb -
Trigger Event:
push
-
Statement type: