Skip to main content
Glama

๐Ÿš€ Membrane - Universal Memory Layer for AI Agents

Python | FastAPI | Next.js | SUI | Walrus | MCP

The decentralized, verifiable knowledge infrastructure for autonomous agents.

๐ŸŒŸ Overview

Membrane is a comprehensive platform that provides persistent, verifiable, and shareable memory for AI agents through the Model Context Protocol (MCP). Built on the SUI blockchain for immutable cryptographic state and the Walrus protocol for decentralized blob storage.

๐Ÿš€ Try it here

Related MCP server: memory-decay

๐Ÿ“ธ Screenshots

Dashboard

Memories

Auth

Dashboard

Memories

Auth

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       Membrane Platform                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                โ”‚
โ”‚  โ”‚   Frontend      โ”‚    โ”‚   Multi-tenant  โ”‚                โ”‚
โ”‚  โ”‚   Dashboard     โ”‚    โ”‚   MCP Server    โ”‚                โ”‚
โ”‚  โ”‚                 โ”‚    โ”‚                 โ”‚                โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                โ”‚
โ”‚           โ”‚                        โ”‚                       โ”‚
โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  โ”‚           SUI Blockchain        โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Cryptographic Proofs         โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Tamper Detection             โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Memory Provenance            โ”‚                        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚                                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  โ”‚         Walrus Protocol         โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Decentralized Storage        โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Memory Payloads & Artifacts  โ”‚                        โ”‚
โ”‚  โ”‚  โ€ข Blob Management              โ”‚                        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”— On-Chain Integration & Verifiability

Membrane leverages the Sui blockchain to create an immutable, verifiable record of agent memory.

What exactly gets anchored on Sui?

  • Memory Hash: A cryptographic hash of the memory payload ensuring data integrity.

  • Metadata: Contextual information about the memory (e.g., source, tags, agent ID).

  • Walrus Blob ID: The decentralized storage identifier pointing to the actual memory payload stored on Walrus.

  • Timestamp: An immutable record of when the memory was created or modified.

Why does this matter? Anchoring this data on-chain guarantees Memory Provenance and Tamper Detection. AI agents and human users can mathematically verify that a piece of information existed at a specific time and has not been secretly altered. This is crucial for high-stakes agentic workflows where trust, auditability, and shared context are required.

๐Ÿ“ฆ Project Structure

membrane/
โ”œโ”€โ”€ src/membrane/                  # ๐Ÿš€ Multi-tenant MCP API Server
โ”‚   โ”œโ”€โ”€ api/                       # REST endpoints
โ”‚   โ”œโ”€โ”€ server.py                  # FastMCP implementation
โ”‚   โ”œโ”€โ”€ memory_manager.py          # Memory coordination
โ”‚   โ””โ”€โ”€ retrieval.py               # Hybrid search engine
โ”‚
โ”œโ”€โ”€ frontend/                      # ๐ŸŽจ Agent Control Dashboard
โ”‚   โ”œโ”€โ”€ app/                       # Next.js application
โ”‚   โ”œโ”€โ”€ lib/                       # API clients & configuration
โ”‚   โ””โ”€โ”€ public/                    # Static assets
โ”‚
โ””โ”€โ”€ tests/                         # ๐Ÿ”ง Integration & Unit Tests
    โ”œโ”€โ”€ test_api.py                # API test suite
    โ””โ”€โ”€ test_connect.py            # Walrus/Sui connection tests

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11+

  • Node.js 18+

  • npm 8+

  • SUI Wallet with testnet tokens

1. Frontend Dashboard (Control Center)

# Navigate to frontend
cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

# Open http://localhost:3000

2. Multi-tenant MCP Server

# Navigate to project root
cd membrane

# Set up virtual environment
python -m venv .venv
source .venv/Scripts/activate # Windows
# source .venv/bin/activate # Mac/Linux

# Install backend dependencies
pip install -e .

