server-memory
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@server-memoryremember that Alice likes programming in Python"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
server-memory
server-memory is a local-first Model Context Protocol server for durable agent memory: entities, observations, relations, tags, activity, and fast recall backed by SQLite and FTS5.
It is intentionally boring where memory should be boring. Data stays in local databases unless you export it, the default MCP transport is stdio, and the optional shared HTTP daemon is bound to localhost by default.
What it does
Stores a small knowledge graph in SQLite with WAL mode and FTS5 search.
Exposes 20 MCP tools for graph writes, recall, timeline queries, import/export, tagging, backup, and statistics.
Provides compact
memory_contextoutput for token-budgeted agent context.Supports optional embedding-assisted retrieval through the
embeddingsextra.Keeps workspace memory and global preference memory separate by default.
Includes a localhost HTTP daemon plus stdio proxy for clients that need one shared process.
Uses platform-native per-user data and runtime directories through
platformdirs.
MCP client
|
| stdio: server-memory
v
FastMCP server
|
+-- workspace SQLite DB: entities, observations, relations, tags, activity
|
+-- optional global preferences DB
Optional shared mode:
MCP client -> stdio_proxy.py -> http://127.0.0.1:8765/mcp -> serve.pyRelated MCP server: recall-mcp
Requirements
Python 3.10 or newer
SQLite with FTS5 enabled
macOS, Ubuntu, or Windows for the GitHub Actions support matrix
The CI workflow is configured to test Python 3.10 through 3.14 on Ubuntu and Python 3.10 plus 3.14 on ubuntu-latest, windows-latest, and macos-latest.
Install
From this GitHub repository:
python -m pip install "server-memory @ git+https://github.com/MK-986123/server-memory.git"For local development from a checkout:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"Optional extras:
python -m pip install -e ".[embeddings]"
python -m pip install -e ".[desktop-proxy]"
python -m pip install -e ".[benchmark]"Quick start
Run the stdio MCP server:
server-memoryEquivalent module form:
python -m server_memoryUse a dedicated database for one project:
MEMORY_DB_PATH=<PROJECT_ROOT>/memory.db server-memoryRun the shared localhost daemon:
python serve.py --host 127.0.0.1 --port 8765 --transport streamable-httpConnect stdio-only clients to that daemon:
python stdio_proxy.py --url http://127.0.0.1:8765/mcpMCP client config
Stdio server:
{
"mcpServers": {
"server-memory": {
"command": "server-memory",
"env": {
"MEMORY_PROJECT": "<PROJECT_NAME>"
}
}
}
}Shared daemon proxy:
{
"mcpServers": {
"server-memory": {
"command": "python",
"args": ["<PROJECT_ROOT>/stdio_proxy.py", "--url", "http://127.0.0.1:8765/mcp"]
}
}
}Tools
server-memory registers tools only; it does not register MCP resources or prompts.
Tool | Purpose | Main inputs |
| Compact scoped recall for ordinary agent context |
|
| Larger bootstrap context with pinned and recent items |
|
| Add entities and optional initial observations |
|
| Add observations to existing entities |
|
| Connect existing entities |
|
| Read graph data, compressed by default |
|
| FTS5 search with filters |
|
| Open named entities and optional neighbors |
|
| Record a development or session event |
|
| Query activity history |
|
| List, create, delete, apply, remove, or clean tags |
|
| Merge one entity into another |
|
| Export graph as JSON or JSONL |
|
| Import JSON or JSONL graph data |
|
| Return counts and storage stats | none |
| Copy the active SQLite database |
|
| Show observation versions for an entity |
|
| Soft-delete or hard-delete entities |
|
| Delete selected observations |
|
| Delete selected relations |
|
Write tools modify the configured SQLite database. backup_memory writes a database backup. export_graph can print sensitive memory content, so review exports before sharing.
Configuration
Configuration is environment-driven.
Variable | Default | Meaning |
| Platform user data dir, workspace-namespaced when a project root is detected | Workspace SQLite database |
|
| Compression level, |
|
| Output token budget |
| unset | Import JSONL on startup |
| unset | Session ID for activity logging |
|
| Optional embedding model |
|
| Enable embedding search/backfill |
|
| Write-path embedding budget |
| empty | Default project scope |
|
| Semantic dedup threshold |
|
| Require bearer auth for the shared HTTP daemon |
| Platform runtime dir | Local HTTP daemon token file |
|
| Enable global preferences database |
| Platform user data dir | Global preferences SQLite database |
|
| Route preference-tagged writes to global memory |
| unset | Explicit workspace root for default DB placement |
| unset | Explicit workspace ID for default DB placement |
.env.example contains a safe template with empty override values.
Development
python -m pip install -e ".[dev]"
python -m compileall -q src tests scripts
python -m ruff check .
python -m pytest
python -m build
python -m twine check dist/*
python -m pip_audit
python scripts/smoke_stdio.py server-memoryThe smoke test sends an MCP initialize request to the installed stdio entry point and fails if stdout contains non-protocol text.
Security and privacy
Memory databases, exports, backups, and benchmark outputs can contain sensitive user data.
The stdio server writes protocol data to stdout; diagnostics should go to stderr or logs.
The shared HTTP daemon defaults to
127.0.0.1and local bearer-token auth.The bearer token is generated locally and stored under a platform-native runtime directory unless
MEMORY_AUTH_TOKEN_PATHis set.No external service credentials are required for the core server.
Optional embeddings may load local or cached model files depending on your environment and installed extras.
Report vulnerabilities through GitHub private vulnerability reporting when available. Do not include secrets or private memory exports in public issues.
CI and supply chain
GitHub Actions run syntax checks, Ruff, pytest, package build, wheel installation, MCP stdio smoke tests, pip-audit, CodeQL, and Dependency Review. Dependabot is configured for Python dependencies and GitHub Actions.
The workflow uses GitHub-hosted ubuntu-latest, windows-latest, and macos-latest labels. GitHub defines those as the latest stable runner images it provides, which can lag the newest vendor OS release during image migrations.
Troubleshooting
Symptom | Check |
| Use a Python build linked against SQLite with FTS5 enabled. |
MCP client hangs at startup | Run |
Multiple clients lock the database | Use |
Proxy returns auth failure | Restart the daemon and client so both read the same |
Unexpected memory location | Set |
License
No open-source license has been selected. Public visibility does not grant reuse rights by itself.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MK-986123/server-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server