MCP Vitacore MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "GEMINI_API_KEY=${GEMINI_API_KEY}" mcp-vitacore -- docker compose up --build
Required:GEMINI_API_KEY+ 3 optional
README.md

Session memory consolidation and architectural oversight system for AI agents.

mcp-vitacore

MCP Context Project Vitacore: consolidación de memoria de sesiones con Gemini (resúmenes y evolución del Macro) y SQLite (persistencia).

Variables de entorno

Variable Obligatoria Default Descripción
GEMINI_API_KEY API Key de Google AI (Gemini).
VITACORE_DB_PATH No ./data/vitacore.sqlite Ruta del archivo SQLite.
GEMINI_MODEL No gemini-2.0-flash Modelo Gemini (ej. gemini-2.0-flash).
GEMINI_TIMEOUT_MS No 60000 Timeout en ms para llamadas a Gemini (AbortSignal).

Para Vertex AI u otra base URL, consultar la documentación de @google/genai (p. ej. GEMINI_BASE_URL si el SDK lo soporta).

Arranque

  • Local: npm run build && npm start (o npm run dev). Requiere GEMINI_API_KEY en el entorno.
  • Docker: docker compose up --build. Pasar GEMINI_API_KEY vía .env o env. El volumen vitacore_data persiste la DB.

Al iniciar se valida que GEMINI_API_KEY esté definida y se hace una llamada mínima a Gemini (generateSessionSummary([])). Si falla, se escribe en stderr y process.exit(1).

Flujo de datos

  • Bottom-up: Tools MCP → Application (logStep, closeSession, hydrateAgentContext, evolveMacro) → Ports (StoragePort, GeminiPort) → Adapters (SQLite, Gemini).
  • Top-down: El agente/orquestador llama a las tools; la aplicación orquesta storage + gemini y devuelve ToolResult; los adaptadores realizan I/O.

Tools MCP

Base (V1/V2)

  • log_stepsession_id, action, implications: registra un paso en la sesión.
  • close_sessionsession_id: obtiene steps, genera resumen con Gemini y persiste la sesión. Idempotencia: si la sesión ya está cerrada, devuelve "Sesión ya cerrada." sin llamar a Gemini.
  • hydrate_agent_contextrole (opcional): devuelve macro + últimas 3 sesiones + debates abiertos (filtro por role).
  • trigger_macro_evolution — sin args: evoluciona el Macro con las últimas 10 sesiones y Gemini y guarda.

V3 — Subconsciente Activo

El modelo de fondo (Gemini) actúa como curador y corrector: el agente en Cursor (Sistema 1) escribe código; el MCP con Gemini (Sistema 2) sintetiza, detecta contradicciones y propone refactors. SQLite es el tejido donde ambos se comunican.

  • ask_the_oracletechnical_doubt: consulta una duda técnica. El MCP toma los últimos N steps (contexto reciente), los envía a Gemini y devuelve una directiva técnica curada (3 pasos). El agente nunca lee bitácora cruda para esa duda.
  • check_architectural_health — sin args: compara el Macro con los resúmenes de sesiones recientes vía Gemini; detecta paradojas (contradicciones), las persiste en la tabla paradoxes y devuelve un resumen. Si hay paradojas, el agente puede usar resolve_architectural_paradox para ver el análisis.
  • resolve_architectural_paradoxparadox_id: lee la paradoja por id, opcionalmente pide a Gemini una sugerencia de resolución, la marca como resuelta y devuelve descripción, análisis y sugerencia al agente.
  • submit_for_background_reviewsession_id: toma los steps de esa sesión y el Macro, llama a Gemini para generar un plan de refactor desde la bitácora (deuda técnica, extracciones sugeridas) y lo persiste en refactor_plans. No requiere acceso al código; la revisión es sobre la bitácora.
  • get_pending_refactorsmodule_name (opcional): lista los planes de refactor pendientes; si se pasa module_name, filtra por ese módulo.

Uso con Cursor

El MCP se consume por stdio. En el host, ejecutar el binario y configurar en .cursor/mcp.json el comando que arranca este servidor.

Cursor: uso standalone (repo por separado)

Si este repo se usa solo (sin orquestador):

npm install && npm run build

En .cursor/mcp.json del workspace:

"mcp-vitacore": {
  "command": "node",
  "args": ["mcp-vitacore/dist/index.js"],
  "env": {
    "GEMINI_API_KEY": "TU_API_KEY",
    "VITACORE_DB_PATH": "./data/vitacore.sqlite"
  }
}

Ajustá args si el MCP está en otra ruta. Reiniciar Cursor tras cambiar mcp.json.

Tools (9)

log_stepRegisters a step in the current session.
close_sessionSummarizes the session using Gemini and persists it.
hydrate_agent_contextReturns the macro, recent sessions, and open debates.
trigger_macro_evolutionEvolves the macro using the last 10 sessions and Gemini.
ask_the_oracleConsults a technical doubt using recent session context.
check_architectural_healthDetects contradictions between the macro and recent sessions.
resolve_architectural_paradoxReads a paradox, optionally suggests a resolution, and marks it as resolved.
submit_for_background_reviewGenerates a refactor plan from session logs.
get_pending_refactorsLists pending refactor plans, optionally filtered by module.

Environment Variables

GEMINI_API_KEYrequiredGoogle AI Gemini API Key
VITACORE_DB_PATHPath to the SQLite database file
GEMINI_MODELGemini model identifier
GEMINI_TIMEOUT_MSTimeout in milliseconds for Gemini API calls

Configuration

claude_desktop_config.json
{"mcp-vitacore": {"command": "node", "args": ["mcp-vitacore/dist/index.js"], "env": {"GEMINI_API_KEY": "YOUR_API_KEY", "VITACORE_DB_PATH": "./data/vitacore.sqlite"}}}

Try it

Check the architectural health of my current project and see if there are any contradictions.
I have a technical doubt about the current module implementation, ask the oracle for guidance.
Submit my current session for a background refactor review.
Get all pending refactor plans for the authentication module.
Evolve the project macro based on the last 10 sessions.

Frequently Asked Questions

What are the key features of MCP Vitacore?

Automated session summarization using Gemini. Long-term context persistence via SQLite. Architectural contradiction detection. Background refactor planning based on session logs. Active sub-conscious curation for AI agents.

What can I use MCP Vitacore for?

Maintaining long-term architectural consistency across multiple coding sessions.. Detecting technical debt and contradictions in evolving codebases.. Generating automated refactoring plans without manual documentation.. Providing AI agents with a 'sub-conscious' memory of past technical decisions..

How do I install MCP Vitacore?

Install MCP Vitacore by running: npm install && npm run build

What MCP clients work with MCP Vitacore?

MCP Vitacore works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Vitacore docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare