mcp-memu-server
mekineer-com/mcp-memu-server
Motor de memória persistente com RAG e gestão de intenções para agentes
Ver no GitHubServidor FastAPI local que encapsula o motor de memória memu e o expõe como API HTTP. Orquestra estado de conversação, consolidação de memórias, loop de turno da alma e sincronização entre clientes e engine, permitindo múltiplas conversas compartilharem uma mesma identidade (soul_id) com históricos independentes.
Instalação
npx convez-ai mekineer-com/mcp-memu-server1 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
Casos de uso
- Construir agentes com memória de longo prazo e personalidade persistente
- Implementar sistemas multi-conversa que mantêm coerência narrativa
- Recuperar e consolidar memórias através de RAG com metadados estruturados
Veredito

MCP server robusto para orquestração de memória em agentes. Requer Python 3.12+, configuração manual e integração com LLM provider, mas oferece primitivas sólidas para persistência de estado conversacional e consolidação semanal de memórias.
README
A tradução para o português deste README ainda está na fila.
mcp-memu-server
Local FastAPI server that wraps the memu memory engine and exposes it as an HTTP API. Handles conversation state, consolidation, the soul turn loop, and orchestration between clients and the engine.
This is part of the memU local stack — a private fork, not affiliated with NevaMind-AI.
One soul, many chats. Each
soul_idhas its own memory database. Multiple conversations can share one soul — each has its own cursor and manifest, and retrieval pulls from all of them. Consolidation is soul-scoped (weekly). Use differentsoul_idvalues for separate personalities.
Requirements
- Python 3.12+
memuengine checked out and pointed to viaconfig.json- An LLM provider API key (OpenAI-compatible)
- No Docker required
Quick start
# 1. Copy the example config (config.example.json has default values)
cp config.example.json config.json
# 2. Edit config.json — at minimum:
# llm.api_key, storage.metadata_store.dsn, memu.path
# 3. Install deps
pip install -e .
# 4. Start the server
python run.py
# or: uvicorn app.main:app --host 127.0.0.1 --port 8099
The server runs on http://127.0.0.1:8099 by default.
Config (config.json)
At minimum, set llm.api_key, llm.chat_model, llm.embed_model, storage.metadata_store.dsn, and memu.path. See config.example.json for the full reference including step_models, step_temperatures, memorize toggles, and retrieve settings. Relative paths are resolved from the mcp-memu-server/ directory.
Key endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/health | GET | Health check |
/conversation/{id}/memorize | POST | Extract memories from conversation (async, returns 202) |
/retrieve | POST | Query memories |
/souls/{soul_id}/narrative_suggestion | POST | Submit narrative_self revision suggestion |
/souls/{soul_id}/relationships | CRUD | Manage declared relationships |
/conversation/{id}/retrieve | POST | Retrieve + build turn prompt (RAG + prior context) |
/conversation/{id}/turn | POST | Soul turn loop: run LLM, persist intentions + cache |
/conversation/{id}/messages/append | POST | Append messages (with memorize_chat flag) |
/conversation/{id}/state | GET/PATCH | Conversation working state (includes memorize_chat) |
/conversation/{id}/consolidation/force | POST | Force consolidation now (bypass interval gate) |
/intentions | GET | List active intentions |
/intentions/{id} | PATCH | Update intention status/priority |
/categories | GET | List all categories |
/clear | POST | Delete memories in scope |
/config | GET/POST | Read or update runtime config |
/diag/* | GET | Diagnostic pages (recent memories, SQLite browser) |
See INDEX.md for the full endpoint list and task→file guide.
Codebase orientation
mcp-memu-server/
├── app/main.py # All endpoints + business logic
├── app/db.py # SQLite helpers
├── app/database.py # SQLAlchemy async engine
├── app/config.py # Config loading + LLM profile builder
├── app/services/consolidation.py # Consolidation pipeline
├── app/services/diary.py # Diary helper primitives
├── app/services/graph_edges.py # Entity graph edge writing
├── app/services/state.py # Conversation state management
├── app/services/turn_contract.py # Soul turn prompt construction
├── app/services/intention_state.py # Intentions normalization
├── app/services/mcp_tools.py # MCP tool definitions
├── run.py # Entry point
└── config.json # Runtime config (not committed)
Development
# Syntax check
python3 -m py_compile app/main.py
# Run tests
make test
# Tail logs
tail -f mcp-memu-server.log
License
GPLv3. See LICENSE and NOTICE.