Skip to content

0xhacksty/Memron

Repository files navigation

Memron

Cross-Platform AI Conversation Syncing & Context Sharing System

Memron is a universal AI memory layer that stores, syncs, and shares conversation context across AI platforms — Copilot, Claude, Antigravity, and any other platform. Never re-explain yourself again.

Architecture

┌──────────┐  ┌──────────┐  ┌──────────────┐  ┌──────────┐
│  Copilot  │  │  Claude   │  │ Antigravity  │  │ Custom   │
│  (MCP)    │  │  (MCP)    │  │  (REST API)  │  │ (REST)   │
└────┬──────┘  └────┬──────┘  └──────┬───────┘  └────┬─────┘
     │              │                │                │
     └──────────────┴────────────────┴────────────────┘
                           │
               ┌───────────▼───────────┐
               │    Memron Engine       │
               ├────────────────────────┤
               │ • MCP Server (stdio)   │
               │ • REST API (HTTP)      │
               │ • Context Engine       │
               │ • Entity Extractor     │
               │ • Summarizer           │
               │ • Sync Protocol        │
               │ • Encryption Layer     │
               └───────────┬────────────┘
                           │
               ┌───────────▼───────────┐
               │   SQLite (local-first) │
               │   + Optional Cloud     │
               └────────────────────────┘

Quick Start

Easy Installation (npx - No manual install needed)

For Claude Desktop - Add to claude_desktop_config.json:

{
  "mcpServers": {
    "memron": {
      "command": "npx",
      "args": ["-y", "memron-ai", "mcp"]
    }
  }
}

For VS Code Copilot - Add to .vscode/mcp.json:

{
  "servers": {
    "memron": {
      "command": "npx",
      "args": ["-y", "memron-ai", "mcp"]
    }
  }
}

That's it! npx automatically downloads and runs Memron. No git clone, no npm install needed.


Manual Installation (Development)

git clone https://github.com/Prayers-2004/Memron.git
cd Memron
npm install
npm run build

Then configure with the local path:

For VS Code Copilot - .vscode/mcp.json:

{
  "servers": {
    "memron": {
      "command": "node",
      "args": ["/absolute/path/to/Memron/dist/cli.js", "mcp"]
    }
  }
}

For Claude Desktop - claude_desktop_config.json:

{
  "mcpServers": {
    "memron": {
      "command": "node",
      "args": ["/absolute/path/to/Memron/dist/cli.js", "mcp"]
    }
  }
}

Replace /absolute/path/to/Memron with your actual installation path.


Start the REST API (for other platforms)

npm start           # or: node dist/cli.js api

Multi-User Support

Memron supports multiple users sharing a single API key with automatic data isolation:

# User Alice stores memory
curl -X POST https://your-api.onrender.com/api/remember \
  -H "Content-Type: application/json" \
  -H "X-API-Key: shared-secret" \
  -H "X-User-ID: alice" \
  -d '{"content": "My favorite color is blue"}'

# User Bob recalls - only sees his own data
curl -X POST https://your-api.onrender.com/api/recall \
  -H "Content-Type: application/json" \
  -H "X-API-Key: shared-secret" \
  -H "X-User-ID: bob" \
  -d '{"query": "favorite color"}'
# Will NOT see Alice's data

Key features:

  • ✅ Single API key for team access
  • ✅ Automatic data isolation by user ID
  • ✅ Namespace-based separation (alice-api, bob-api)
  • ✅ No cross-user data leakage

👉 See MULTI_USER_GUIDE.md for complete details

MCP Tools

When connected via MCP, the following tools are available to your AI:

Tool Description
memron_remember Store a message/information in memory
memron_recall Search and retrieve relevant context
memron_context Get a full cross-platform context package
memron_entity Create/update knowledge entities (decisions, preferences, etc.)
memron_thread Manage conversation threads
memron_summarize Generate thread or global summaries
memron_profile View/update user profile and preferences
memron_search Full-text search across all data
memron_stats System statistics

REST API

Start with memron api or npm start. Default port: 3939.

Endpoint Method Description
/health GET Health check
/api/threads GET/POST List/create threads
/api/threads/:id GET/PATCH/DELETE Thread CRUD
/api/threads/:id/messages GET Get thread messages
/api/messages POST Create a message
/api/entities GET/POST List/create entities
/api/entities/:id GET/PATCH Entity CRUD
/api/context POST Get context package
/api/context/prompt POST Get formatted context prompt
/api/search?q=... GET Full-text search
/api/remember POST Quick-store a memory
/api/recall POST Quick-search memories
/api/summarize POST Generate summaries
/api/profile GET/PATCH User profile
/api/stats GET System statistics

CLI

memron mcp              # Start MCP server
memron api              # Start REST API
memron both             # Start both
memron stats            # Show statistics
memron remember "text"  # Store a memory
memron recall "query"   # Search memories
memron summarize        # Generate global summary
memron context claude   # Generate context for Claude
memron version          # Show version

Data Model

Thread

A conversation sequence — messages grouped by platform and topic.

Message

A single exchange within a thread (user, assistant, or system role).

Entity

A structured piece of extracted knowledge:

  • Decision — choices and rationale
  • Preference — user likes/dislikes
  • Technology — tech stack knowledge
  • Project — project references
  • Concept — defined terms
  • Task — TODOs and action items
  • Person — people mentioned
  • File — file references

Context Package

A compiled bundle of relevant context for injection into a new conversation, respecting token budgets and platform formatting.

Security

  • Local-first: All data stored in local SQLite database
  • Optional encryption: AES-256-GCM encryption at rest
  • API key auth: Optional API key for REST endpoints
  • Cloud sync encryption: End-to-end encrypted sync (optional)

Set MEMRON_ENCRYPTION_KEY in .env to enable encryption.

Configuration

Copy .env.example to .env and customize:

cp .env.example .env

Key settings:

  • MEMRON_DB_PATH — Database location
  • MEMRON_API_PORT — REST API port (default: 3939)
  • MEMRON_ENCRYPTION_KEY — Enable encryption
  • MEMRON_API_KEY — Require API key
  • MEMRON_MAX_CONTEXT_TOKENS — Context package size limit
  • MEMRON_AUTO_SUMMARIZE — Auto-extract entities from messages

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors