la-caja-mcp
Enables structured debates with agent-agent-human interaction and access to persistent contextual memory (La Caja) through MCP tools.
README
la-caja-mcp
Sistema MCP de acceso y debate sobre La Caja (memoria contextual). Repo B: consumidor de La Caja (repo A). Este repo no toca el nucleo de memoria; habla con el por API y expone la Caja a agentes.
Que hay aca
src/la_caja_mcp/protocolo.py— protocolo de debate agente-agente-humano. Claims, solicitud de interferencia, rondas con deadline, adjudicacion humana. Determinista y replayable (event-sourcing, misma disciplina que La Caja).src/la_caja_mcp/mcp_server.py— servidor MCP: tools del debate + tools de memoria de La Caja (repo A, consumido por API), un solo juego de tools y dos transportes (stdio local / streamable HTTP remoto).tests/— mini-falsacion de la maquina de estados + integracion con cliente MCP real por stdio (debate y memoria) + push SSE multiagente.demo_debate.py— demo del debate que cierra en consensus.smoke_http.py— smoke test del transporte streamable HTTP.worker/— host ASGI portable (uvicorn + Dockerfile) para el MCP remoto.
Servidor MCP
Un juego de tools, dos transportes:
# local (stdio): lo lanza el agente como subproceso
la-caja-mcp --transport stdio
# remoto (streamable HTTP): unico standard para MCP sobre red
la-caja-mcp --transport streamable-http --host 127.0.0.1 --port 8000
Debate: crear_sesion, mover (payload JSON), estado,
ultimos_eventos, reproducir_sesion.
Memoria (requiere pip install la-caja; repo A): procesar_consulta,
declarar_relacion, consultar, contexto_primado, historial
(traza dormida, capa inerte), stats.
La memoria es persistente con --caja-db <ruta> (SQLite, event-sourcing
de La Caja) o LA_CAJA_DB; sin eso, en memoria pura.
Discusion en vivo (push)
En streamable HTTP el server expone ademas un endpoint SSE:
GET /caja/push?sesion_id=<id>
Emite un evento estado (snapshot: ultimo_seq + estado) al conectar
y luego un sesion_actualizada por cada mover() exitoso. Un agente se
suscribe con una conexion HTTP aparte (cualquier stack) y usa
ultimos_eventos para traer el detalle. Requiere server compartido: en
stdio cada agente tiene su propio proceso, ahi la vivacidad es por
sondeo con ultimos_eventos.
Transportes MCP (decision de arquitectura)
- Local =
stdio(el agente lanza el server como subproceso). - Remoto = streamable HTTP (unico standard para MCP remoto, + OAuth).
worker/es ejemplo de host desplegable (VPS/Docker); no hay MCP publico hosteado.
Probar
$env:PYTHONPATH="src"; python -m pytest tests -q
Licencia
MIT — ver LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.