server-memory
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MEMORY_DB_PATH | No | Workspace SQLite database path. Default: Platform user data dir, workspace-namespaced when a project root is detected. | |
| MEMORY_PROJECT | No | Default project scope | |
| MEMORY_SESSION_ID | No | Session ID for activity logging. Default: unset. | |
| MEMORY_IMPORT_JSONL | No | Import JSONL on startup. Default: unset. | |
| MEMORY_TOKEN_BUDGET | No | Output token budget | 2000 |
| MEMORY_WORKSPACE_ID | No | Explicit workspace ID for default DB placement. Default: unset. | |
| MEMORY_GLOBAL_DB_PATH | No | Global preferences SQLite database. Default: Platform user data dir. | |
| MEMORY_WORKSPACE_ROOT | No | Explicit workspace root for default DB placement. Default: unset. | |
| MEMORY_AUTH_TOKEN_PATH | No | Local HTTP daemon token file. Default: Platform runtime dir. | |
| MEMORY_DEDUP_THRESHOLD | No | Semantic dedup threshold | 0.92 |
| MEMORY_EMBEDDING_MODEL | No | Optional embedding model | all-MiniLM-L6-v2 |
| MEMORY_COMPRESSION_LEVEL | No | Compression level, 0 through 4 | 4 |
| MEMORY_EMBEDDING_ENABLED | No | Enable embedding search/backfill | true |
| MEMORY_GLOBAL_DB_ENABLED | No | Enable global preferences database | true |
| MEMORY_HTTP_AUTH_ENABLED | No | Require bearer auth for the shared HTTP daemon | true |
| MEMORY_WRITE_EMBEDDING_BUDGET_MS | No | Write-path embedding budget | 10000 |
| MEMORY_GLOBAL_PREFERENCE_ROUTING_ENABLED | No | Route preference-tagged writes to global memory | true |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_entitiesA | Create new entities in the knowledge graph. Each entity needs: name (str), entityType (str). Optional: observations (list[str]), tags (list[str]), metadata (dict). Skips duplicates by name. |
| create_relationsA | Create relations between entities. Each relation needs: from (str), to (str), relationType (str). Optional: weight (float), tags (list[str]). Both entities must exist. Use active voice for relationType. |
| add_observationsA | Add observations to existing entities. Each item needs: entityName (str), contents (list[str]). Optional: source (str), confidence (float 0-1), tags (list[str]), importance (float 0-1, default 0.5 — higher survives compression), obs_type (str: fact, decision, preference, api_endpoint, dependency, file_path, code_snippet, config, schema). Deduplicates by exact match and semantic similarity. Protected obs_types (api_endpoint, dependency, file_path, code_snippet, config, schema) always survive compression. |
| delete_entitiesA | Delete entities (soft delete by default, cascades to relations). Set hard=true for permanent deletion. |
| delete_observationsA | Delete specific observations from entities. Each item needs: entityName (str), observations (list[str] of content to delete). |
| delete_relationsB | Delete relations from the knowledge graph. Each item needs: from (str), to (str), relationType (str). |
| read_graphC | Read the knowledge graph (compressed by default). Filter by tags, entity_types. Set compress=false for full JSON. |
| search_nodesA | Full-text search with BM25 ranking. Supports prefix search, phrases ("exact match"), boolean (AND/OR/NOT). Filter by tags, entity_types, time_range ([start, end] ISO strings). |
| open_nodesA | Open specific entities by name. depth=0: exact entities only. depth=1: include direct neighbors via relations. depth=2+: BFS expansion. |
| memory_contextA | Lightweight context snapshot (~200-500 tokens) for scoped durable recall. Returns: pinned entities, recent activity, hint-matched entities, and graph stats. Call when prior sessions, stable project facts, or cross-session continuity may matter. Skip for one-off answers or tasks already fully grounded in the current context. Pass hint='current topic' to get relevant entities surfaced. Pass project='name' to scope results to a specific project tag. Pass limit to control how many hint matches are included; prefer 3-5 unless deeper recall is justified. |
| log_activityA | Record what happened this turn. Auto-creates missing entities. Common actions: file_changed, decision_made, bug_fixed, feature_added, refactored, investigated, discussed, preference_set. |
| query_timelineB | Query activity timeline. time_range: relative like "2h", "7d", "30m". Or use start/end with ISO datetime strings. Filter by actions, entity_name, session_id. |
| manage_tagsA | Manage tags. Actions: list, create, delete, tag, untag, cleanup. list: show all tags. create: new tag (name required, optional description/color/auto_expire_hours). delete: remove a user tag (cannot delete system tags). tag: apply tag_name to entity_name. untag: remove tag_name from entity_name. cleanup: remove expired ephemeral items. |
| merge_entitiesA | Merge source entity into target. Source is soft-deleted. strategy: 'combine' (move all observations) or 'dedupe' (skip duplicates). Relations and tags are transferred. Self-relations are removed. |
| export_graphA | Export the full knowledge graph. format: 'json' or 'jsonl' (compatible with old @modelcontextprotocol/server-memory). |
| import_graphA | Import knowledge graph data. Auto-detects JSON or JSONL format. Compatible with old @modelcontextprotocol/server-memory JSONL files. Skips duplicate entities. Skips relations to missing entities. |
| memory_statsA | Get memory statistics: entity/relation/observation counts, tag distribution, DB size, orphan entities, deleted items. |
| backup_memoryA | Create a backup of the memory database. Default destination: ~/.local/share/server-memory/backups/memory-YYYYMMDD-HHMMSS.db Provide dest_path to override the backup location. |
| get_observation_historyA | Get observation version history for an entity. Shows current content, version number, importance, obs_type, and all previous versions with timestamps. Use content_prefix to filter to specific observations. |
| memory_context_fullA | Rich context snapshot for rare deep bootstrap (~500-1500 tokens). Returns all pinned entities with full observations, recent activity (last 10), and recently changed entities. Use only when compact recall is insufficient for a cross-session task. Prefer memory_context for ordinary scoped recall. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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