# Start ASGI application
uvicorn membrane.app:create_asgi_app --factory --reload --port 8000

# Server available at http://localhost:8000

๐Ÿ”ง Environment Setup

API Server (.env)

# Database
DATABASE_URL="postgresql://user:pass@localhost:5432/membrane"

# Security
ENCRYPTION_KEY="your-secure-32-byte-key"

# Walrus Storage (REQUIRED)
WALRUS_PUBLISHER_URL="https://walrus-testnet-publisher.natsai.xyz"
WALRUS_AGGREGATOR_URL="https://walrus-testnet-aggregator.natsai.xyz"

# SUI Configuration (REQUIRED)
SUI_RPC_URL="https://fullnode.testnet.sui.io:443"
SUI_WALLET_ADDRESS="your-sui-wallet-address"
SUI_PRIVATE_KEY="your-sui-private-key"

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000/api

๐Ÿš€ Deployment

Quick Deploy Options

Frontend Dashboard

  • Vercel (Recommended): cd frontend && vercel

  • Netlify: cd frontend && npx netlify deploy --prod

Enterprise API Server

  • Render: Connect repository and deploy as ASGI web service

  • Docker: docker build -t membrane-api .

  • Railway: railway up

๐ŸŽฏ Features

Frontend Dashboard

  • โœ… Identity Provisioning - Claim Membrane IDs

  • โœ… API Key Management - Generate and rotate keys

  • โœ… Telemetry - Real-time metrics and system overview

  • โœ… SUI Integration - Dapp kit wallet connection

  • โœ… Configuration Export - Instant MCP manifest generation

MCP Server / API

  • โœ… 14 MCP Tools - Complete memory orchestration

  • โœ… Hybrid Search - Metadata + Semantic retrieval (FastEmbed)

  • โœ… Multi-Tenant - Isolated namespaces and keys

  • โœ… REST API - System orchestration and metrics

  • โœ… Artifact Storage - Image, PDF, and text blobs

Backend Services

  • โœ… FastMCP Integration - Standardized context protocol

  • โœ… PostgreSQL Indexing - Ultra-fast metadata lookups

  • โœ… Walrus Blob Storage - Unlimited payload size

  • โœ… SUI Verification - Immutable state proofs

๐Ÿ”’ Security Features

  • 100% Real Blockchain - Immutable state records and transaction references

  • API Key Authentication - Secure access to namespaces

  • Cryptographic Verification - SHA256 + HMAC validation

  • AES-CBC Encryption - Secure sensitive memory payloads

  • PostgreSQL Isolation - Multi-tenant RLS and namespace boundaries

๐Ÿ“š Documentation

  • API Docs: Available at http://localhost:8000/docs when server is running.

  • MCP Protocol: Refer to the Model Context Protocol official specification.

๐Ÿงช Testing

Backend Integration

# Run the test suite
pytest tests/

Frontend

cd frontend
npm run lint
npm run build

๐ŸŽฏ Use Cases

AI Agents & Assistants

  • Long-Term Memory - Agents that remember past conversations

  • Shared Context - Multiple agents collaborating on the same project

  • Verifiable Truth - Audit trails for agent decision making

Enterprise Applications

  • Knowledge Graphs - Semantic relationship tracking

  • Agent Orchestration - Managing state across distributed workers

  • Compliance - Immutable records of automated actions

๐Ÿ“Š Performance

  • Speed: Sub-100ms semantic search execution

  • Efficiency: CPU-optimized (no GPU required)

  • Verification: On-chain Walrus blobs via SUI

๐Ÿค Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

๐Ÿ“ž Support

  • Issues: Use GitHub Issues for bug reports

  • Discussions: Use GitHub Discussions for questions

๐Ÿš€ Status

Membrane is ready for deployment with active SUI blockchain integration and Walrus storage.

Built with โค๏ธ by the Membrane Team

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HarshitR2004/membrane'

If you have feedback or need assistance with the MCP directory API, please join our Discord server