memoire-mcp
MCP stdio server for Memoire. Python package: memoire_mcp. Console script:
memoire-mcp (also python -m memoire_mcp).
Run from a source checkout
Requires a Rust toolchain: the Python SDK (bindings/python, import name
memoire_engine) is a PyO3 extension built with maturin.
cd mcp-server
uv sync --locked --extra dev # builds the native extension via maturin
uv run memoire-mcp
Manual virtualenv install (package smoke tests):
python -m pip install ./bindings/python # builds the PyO3 extension
python -m pip install "mcp[cli]==1.27.1"
python -m pip install --no-deps ./mcp-server
memoire-mcp
Use --no-deps for the last step until the SDK's PyPI name is final: the
provisional name memoire-engine is not registered, and the unrelated PyPI
project memoire must never be installed in its place.
MEMOIRE_LIB and cargo build --release are not used by the Python package.
If the server reports native_library_unavailable, run maturin develop --release
inside bindings/python in the same virtualenv that runs the server.
First use downloads the embedding model (about 23 MB, from Hugging Face) unless it is already cached.
MCP client configuration
Nothing is published to PyPI yet, so every command below points at the console script of a
virtualenv you built from a source checkout (see above). Replace the /ABSOLUTE/PATH/...
placeholders; on Windows use ...\.venv\Scripts\memoire-mcp.exe and a path such as
C:\Users\you\.memoire\memoire.db.
Set FASTEMBED_CACHE_DIR to one shared directory in every client. Without it (and without
HF_HOME), the embedding model (about 23 MB) is downloaded into ./.fastembed_cache relative to
the server's working directory, i.e. once per project. The first tool call that needs the
embedder downloads the model and can exceed a client's tool timeout; make one throwaway tool
call right after setup to warm the cache before relying on it.
Claude Code
Options must come before the server name, and -- separates them from the command. Keep
--transport stdio between --env and the name: if the name directly follows --env, the CLI
reads it as another KEY=VALUE pair.
claude mcp add --scope user \
--env MEMOIRE_DB_PATH=/ABSOLUTE/PATH/TO/memoire.db \
--env FASTEMBED_CACHE_DIR=/ABSOLUTE/PATH/TO/.fastembed_cache \
--transport stdio memoire \
-- /ABSOLUTE/PATH/TO/.venv/bin/memoire-mcp
--scope user makes the server available in every project and keeps its configuration out of
the repository (--scope project would write .mcp.json into it). Check with
claude mcp list.
Cursor
Put this in ~/.cursor/mcp.json (all projects) or <project>/.cursor/mcp.json:
{
"mcpServers": {
"memoire": {
"command": "/ABSOLUTE/PATH/TO/.venv/bin/memoire-mcp",
"env": {
"MEMOIRE_DB_PATH": "/ABSOLUTE/PATH/TO/memoire.db",
"FASTEMBED_CACHE_DIR": "/ABSOLUTE/PATH/TO/.fastembed_cache"
}
}
}
}
Any other stdio client
{
"mcpServers": {
"memoire": {
"command": "/ABSOLUTE/PATH/TO/.venv/bin/memoire-mcp",
"env": {
"MEMOIRE_DB_PATH": "/ABSOLUTE/PATH/TO/memoire.db",
"FASTEMBED_CACHE_DIR": "/ABSOLUTE/PATH/TO/.fastembed_cache"
}
}
}
}
The old python /path/to/mcp-server/server.py invocation no longer exists. Once
memoire-mcp is published, running it through uvx should also work; that has not been tested
because nothing is published.
MEMOIRE_TRIAL_CAP
Optional (non-negative integer; an invalid value stops the server with exit code 2). A recall
returns at most this many unverified memories (ones with no recorded feedback); the default is
1. With a fresh database every memory is unverified, so by default a recall returns one
result. Raising it makes recalls return more results before any feedback exists. It changes how
many results are offered, not how good they are: the only pre-registered evaluation run so far
did not show an accuracy benefit for the default or for any other setting (the trial_cap=3
numbers in it are exploratory and not inferential; see "Evidence so far" in the repository
README). Choose a value for how many results you want to see, not for an expected accuracy gain.
Database location
Highest precedence first:
MEMOIRE_DB_PATH, thenMEMOIRE_DB: explicit operator configuration, used as given.<workspace>/.memoire_path: must resolve to a location inside the workspace (symlinks are followed). A target outside it is rejected with an error, because the file lives in the repository, which may be untrusted. To use a database elsewhere, setMEMOIRE_DB_PATH.<workspace>/memoire.db.
MCP's initialize handshake carries no workspace folder, so <workspace> is the
server process's working directory unless the client sends non-standard
workspaceFolders/rootUri fields. Set MEMOIRE_DB_PATH explicitly if your client
does not start the server in the project directory.
Admin tools (off by default)
memoire_clear and memoire_import are not listed unless the server is started
with MEMOIRE_ENABLE_ADMIN_TOOLS=1 (also true, yes, on). An agent, or text that
steers it, should not be able to wipe or bulk-load memory by default. The flag is read
at startup (restart to change it) and re-checked on every call.
memoire_import always treats the snapshot as untrusted: only each memory's content
is used, and trust metadata (trust_ema, reinforcement_count, importance_base,
confidence, created_at) is ignored, so an imported memory is no more trusted than a
freshly remembered one. At most 1000 memories per call. memoire_forget is not gated.
Tool notes
memoire_recallandmemoire_recall_explainedreturn live memories only unlessinclude_shadow=true, which is passed to the engine asinclude_hidden(hidden rows included, trial cap skipped). Each memory has anexposurelabel.MEMOIRE_TRIAL_CAPoverrides the engine'strial_cap(default1: with no feedback a recall returns at most one result). Non-integer or negative values stop the server.- Feedback tools send one session id per server process (
memoire_statusshows it). memoire_identify_gapsmin_trustdefaults to the engine HINT threshold (0.40).memoire_exportreturns{"ok": true, "error": null, "snapshot": {...}}; pass thesnapshotvalue tomemoire_import.
See docs/RELEASE.md in the repository root for the release workflow.
Metadata
Release files for memoire-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| memoire_mcp-0.1.0.tar.gz | 22.7 kB | Without provenance | Details for memoire_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memoire_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for memoire_mcp-0.1.0-py3-none-any.whl |
Total release size: 37.6 kB
Release files / memoire_mcp-0.1.0.tar.gz
| Download URL | memoire_mcp-0.1.0.tar.gz |
|---|---|
| Size | 22.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96dbf93f774e882a6fe27c957c7d992430fa0fc4a839640e370d84c02ca1d399
|
|
BLAKE2b-256 checksum How to use checksums |
17e31aa1fb889febdb8c19798576aed9ae1ac5aab9d9e45caab3919533e041d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / memoire_mcp-0.1.0-py3-none-any.whl
| Download URL | memoire_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4bfd292968a62d01e592810568ed14efdd3312faf64ca70fe9b60397a5e396a
|
|
BLAKE2b-256 checksum How to use checksums |
7fc284c44fb2dcbc7d867e256fa5ddeea0d1139087df12e98780ad84f054b973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Security for memoire-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.