convez.ai
MCP ServerAutomaçãoAvançado
mekineer-com

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 GitHub
InicialPluginScore · de 0 a 100

Servidor 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-server

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
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 1 semana
Versão
v0.1.12
Issues abertas
0
Contribuidores
2

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_id has 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 different soul_id values for separate personalities.


Requirements

  • Python 3.12+
  • memu engine checked out and pointed to via config.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

EndpointMethodPurpose
/healthGETHealth check
/conversation/{id}/memorizePOSTExtract memories from conversation (async, returns 202)
/retrievePOSTQuery memories
/souls/{soul_id}/narrative_suggestionPOSTSubmit narrative_self revision suggestion
/souls/{soul_id}/relationshipsCRUDManage declared relationships
/conversation/{id}/retrievePOSTRetrieve + build turn prompt (RAG + prior context)
/conversation/{id}/turnPOSTSoul turn loop: run LLM, persist intentions + cache
/conversation/{id}/messages/appendPOSTAppend messages (with memorize_chat flag)
/conversation/{id}/stateGET/PATCHConversation working state (includes memorize_chat)
/conversation/{id}/consolidation/forcePOSTForce consolidation now (bypass interval gate)
/intentionsGETList active intentions
/intentions/{id}PATCHUpdate intention status/priority
/categoriesGETList all categories
/clearPOSTDelete memories in scope
/configGET/POSTRead or update runtime config
/diag/*GETDiagnostic 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.

Ver o original no GitHub

Bom para

Relacionados