mcp-thread-persistence-demo
MCP Thread-Persistenz-Demo
Ein minimaler MCP-Server (Model Context Protocol), der Chat-Thread-Notizen in SQLite persistiert, mit einem echten Client, der ihn über den tatsächlichen stdio-Transport testet (nicht nur durch direkten Aufruf der zugrunde liegenden Funktionen).
Erstellt als Lernübung, die ein echtes Freelance-Job-Muster widerspiegelt: „MCP-Tool-Aufrufe korrigieren/implementieren, die den Chat-Thread-Zustand in einer Datenbank persistieren, mit Upsert-Semantik (neu anlegen, falls nicht vorhanden, aktualisieren, falls vorhanden, keine doppelten Zeilen pro Thread).“
Was hier enthalten ist
server.py— MCP-Server, der drei Tools bereitstellt:save_note(user_id, thread_id, content)— Upsert in SQLite, basierend auf(user_id, thread_id). Ein zweiter Aufruf für denselben Thread aktualisiert die vorhandene Zeile, anstatt ein Duplikat zu erstellen.get_note(user_id, thread_id)— liest die gespeicherte Notiz zurück.list_threads(user_id)— listet alle Threads für einen Benutzer auf.
test_client.py— ein echter MCP-Client, der über stdio eine Verbindung zuserver.pyherstellt,list_toolsaufruft und dann alle drei Tools nacheinander ausführt (einschließlich des zweimaligen Aufrufs vonsave_notefür denselben Thread, um zu überprüfen, dass der Upsert keine doppelte Zeile erstellt).
Related MCP server: Claw Memory Bridge
Ausführen
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python test_client.pyHinweise
Bewusst auf mcp<2 festgelegt: Die 2.x-Version des mcp-SDK hat FastMCP in MCPServer umbenannt und andere APIs geändert. Die meisten vorhandenen Tutorials/Codebasen da draußen zielen immer noch auf die 1.x-FastMCP-API ab, und genau darauf zielt auch dieses Projekt ab.
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