mcp-thread-persistence-demo
MCP Thread Persistence Demo
Un servidor MCP (Model Context Protocol) mínimo que persiste notas de hilos de chat en SQLite, con un cliente real que lo pone a prueba a través del transporte stdio real (no solo llamando directamente a las funciones subyacentes).
Construido como ejercicio de aprendizaje que refleja un patrón real de trabajo freelance: «arreglar/implementar llamadas a herramientas MCP que persistan el estado del hilo de chat en una base de datos, con semántica de upsert (crear si es nuevo, actualizar si existe, sin filas duplicadas por hilo).»
Contenido
server.py— servidor MCP que expone tres herramientas:save_note(user_id, thread_id, content)— realiza un upsert en SQLite, con clave(user_id, thread_id). La segunda llamada en el mismo hilo actualiza la fila existente en lugar de crear un duplicado.get_note(user_id, thread_id)— recupera la nota guardada.list_threads(user_id)— lista todos los hilos de un usuario.
test_client.py— un cliente MCP real que se conecta aserver.pya través de stdio, llama alist_toolsy luego pone a prueba las tres herramientas en secuencia (incluyendo llamar asave_notedos veces en el mismo hilo para verificar que el upsert no crea una fila duplicada).
Related MCP server: Claw Memory Bridge
Cómo ejecutarlo
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python test_client.pyNotas
Fijado a mcp<2 deliberadamente: la versión 2.x del SDK de mcp renombró
FastMCP como MCPServer y cambió otras APIs. La mayoría de los
tutoriales/bases de código en el mundo real siguen apuntando a la API 1.x de FastMCP,
así que a eso apunta esto también.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
MCP-native notes and memory for ChatGPT, Claude, and other AI tools.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
- HeirmosOAuthcom.heirmos
Persistent memory shared across Claude, ChatGPT, Grok and other MCP clients.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides persistent memory management with SQLite, enabling storage and retrieval of conversational context with metadata via MCP tools and REST API.-
- AlicenseNot gradedqualityCmaintenanceProvides a shared memory bridge for AI agents (QClaw, Claude Code, Codex) allowing them to store, search, and retrieve notes, decisions, and conclusions via MCP tools, using local SQLite with optional TencentDB integration.MIT
- AlicenseNot gradedqualityCmaintenanceA local notes app that enables AI tools to manage notes via MCP (list, get, create, update, delete) using the same SQLite database as the GUI.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable agents to safely and persistently participate in technocore.chat rooms and notes with local did:key identity signing, an append-only activity ledger, duplicate post protection, and injection-hardened reads.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BenzyTAi/mcp-thread-persistence-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server