# PMLL Memory MCP server

> Provides persistent key-value context memory and long-term graph memory to improve context retention and retrieval for AI coding agents.

- Repository: https://github.com/drQedwards/PPM
- Page: https://hostedmcp.org/servers/drqedwards/ppm
- Transport: stdio
- Stars: 15
- License: MIT
- Latest version: 0.1.1

## Install

### Claude Code

```sh
claude mcp add ppm -- npx -y pmll-memory-mcp
```

### Cursor (`~/.cursor/mcp.json`)

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

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "ppm": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "pmll-memory-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"ppm","type":"stdio","command":"npx","args":["-y","pmll-memory-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add ppm -- npx -y pmll-memory-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.ppm]
command = "npx"
args = ["-y", "pmll-memory-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user ppm npx -- -y pmll-memory-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `CUDA_VISIBLE_DEVICES` | no | no |  |
| `PYP_DEBUG` | no | no |  |
| `PYP_WORKSPACE_ROOT` | no | no |  |

## Tools (5)

- `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).

## FAQ

### What are the memory layers in PMLL Memory MCP?

It features a short-term KV cache for session-isolated memory and a long-term memory graph using a SQLite-backed property graph.

### Does the server support semantic search?

Yes, the long-term memory graph provides semantic search via stable hashing embeddings.

### What is the purpose of the solution engine?

The solution engine bridges the short-term KV cache and long-term memory graph layers with unified context resolution.
