Central-Memory-MCP

Storage Guide (Current Implementation)

Overview

Alpha implementation persists entities and relations in Azure Table Storage. Workspace isolation via WorkspaceName (PartitionKey). Row keys are GUIDs (no reliance on names). Observations stored as a single delimited string (||).

Tables

Example Entity Row

PartitionKey = demo
RowKey = 5f3a2e9d2c8f4a1e9d3b2c7a5e4f1d0a
Name = Alice
EntityType = Person
Observations = Software engineer||Loves Go
Metadata = {"dept":"Engineering"}
Id = 5f3a2e9d2c8f4a1e9d3b2c7a5e4f1d0a

Upsert Strategy

  1. Lookup existing entity by PartitionKey + Name (OData filter)
  2. If found, reuse existing Id
  3. Replace entire row (Replace mode)

Relation Upsert

Observations Format

Stored joined by ||. On read split into list:

string.Join("||", observations)
// Read: value.Split("||", RemoveEmptyEntries)

Workspace Isolation

Single partition per workspace keeps queries simple; scalability acceptable for early stage. Future optimizations may introduce composite partitioning if hot partitions emerge.

Configuration

Local:

AzureWebJobsStorage=UseDevelopmentStorage=true

Production example:

AzureWebJobsStorage=DefaultEndpointsProtocol=https;AccountName=<name>;AccountKey=<key>;EndpointSuffix=core.windows.net

Use managed identity / Key Vault for secretless access (future enhancement).

Query Patterns

Error Handling

Limitations / Roadmap

Future improvements: batch APIs, observation archival, indexed queries, search entities by prefix/type, relation reverse lookups.