Skip to main content
Glama

distRA

A spatial, non-recursive OS kernel, filesystem interface, and MCP server for humans and AI agents.

No folders inside folders. Real-world spatial ontology (Country → Land → Hegemony → Palace/Building → Floor → Room → Desk/Cabinet → Binder → File → Document) with strict type-containment rules.

CI License: MIT Python 3.11+ MCP Compatible

English | Türkçe


Why distRA?

Traditional operating systems force everything into a single recursive abstraction: infinite nested directories. That blurs ownership, separates sessions from workspaces, and turns human + AI agent collaboration into folder chaos.

distRA replaces nested directories with a typed, non-recursive spatial hierarchy modeled after physical reality:

  • Nothing can ever contain itself — no folder inside a folder, no file inside a file, no room inside a room, no desk inside a desk.

  • Every session is a Room (oda) — humans and AI agents enter a room, drop their own Desk (masa), collaborate on a shared room board, and leave Documents (evrak) on desks or inside binders.

  • Flat physical storage — underneath, evrak_store/ is completely flat (<id>.dat blobs + SQLite WAL registry). Zero nested directories exist on disk.

  • OS-level right-click contract — allowed_children_for tells any shell or future desktop UI exactly what can be created in each space (inside a saray → only kat; inside an oda → masa or dolap; on a masa → klasor, dosya, or evrak).


Related MCP server: aigc-lite

Spatial Ontology

flowchart TD
    U["ulke (Country / Network Sovereignty)"] --> A["arazi (Land / Disk)"]
    A --> B["beylik (Hegemony / OS Root)"]
    B --> S["saray (Palace / Root User - max 1)"]
    B --> BN["bina (Building / Normal User - 0..N)"]
    S --> K["kat (Floor / Workarea)"]
    BN --> K
    K --> O["oda (Room / Session)"]
    O --> M["masa (Desk / Desktop Surface)"]
    O --> D["dolap (Cabinet / Archive)"]
    M --> KL["klasor (Binder)"]
    D --> KL
    M --> DS["dosya (File)"]
    D --> DS
    KL --> DS
    M --> EV["evrak (Document Blob)"]
    DS --> EV

For the full specification (sovereignty, visitor permissions, crown transfer, desk/cabinet ownership vs. room ownership, and Debian OS roadmap), see docs/ARCHITECTURE.md (Türkçe).


Quick Start

git clone https://github.com/gitmuhammedalbayrak/distRA.git
cd distRA

# 1. Bootstrap a starter world (Country -> Land -> Hegemony -> Palace -> Floor -> Room)
./bin/distra --root ./distra_world init

# 2. Launch the interactive spatial shell
./bin/distra --root ./distra_world shell

Inside the interactive shell:

harita                                              # Inspect the spatial tree
gir disk0/ana-beylik/saray/kat-1/ana-oda            # Enter the Room (Session)
yeni                                                # Query allowed types (masa, dolap)
kimlik ajan-1 agent                                 # Switch identity to an AI agent
oturum_katil ajan-masasi                            # Drop a desk and join the room
gir ajan-masasi                                     # Sit at the desk
evrak_yaz . plan.txt "Ship distRA v0.2"             # Write a document directly on the desk
gir ..                                              # Step back to the room
kimler                                              # List active humans & AI agents in the room

AI Agent Integration (CLI & MCP Server)

JSON CLI

Every command supports --json for scripts and autonomous agents:

./bin/distra --root ./distra_world --actor ajan-1 --kind agent --json \
  join /turkiye/disk0/ana-beylik/saray/kat-1/ana-oda --masa ajan-1-masasi --create-masa

Model Context Protocol (MCP)

Connect any MCP-compatible AI agent (Antigravity, Claude, Cursor, Codex) directly to distRA via stdio:

{
  "mcpServers": {
    "distra": {
      "command": "/path/to/distRA/bin/distra-mcp",
      "env": {
        "DISTRA_ROOT": "/path/to/distRA/distra_world",
        "DISTRA_STRICT_ACL": "0"
      }
    }
  }
}

Exposed MCP tools: distra_ls, distra_allowed, distra_join_room, distra_who, distra_create, distra_write_evrak, distra_read_evrak, distra_post_board, distra_read_board, distra_grant, distra_audit.


Running Tests

python3 -m unittest discover -s tests -v

Roadmap

  • Spatial ontology & strict non-nesting invariants across all 12 types

  • Flat disk storage (evrak_store/ + SQLite WAL)

  • Interactive shell & JSON CLI

  • Role grants (egemen, sahip, esya_sahibi, ziyaretci), crown transfer, room board & audit log

  • Standard stdio MCP server for AI agents

  • Inter-land network protocol (ulke / arazi federation)

  • Desktop compositor / GUI driven by allowed_children_for

  • Bootable minimal Debian/QEMU image


Contributing & License

Contributions are welcome! Please read CONTRIBUTING.md and our Code of Conduct. Licensed under the MIT License.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables any MCP-compatible AI, whether in the browser or running locally, to create and edit projects, run terminal commands and long-running jobs, and optionally use Docker, all guarded by a policy engine, workspace jail, authentication, and audit logging.
      23
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables a self-hosted AI workspace with persistent sessions, agent run/step execution logs, unified search across conversations and knowledge, and discovery/invocation of local and remote MCP tools.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes a self-hosted shared workspace over MCP where AI agents and their teammates read and write tasks, decisions, docs and results, so each session picks up where the last one left off. It adds hybrid cited search, per-workspace OAuth or scoped tokens, change feeds for cheap re-sync, and an append-only audit trail of every agent or human write.
      AGPL 3.0
    • A
      license
      C
      quality
      B
      maintenance
      Enables MCP-compatible agents to operate a versioned shared workspace system through standard tools, including project initialization, file operations, branching, merging, publishing, checkpoints, deduplicated storage, command execution, and background process management over stdio or Streamable HTTP.
      41
      23 npm
      MIT