๐ STRATA โ Universal Context Bridge
STRATA is a high-performance Model Context Protocol (MCP) server that serves as a Universal Context Bridge for AI assistants and LLM agents (Claude Desktop, Cursor, Continue.dev, ChatGPT, etc.).
It gives AI models persistent memory across conversations and coding sessions, backed by Supabase PostgreSQL, full-text indexing, and pgvector semantic search.
โก Features
- ๐ง Persistent Context Memory: AI agents can save decisions, design systems, API contracts, preferences, and code snippets across sessions.
- ๐ Intelligent Memory Search: Fast full-text and contextual search with automatic recency fallbacks.
- ๐ Modern MCP 2.0 SDK: Built using the latest
MCPServerdecorator architecture with Server-Sent Events (SSE) streaming transport. - ๐๏ธ Supabase & PostgreSQL: Battle-tested cloud database layer with pgvector support and Row-Level Security (RLS).
- ๐ Singleton Connection Pooling: Cached client instances for high-throughput, low-latency tool execution.
- ๐ฉบ Built-in Health Checks: REST endpoints for uptime monitoring and connectivity status (
/health).
๐ ๏ธ Available MCP Tools
| Tool | Description | Parameters |
|---|---|---|
save_memory |
Save context, preferences, decisions, or code into long-term memory | content (str), title (opt), tags (opt) |
search_memory |
Search past context and discussions matching keywords or queries | query (str), limit (int, default: 5) |
list_memories |
List recent context entries stored in STRATA | limit (int, default: 10) |
delete_memory |
Remove a specific memory entry by UUID | memory_id (str) |
get_stats |
View database connection status, memory count, and metadata | None |
๐ Quick Start
1. Prerequisites
- Python 3.10 or higher
- A Supabase account & project
2. Clone & Setup Environment
# Clone the repository
git clone https://github.com/your-username/STRATA.git
cd STRATA
# Copy environment file and configure your keys
cp .env.example .env
Edit .env with your Supabase credentials:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-service-role-key
DEFAULT_USER_ID=your-user-uuid (optional)
3. Install Dependencies
cd apps/api
python -m venv venv
# Activate virtual environment:
# Windows (PowerShell):
.\venv\Scripts\Activate.ps1
# macOS / Linux:
source venv/bin/activate
# Install requirements
pip install -r requirements.txt
4. Database Setup
Run the SQL schema located in supabase_schema.sql in your Supabase SQL Editor to initialize the tables, vector extensions, and full-text indexes.
5. Start the Server
# From apps/api directory:
uvicorn main:app --reload --port 8000
The server starts on http://localhost:8000 with the following endpoints:
- SSE Endpoint:
http://localhost:8000/sse - Messages Endpoint:
http://localhost:8000/messages/ - Health Check:
http://localhost:8000/health
๐ Connecting to MCP Clients
Claude Desktop
Add this to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"strata": {
"url": "http://localhost:8000/sse"
}
}
}
Cursor IDE
In Cursor settings under Features > MCP Servers, add a new server:
- Name:
STRATA - Type:
sse - URL:
http://localhost:8000/sse
๐ Project Structure
STRATA/
โโโ apps/
โ โโโ api/ # Python MCP Server
โ โโโ main.py # Server logic, MCPServer instance & tools
โ โโโ requirements.txt # Python dependencies
โ โโโ venv/ # Python virtual environment
โโโ .env.example # Template environment file
โโโ .gitignore # Version control ignores
โโโ package.json # Root monorepo configuration
โโโ supabase_schema.sql # Database schema, pgvector, and indexes
โโโ README.md # Documentation
๐ก๏ธ License
MIT License. See LICENSE for details.#๏ฟฝ ๏ฟฝb๏ฟฝo๏ฟฝu๏ฟฝn๏ฟฝc๏ฟฝe๏ฟฝ-๏ฟฝm๏ฟฝc๏ฟฝp๏ฟฝ๏ฟฝ๏ฟฝ