convez.ai
MCP ServerIntegração & APIsAvançado
BenedettiLucca

Alexandria — Servidor MCP de Contexto Pessoal

BenedettiLucca/alexandria

Cérebro compartilhado para múltiplas IAs — memória unificada com busca semântica

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que funciona como um armazenamento unificado de contexto pessoal, acessível por múltiplas IAs via protocolo MCP. Integra memórias, projetos, dados de saúde e grafo de conhecimento em uma única base Supabase com busca semântica via pgvector e classificação automática por OpenRouter.

Instalação

$npx convez-ai BenedettiLucca/alexandria

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 2 meses
Versão
—
Issues abertas
22
Contribuidores
1

Casos de uso

  • Manter contexto consistente entre Claude, ChatGPT, Cursor e outras IAs
  • Armazenar e recuperar memórias, projetos e decisões com busca semântica
  • Integrar dados de saúde (sono, exercício, vitais) com sumários derivados
  • Construir grafo de conhecimento com extração automática de entidades

Veredito

Solução sofisticada para quem precisa de memória compartilhada entre múltiplas IAs. Requer auto-hospedagem Supabase e configuração OpenRouter, mas oferece controle total e integração profunda com ecossistema Claude via MCP — ideal para power users e pesquisadores.

README

A tradução para o português deste README ainda está na fila.

Alexandria — Personal Context MCP Server

Tests

A unified personal context store accessible by any AI via the MCP protocol. Single-user, self-hosted on Supabase. One database, one server — every AI you use reads and writes to the same brain.

Named after the Library of Alexandria — a single repository holding all knowledge, accessible to any scholar (or AI) who needs it.

Features

  • 28 MCP tools for memories, briefs, projects, health, training, and knowledge graph
  • Semantic search with pgvector (HNSW indexes)
  • Auto-classification and embedding via OpenRouter (GPT-4o-mini + text-embedding-3-small)
  • Knowledge graph with entity extraction from memories
  • Health data importers (Google Health Connect, Iron Log)
  • OAuth2 sync for Google Health API
  • Derived health summaries (daily aggregations via SQL RPC)
  • Row-level security locked to service_role
  • 121 tests (73 Python + 48 Deno)

Architecture

AI Clients (Claude, ChatGPT, Cursor, Hermes, ...)
    │
    ▼  MCP over Streamable HTTP
Supabase Edge Function (Deno + Hono + MCP SDK)
    │
    ├──▶ Supabase PostgreSQL + pgvector
    └──▶ OpenRouter API (embeddings + classification)

Tech Stack

ComponentTechnology
ServerSupabase Edge Function (Deno)
FrameworkHono + @hono/mcp
TransportStreamable HTTP
DatabaseSupabase PostgreSQL + pgvector
AIOpenRouter (text-embedding-3-small, gpt-4o-mini)
ImportersPython 3.11+

Database Schema

schema/schema.sql is the canonical schema for fresh installs, and it must stay identical to the consolidated bootstrap migration in supabase/migrations/*_alexandria_schema.sql.

10 tables in a single consolidated schema/schema.sql:

TableDescription
memoriesNotes, ideas, decisions, observations
briefsStructured markdown artifacts from cron/jobs with dedupe + semantic recall
projectsCodebase context, architecture, conventions
profileUser preferences, dev stack, environment
health_entriesHealth data (sleep, exercise, vitals, body composition)
training_logsWorkout sessions with exercises, volume, RPE
health_summariesDerived daily/weekly health summaries
entitiesKnowledge graph entities (people, concepts, tools)
entity_mentionsLinks entities to memories
sync_logImport sync state tracking

MCP Tools

Memories

  • search_memories — semantic search across all memories
  • capture_memory — save a new memory (auto-embeds + classifies)
  • list_memories — list/filter recent memories
  • memory_stats — summary statistics

Briefs

  • capture_brief — store a structured brief/report artifact
  • list_briefs — list/filter recent briefs
  • search_briefs — semantic search across stored briefs

Profile

  • get_profile — retrieve profile sections
  • set_profile — create/update profile data

Projects

  • list_projects — list tracked projects
  • get_project — get project details
  • save_project — create/update project context

Health

  • log_health — record a health entry
  • query_health — search/filter health data
  • health_summary — view daily aggregated summaries
  • search_health — semantic search over health entries

Training

  • log_workout — record a training session
  • query_workouts — search/filter workout history
  • search_training — semantic search over training logs

Knowledge Graph

  • add_entity — create a knowledge graph entity
  • get_entity — get entity details and related memories
  • list_entities — browse all entities
  • search_entities — search entities by name
  • get_entity_mentions — get mentions for an entity
  • search_mentions — search entity mentions
  • top_entities — most-connected entities

Sync

  • sync_status — view import sync history

Quick Start

  1. Clone the repo

    git clone https://github.com/your-username/alexandria.git
    cd alexandria
    
  2. Create a Supabase project at supabase.com

  3. Run the schema — open SQL Editor and run the contents of schema/schema.sql

  4. Get an OpenRouter API key at openrouter.ai/settings/keys

  5. Configure environment

    cp .env.example .env
    # Edit .env with your credentials
    
  6. Deploy

    bash scripts/deploy.sh
    
  7. Connect your AI client — see docs/clients.md

Testing

./run-tests.sh                                          # Schema drift check + full suite (121 tests)
python3 scripts/check_schema_drift.py                   # Drift guard only
deno test supabase/functions/alexandria/ --allow-all    # Deno tests only (48)
python -m pytest importers/ -v                          # Python tests only (73)
python -m pytest importers/ -v --cov=importers          # With coverage report

CI runs automatically on every push to master and on pull requests. See the Actions tab for results.

Project Structure

alexandria/
├── schema/schema.sql          # Consolidated DB schema
├── supabase/
│   └── functions/
│       └── alexandria/
│           ├── index.ts       # MCP server (25 tools)
│           ├── lib.ts         # Pure functions
│           ├── lib.test.ts    # Deno tests (48)
│           ├── deno.json      # Deno config + imports
│           └── deno.lock
├── importers/
│   ├── shared.py              # Shared utilities
│   ├── health-connect/        # Google Health Connect importer
│   ├── iron-log/              # Iron Log workout importer
│   └── test_*.py              # Python tests (73)
├── docs/
│   ├── setup.md               # Detailed setup guide
│   ├── clients.md             # AI client connection guide
│   └── plan.md                # Architecture & improvement plan
├── scripts/deploy.sh          # One-command deploy
└── .env.example               # Environment template

License

MIT

Ver o original no GitHub

Bom para

Relacionados