Skip to main content
Glama
mcp-basic-memory

mcp-basic-memory

by kucharskill
README.md
# mcp-basic-memory

This stdio proxy starts [Basic Memory](https://github.com/basicmachines-co/basic-memory) on demand with `uvx basic-memory@latest mcp`. It requires Node.js 22+ and `uvx` on `PATH`.

```sh
npx -y --prefer-online mcp-basic-memory@latest
npx -y --prefer-online mcp-basic-memory@latest --version
```

A Codex `config.toml` entry:

```toml
[mcp_servers.basic_memory]
command = "npx"
args = ["-y", "--prefer-online", "mcp-basic-memory@latest"]
startup_timeout_sec = 180
```

The proxy forwards Basic Memory's MCP messages. It keeps the client connection open when the upstream exits and repeats the MCP handshake on the next request. The latest request selects the idle timeout: one minute for initialization and tool discovery, or thirty minutes for other requests. Outstanding requests keep the upstream running.

At shutdown, the proxy closes upstream stdin and gives Basic Memory up to one minute to finish cleanup. If the launcher remains running, the proxy terminates its process tree. The same shutdown applies when the client disconnects.

Basic Memory owns project paths, configuration, indexes, model selection and credentials. Existing `BASIC_MEMORY_*` settings are inherited. The proxy supplies a default `FASTEMBED_CACHE_PATH` only when that variable is unset. Basic Memory's explicit `semantic_embedding_cache_dir` takes precedence. The fallback directory is `basic-memory/fastembed` under the platform's user cache (`%LOCALAPPDATA%` on Windows, `~/Library/Caches` on macOS, and `$XDG_CACHE_HOME` or `~/.cache` on Linux). `uv` manages its own environment cache.

Basic Memory watches files while its process is running. Downloads, remote embedding providers and cloud access follow the user's Basic Memory settings. The proxy adds no hosted service or per-request fee.

Run `npm run check` for automated checks or `npm run release:prepare` to verify and pack an npm archive. GitHub Releases publish through npm Trusted Publishing.