MCP Commands - Memory Bank

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations >

MCP Commands - Memory Bank

MCP Memory Bank - Overview

PreviousTopNext


MiniRobot Language (MRL) - MCP Server Feature

 

MCP Memory Bank

Key-Value Storage System

 

What is the Memory Bank?

 

The MCP Memory Bank is a simple key-value storage system that allows robot scripts to store, retrieve, and manage data during execution. It functions like a dictionary or hash map where you can store values under unique keys and retrieve them later by name.

 

Key Features

 

Simple Key-Value Storage: Store any text data under a unique key name

Persistence Options: Choose between temporary (session-only) or permanent storage

Clipboard Integration: Copy memory contents to/from system clipboard

Thread-Safe: Multiple scripts can safely access the memory bank

MCP Server Integration: Accessible across different tool calls and sessions

 

Available Commands

 

Core Storage Commands:

MEM.STO - Store a value with optional persistence (PERM/TEMP)

MEM.RCL - Recall/retrieve a stored value by key

MEM.S - Simple temporary store (shortcut for MEM.STO with TEMP)

MEM.R - Simple recall (shortcut for MEM.RCL)

 

Management Commands:

MEM.DEL - Delete a key from memory

MEM.EXS - Check if a key exists

MEM.LST - List all keys (with optional filter)

 

Clipboard Commands:

MEM.ToClip - Copy memory value to system clipboard

MEM.FromClip - Copy system clipboard to memory

 

Storage Types

 

TEMP (Temporary):

• Stored only for the current session

• Lost when the MCP server restarts

• Default for MEM.S (simple store)

• Good for: temporary results, caches, working data

 

PERM (Permanent):

• Persisted across server restarts

• Survives until explicitly deleted

• Must be specified with MEM.STO

• Good for: configuration, user preferences, persistent data

 

Example Usage

 

' Store temporary data

MEM.S|$$TempKey|This is temporary data

 

' Store permanent data

MEM.STO|$$Config|Important settings|PERM

 

' Check if exists before recalling

MEM.EXS|$$Config|$$HasConfig

IVV.$$HasConfig!0

MEM.RCL|$$Config|$$Settings

EIF.

 

' List all memory keys

MEM.LST|$$AllKeys

 

' Clean up when done

MEM.DEL|$$TempKey

 

Important Notes

 

• Key names are case-sensitive

• Values can be any text string (including multi-line)

• Memory is shared across all tools in the MCP server

• Use meaningful key names to avoid collisions (e.g., prefix with tool name)

• The Memory Bank feature requires the RESOURCES capability in MCP server configuration

• Keys stored with PERM persistence are saved to disk and survive server restarts

• Maximum key and value sizes depend on available system memory

 

See also:

 

MCP Server Lifecycle

MEM.EXS - Check Existence

MEM.DEL - Delete Key

MEM.STO - Store Value

MEM.RCL - Recall Value