PMLL Memory MCP Server — persistent KV context memory and Q-promise deduplication for Claude agent tasks
Project description
PMLL Memory MCP Server
Short-term KV context memory and Q-promise deduplication for Claude Sonnet/Opus agent tasks.
What it does
pmll-memory-mcp is a Model Context Protocol (MCP) server that gives Claude Sonnet/Opus agents a fast, session-isolated, short-term KV memory layer. It is designed to be the 3rd initializer alongside Playwright and other MCP tools — loaded once at the start of every agent task.
The server exposes five tools (init, peek, set, resolve, flush) that agents use to:
- Cache the results of expensive MCP tool calls (Playwright navigations, API fetches, …).
- Deduplicate redundant initializations by checking the cache before every tool invocation.
- Chain async continuations via a Q-promise registry so parallel agent subtasks don't repeat the same work.
Why it's a premium 3rd initializer
Modern Claude agent tasks routinely call Playwright, file-system tools, and other MCP servers. Without a shared memory layer, every subtask re-initializes the same context from scratch. pmll-memory-mcp eliminates this overhead:
Agent task start
├── 1st init: Playwright MCP
├── 2nd init: Unstoppable Domains MCP (see unstoppable-domains/)
└── 3rd init: pmll-memory-mcp ← this server
└── all subsequent tool calls go through peek() first
The peek() pattern
Before every expensive MCP tool invocation, agents call peek to check the cache:
// Pseudocode — what the agent does automatically via MCP tool calls
// 1. Check cache before navigating
const result = mcp.call("pmll-memory-mcp", "peek", { session_id: sid, key: "https://example.com" });
if (result.hit) {
const pageContent = result.value; // ← served from PMLL silo, no browser needed
} else {
// 2. Cache miss — do the real work
const pageContent = mcp.call("playwright", "navigate", { url: "https://example.com" });
// 3. Populate the cache for future agents / subtasks
mcp.call("pmll-memory-mcp", "set", {
session_id: sid,
key: "https://example.com",
value: pageContent,
});
}
Tools reference
| Tool | Input | Output | Description |
|---|---|---|---|
init |
session_id: str, silo_size: int = 256 |
{status, session_id, silo_size} |
Set up PMLL silo + Q-promise chain for session |
peek |
session_id: str, key: str |
{hit, value?, index?} or {hit, status, promise_id} |
Non-destructive cache + promise check |
set |
session_id: str, key: str, value: str |
{status: "stored", index} |
Store KV pair in the silo |
resolve |
session_id: str, promise_id: str |
{status: "resolved"|"pending", payload?} |
Check/resolve a Q-promise continuation |
flush |
session_id: str |
{status: "flushed", cleared_count} |
Clear all silo slots at task completion |
Installation
Via npx (recommended — no install needed)
npx pmll-memory-mcp
Via npm
npm install -g pmll-memory-mcp
pmll-memory-mcp # starts the stdio MCP server
Claude Desktop / MCP config (claude_desktop_config.json)
NPX
{
"mcpServers": {
"pmll-memory-mcp": {
"command": "npx",
"args": ["pmll-memory-mcp"]
}
}
}
Docker
{
"mcpServers": {
"pmll-memory-mcp": {
"command": "docker",
"args": [
"run", "-i",
"-v", "pmll_data:/app/data",
"-e", "MEMORY_FILE_PATH=/app/data/memory.jsonl",
"--rm", "pmll-memory-mcp"
]
}
}
}
Docker
The MCP server ships as a multi-stage Docker image modelled on the
upstream memory server
Dockerfile.
Build
# From the repository root
docker build -f mcp/Dockerfile -t pmll-memory-mcp .
Run
docker run --rm -i pmll-memory-mcp:latest
Run (persistent KV memory via volume)
docker run --rm -i \
-v pmll_data:/app/data \
-e MEMORY_FILE_PATH=/app/data/memory.jsonl \
pmll-memory-mcp:latest
VS Code MCP configuration
Add to .vscode/mcp.json (or open MCP: Open User Configuration from the Command Palette):
NPX
{
"servers": {
"pmll-memory-mcp": {
"command": "npx",
"args": ["-y", "pmll-memory-mcp"]
}
}
}
Docker
{
"servers": {
"pmll-memory-mcp": {
"command": "docker",
"args": [
"run", "-i",
"-v", "pmll_data:/app/data",
"-e", "MEMORY_FILE_PATH=/app/data/memory.jsonl",
"--rm", "pmll-memory-mcp"
]
}
}
}
Differences from the upstream memory Dockerfile
Upstream src/memory |
This mcp/ |
|
|---|---|---|
| Build source | COPY src/memory /app + COPY tsconfig.json |
COPY mcp /app only |
| tsconfig.json | Extends root via ../../tsconfig.json |
Self-contained standalone |
| Build command | npm install + npm ci --omit-dev in builder |
npm install + npm run build |
| Persistence volume | ❌ | ✅ VOLUME ["/app/data"] |
| Entry point | node dist/index.js |
node dist/index.js ✓ |
Architecture
┌─────────────────────────────────────────────────────┐
│ pmll-memory-mcp │
│ │
│ index.ts ──► peekContext() ──► kv-store.ts │
│ │ │
│ └──────────► q-promise-bridge│
└─────────────────────────────────────────────────────┘
│ │
▼ ▼
PMLL.c / PMLL.h Q_promise_lib/
(memory_silo_t) (QMemNode chain)
The server is pure TypeScript — no C compilation is required at runtime. The KV store (kv-store.ts) mirrors the semantics of PMLL.c::init_silo() and update_silo() in TypeScript, and the promise registry (q-promise-bridge.ts) mirrors the QMemNode chain from Q_promise_lib/Q_promises.h. Both C foundations are documented inline throughout the source.
C foundations
| TypeScript module | Mirrors | Key C primitives |
|---|---|---|
kv-store.PMMemoryStore |
PMLL.h::memory_silo_t |
init_silo(), update_silo() |
q-promise-bridge |
Q_promises.h::QMemNode |
q_mem_create_chain(), q_then() |
peek.peekContext() |
Recursive conflict check in PMLL | check_conflict(), pml_refine() |
Registry submission
This server is structured for submission to the Anthropic official MCP registry. See mcp_manifest.json for the registry manifest.
Companion servers
| Server | Directory | Transport | Description |
|---|---|---|---|
| Unstoppable Domains | unstoppable-domains/ |
HTTP (remote) | Search, purchase, and manage Web3 domain names via natural conversation. |
Use both servers together for the best agent experience: Unstoppable Domains handles domain operations while pmll-memory-mcp caches API responses to eliminate redundant network calls. See unstoppable-domains/claude_desktop_config.json for a combined Claude Desktop config.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmll_memory_mcp-1.0.0.tar.gz.
File metadata
- Download URL: pmll_memory_mcp-1.0.0.tar.gz
- Upload date:
- Size: 74.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1fa1e9e2e7834695c776e6a7d28000f57701050675a291cd4000d09a6e23945
|
|
| MD5 |
82d1db0dd5cd47f95be3bb0929e13e80
|
|
| BLAKE2b-256 |
c271404d8086c647721c7d282eabced87681cb926c64b655c65d69dc08ad1c73
|
Provenance
The following attestation bundles were made for pmll_memory_mcp-1.0.0.tar.gz:
Publisher:
pypi-publish.yml on drQedwards/PPM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pmll_memory_mcp-1.0.0.tar.gz -
Subject digest:
f1fa1e9e2e7834695c776e6a7d28000f57701050675a291cd4000d09a6e23945 - Sigstore transparency entry: 1228839420
- Sigstore integration time:
-
Permalink:
drQedwards/PPM@75915132b15d007ffc2b6fb568154e8c83d674a2 -
Branch / Tag:
refs/tags/1.0.0.0.0 - Owner: https://github.com/drQedwards
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@75915132b15d007ffc2b6fb568154e8c83d674a2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pmll_memory_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pmll_memory_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6a0ecd376a7121f87a8900b56eabae921417e105658c75c57349a1ec7f3a576
|
|
| MD5 |
4f47874757ed3f48bd080eccdb0cc3a0
|
|
| BLAKE2b-256 |
7c194043848aca8598814fe928f0e4cdd773da48404dd1048d5663fbcf66f2bc
|
Provenance
The following attestation bundles were made for pmll_memory_mcp-1.0.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on drQedwards/PPM
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pmll_memory_mcp-1.0.0-py3-none-any.whl -
Subject digest:
c6a0ecd376a7121f87a8900b56eabae921417e105658c75c57349a1ec7f3a576 - Sigstore transparency entry: 1228839436
- Sigstore integration time:
-
Permalink:
drQedwards/PPM@75915132b15d007ffc2b6fb568154e8c83d674a2 -
Branch / Tag:
refs/tags/1.0.0.0.0 - Owner: https://github.com/drQedwards
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@75915132b15d007ffc2b6fb568154e8c83d674a2 -
Trigger Event:
release
-
Statement type: