mcp-kv mcp

v1.0.6 · MCP Tool · storage · registry.pascalai.org

Fast persistent key-value store with namespace isolation. Each namespace is a separate JSON file, loaded once into memory and flushed on every write. Supports multiple namespaces for agent/session isolation.

memorykvkey-valuestoragepersistencenamespaceagentfast

Input Parameters

ParameterTypeDescription
operationrequired string Operation to perform. One of: set, get, delete, list, list_all, clear, search, append, count, namespaces.
namespaceoptional string Isolation scope. Each namespace is a separate JSON file. Default: 'default'. Default: default.
keyoptional string Key name. Required for: set, get, delete, append.
kvalueoptional string Value to store as string. Required for: set, append.
queryoptional string Substring to match in keys and values. Required for: search.
storagePathoptional string Base directory for storage files. Default: {Documents}/mcp-kv/

Output Fields

FieldTypeDescription
ok boolean
key string
value string
found boolean
existed boolean
keys array[string]
entries object
matches object
list array[string]
count integer
cleared integer
error string

Examples

Store a value in namespace 'agent1'

// Input
{
  "operation": "set",
  "namespace": "agent1",
  "key": "step",
  "kvalue": "3"
}

// Output
{
  "ok": true,
  "key": "step"
}

Retrieve a value

// Input
{
  "operation": "get",
  "namespace": "agent1",
  "key": "step"
}

// Output
{
  "ok": true,
  "found": true,
  "key": "step",
  "value": "3"
}

List all namespaces

// Input
{
  "operation": "namespaces"
}

// Output
{
  "ok": true,
  "list": [
    "agent1",
    "default"
  ],
  "count": 2
}

Install & Discovery

Install

ppm install mcp-kv

Get JSON Schema

GET /v1/packages/mcp-kv/1.0.6/schema

Discover by keyword

GET /v1/mcp/discover?q=memory
Discovery hint: Install with ppm install mcp-kv or invoke remotely via POST /v1/invoke/mcp-kv on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-kv');
Tool.Call(JsonObj(['operation','set','namespace','my_agent','key','status','kvalue','running']));
var R := Tool.Call(JsonObj(['operation','get','namespace','my_agent','key','status']));
var V := R['value'];