Personal Memory Gateway
A privacy-first memory layer for AI that securely bridges local knowledge with AI assistants through MCP tools, with intelligent redaction and local vector database.
README
๐ง Personal Memory Gateway (PMG)
The Privacy-First Memory Layer for AI.
Seamlessly bridge your local knowledge with any AI assistant through a secure, MCP-compatible gateway.
๐ Quick Start
Get up and running in seconds with zero configuration:
npx @shubham-01-star/pmg init
โจ Overview
Personal Memory Gateway (PMG) is a local-first backend designed to store, manage, and serve your personal knowledge to AI models. It acts as a secure "VPN for your memory," ensuring that sensitive data is redacted and privacy is gated before any context is shared.
๐ ๏ธ Core Capabilities
- MCP Tool Integration: Seamlessly connects to Cursor, Claude Desktop, and other MCP clients via
query_personal_memoryandsave_memorytools. - Privacy-First Ingestion: Automatically watches local directories, chunks documents, and stores them in a local vector database (LanceDB).
- Intelligent Redaction: Applies a multi-stage pipeline to redact PII and sensitive information before retrieval.
- Archestra Integration: Optionally route responses through high-performance gateways like Archestra (supporting Gemini/OpenAI).
- Telemetry Dashboard: Monitor system health and manage your indexed data through a built-in web interface.
๐๏ธ Architecture
graph TD
A[Local Files] -->|Ingestion| B(Chunking & Embedding)
B -->|LanceDB| C[Vector Repository]
D[MCP Client] -->|Query| E[Privacy Pipeline]
E -->|Redaction| F[Consent Gate]
F -->|Context| G[AI Model]
C -->|Retrieval| E
๐ฆ Installation
Global Install (Recommended)
npm i -g @shubham-01-star/pmg
pmg init
pmg
Local Development
git clone https://github.com/shubham-01-star/pmg.git
cd pmg
npm install
npm run build
npm run run
๐ MCP Client Configuration
Add PMG to your mcpServers configuration:
{
"mcpServers": {
"pmg": {
"command": "npx",
"args": ["-y", "@shubham-01-star/pmg"],
"env": {
"INGEST_DIR": "/path/to/your/data",
"LANCE_DB_PATH": "/path/to/lancedb/storage"
}
}
}
}
โ๏ธ Environment Variables
| Variable | Description | Default |
|---|---|---|
INGEST_DIR |
Directory to watch for memory files | my_data |
ARCHESTRA_ENABLE |
Enable Archestra integration (0 or 1) |
0 |
EMBEDDING_PROVIDER |
Embedding model source (local, gemini, etc.) |
local |
DASHBOARD_PORT |
Port for the telemetry dashboard | 8787 |
PRIVACY_REDACT_PII |
Enable PII redaction pipeline | 1 |
๐ Dashboard
Once running, access the telemetry dashboard at: ๐ http://localhost:8787/dashboard
- Monitor: Real-time events and memory retrieval stats.
- Manage: Upload new documents or clear existing memories.
- Status: Visual health probes for all internal services.
๐งช Testing & Verification
PMG includes a comprehensive suite of smoke tests and backend validations.
# Run backend smoke suite
make test-backend
# Integrated flow test
node scripts/one-command-flow.mjs "topic" "path/to/sample.txt"
๐ License
Distributed under the MIT License. See LICENSE for more information.
<p align="center"> Built with โค๏ธ for the <b>2 Fast 2 MCP Hackathon</b> </p>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.