# pmll-memory-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/drQedwards/PPM  
**GitHub Stars:** 15  
**npm Downloads (last month):** 283  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pmll-memory-mcp

## Description
PMLL Memory MCP — persistent KV context memory and Q-promise deduplication.

## Tools
Capabilities this server exposes over MCP:

- **init** — Initialise the PMLL memory silo for an agent session. Call this once at the start of every agent task, as the 3rd initializer alongside Playwright.  Sets up the KV silo and prepares the Q-promise chain for the session.
- **peek** — Non-destructive context check — the core deduplication primitive. Call this before any Playwright or other MCP tool invocation to check whether the required context already exists in the PMLL silo or is in-flight as a Q-promise.
- **set** — Store a KV pair in the session's PMLL memory silo. Call after a successful (non-cached) MCP tool invocation to populate the silo so future `peek` calls return a cache hit. Mirrors PMLL.c::update_silo() writing a var/value pair into the silo.
- **resolve** — Check or resolve a Q-promise continuation. Mirrors the `QThenCallback` mechanism in Q_promise_lib/Q_promises.h — the callback is invoked when a QMemNode's payload becomes available. If the promise is already resolved, returns its payload immediately. If still pending, returns `{status: "pending", payload: null}`.
- **flush** — Clear all short-term KV slots for a session. Call at agent task completion to free memory.  Mirrors the teardown of a memory_silo_t allocation (PMLL.c::free_pml).
- **graphql** — Execute a GraphQL query or mutation against a remote endpoint, with optional PMLL cache integration. Supply `operation` as a GraphQL document string and `variables` as a JSON object.  Pass `cache_key` to store/retrieve the result from the PMLL silo so redundant network calls are avoided on subsequent `peek` checks.  The `operation` defaults to the pre-built canonical Query document when omitted.  Use `use_mutation` to switch the default to the canonical Mutation document.
- **upsert_memory_node** — Create or update a memory node in the long-term semantic graph. Nodes represent concepts, files, symbols, or notes with auto-generated TF-IDF embeddings for semantic search. Part of the Context+ solution engine for durable context retention and retrieval.
- **create_relation** — Create a typed edge between two memory nodes in the long-term graph. Supported relation types: relates_to, depends_on, implements, references, similar_to, contains.
- **search_memory_graph** — Semantic search with graph traversal — finds direct matches then walks 1st/2nd-degree neighbors. Returns ranked results scored by cosine similarity and edge decay.
- **prune_stale_links** — Remove decayed edges (e^(-λt) below threshold) and orphan nodes with low access counts from the long-term memory graph.
- **add_interlinked_context** — Bulk-add nodes with auto-similarity linking (cosine ≥ 0.72 creates edges automatically). Efficient for adding multiple related concepts at once.
- **retrieve_with_traversal** — Start from a node and walk outward — returns all reachable neighbors scored by decay and depth. Used for exploring the knowledge graph from a known starting point.
- **resolve_context** — Unified context resolution across both short-term (KV cache) and long-term (semantic graph) memory layers. Checks KV cache first, then falls back to semantic graph search. This is the primary Context+ solution engine tool for unified KV + graph retrieval.
- **promote_to_long_term** — Promote a short-term KV cache entry to the long-term semantic memory graph. Creates a persistent memory node from a frequently accessed cache entry, ensuring important context survives session flushes.
- **memory_status** — Get a unified status view of both short-term (KV cache) and long-term (semantic graph) memory layers. Shows slot usage, graph statistics, and promotion threshold.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "pmll-memory-mcp": {
    "command": "npx",
    "args": ["-y","pmll-memory-mcp"]
  }
}
```

## Documentation

## What pmll-memory-mcp does

The pmll-memory-mcp MCP server provides two related memory layers for agent workflows. The short-term layer is a key-value silo used for session state and exact cache lookups. The Q-promise state supports pending work and deduplication around asynchronous or repeated operations. The long-term layer is a graph of memory nodes connected by typed relations.

Memory nodes can contain automatically generated TF-IDF embeddings. The graph supports semantic search, neighbor traversal, similarity-based linking, and cleanup of stale or weakly used data. The server also exposes GraphQL access to the memory store for clients that need queries or mutations beyond the dedicated memory operations.

## How it works

A session begins with `init`, which prepares the PMLL silo and Q-promise state. `set` writes a key-value entry, while `peek` checks cached values and promise state without modifying them. `resolve` handles a pending promise result, and `flush` clears silo slots when a task finishes.

For durable context, `upsert_memory_node` creates or updates a graph node and generates its TF-IDF embedding. `create_relation` adds typed edges such as `depends_on`, `implements`, `references`, `similar_to`, and `contains`. `search_memory_graph` combines direct semantic matches with a walk through neighboring nodes. `retrieve_with_traversal` starts from a node and returns reachable neighbors scored by decay and traversal depth.

The pmll-memory-mcp MCP server can automatically connect newly added context: `add_interlinked_context` creates multiple nodes and adds similarity links when cosine similarity reaches 0.72 or higher. `prune_stale_links` removes edges whose exponential decay falls below the configured threshold and can remove low-access orphan nodes. `resolve_context` checks short-term KV memory first, then searches the long-term graph. `promote_to_long_term` moves a short-term entry into that graph, while `memory_status` reports both layers.

## Tools and capabilities

- Initialize PMLL silo and Q-promise session state with `init`.
- Inspect, write, resolve, and clear short-term KV context with `peek`, `set`, `resolve`, and `flush`.
- Execute GraphQL queries and mutations against the memory store with `graphql`.
- Create or update embedded memory nodes with `upsert_memory_node`.
- Add typed graph relations with `create_relation`.
- Search semantically and traverse related nodes with `search_memory_graph` and `retrieve_with_traversal`.
- Bulk-add interlinked context using automatic cosine-similarity links.
- Remove decayed links and unused orphan nodes.
- Resolve context across short-term and long-term memory layers.
- Promote KV entries and inspect combined memory status.

## Limitations and notes

It also does not specify how embeddings are configured beyond describing TF-IDF generation and the 0.72 cosine threshold used for automatic similarity links.

The Q-promise and PMLL layers have different roles: promises manage temporal or control-flow state, while the silo stores memory. The underlying Q-promise drain is single-threaded, and callers must serialize access externally when using that C-layer behavior. The repository also contains a broader Python packaging CLI and related PMLL and Q-promise components; those are separate from the MCP memory tool surface.

_Full upstream README: https://allmcps.com/mcp/pmll-memory-mcp/readme_

