Skip to content

Support multiple namespaces (subgraphs) for multi-tenant memory #21

@kornelrabczak

Description

@kornelrabczak

Currently, the MCP server operates on a single flat graph, all entities and relations share the same namespace. This means one MCP server instance can only serve one use case or one user's memory at a time.

LadybugDB supports subgraphs which provide isolation similar to CREATE DATABASE / USE DATABASE in relational databases. Each subgraph has its own schema, data, and configuration.

CREATE GRAPH my_project_memory;
USE my_project_memory;
-- all operations scoped to this subgraph

Add namespace support so a single Archiledger MCP server can host multiple isolated knowledge graphs, enabling:

  • Per-project memory, different projects get separate graphs
  • Per-user isolation, multi-user scenarios without data leakage
  • Use-case separation, memory bank vs. codebase analysis in parallel

API Design (Draft)

Add an optional namespace parameter to all MCP tools:

{
  "tool": "create_entities",
  "arguments": {
    "namespace": "project-alpha",
    "entities": [...]
  }
}

Additional management tools:

  • list_namespaces, list all available subgraphs
  • create_namespace, create a new isolated subgraph
  • delete_namespace, drop a subgraph and all its data
  • switch_namespace, set default namespace for subsequent operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.2.xIssues for the 0.2 releaseenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions