MCP Shared Memory Hub
MCP Shared Memory Hub
A persistent, versioned memory service that lets multiple MCP-compatible AI clients share project knowledge across sessions, with conflict-safe updates, provenance, hybrid retrieval, stale-memory handling, and context-budgeted recall.
Status: Milestone 0 — project foundation. No memory storage yet. See
docs/architecture.md for the full design and
the roadmap for what lands when.
What this is, precisely
Claude Desktop and Cursor each spawn their own copy of this server as a subprocess. The two processes share no memory and no cache — PostgreSQL is the only shared state between them. That constraint is what makes the concurrency control in this project real rather than decorative.
An MCP server receives the arguments of the tool calls made to it. It does not receive transcripts. This is therefore a shared memory system — clients explicitly record what is worth keeping — and not a chat-history synchronisation system. Nothing in this repository will ever claim otherwise.
Related MCP server: Memory Cortex
What it is not
Not a chatbot, not a RAG platform, not a vector-database wrapper, not a notes CRUD app, not an issue tracker, not an MCP gateway, not an agent control plane.
Engineering focus
Schema design and database-enforced invariants · optimistic concurrency control via single-statement compare-and-set · idempotent writes · immutable revisions with supersession · staged retrieval with a measured evaluation harness · an explicit failure model · real-PostgreSQL testing.
Quick start
Start PostgreSQL (the image bundles pgvector, which Milestone 7 will need):
docker compose up -d --waitInstall the package with development dependencies:
pip install -e ".[dev]"Apply migrations:
alembic upgrade headRun the checks:
ruff check . && ruff format --check . && mypy && pytest -vIntegration tests skip with an actionable message if PostgreSQL is unreachable. In CI,
MEMHUB_REQUIRE_DB=1 turns that skip into a failure so a broken service container cannot be
mistaken for a green build.
Configuration
Every setting is declared in src/memhub/config.py; nothing reads
os.environ directly. Override via environment variables prefixed MEMHUB_, or a .env file —
see .env.example.
Milestone 0 scope
In | Out |
Docker Compose (PostgreSQL 16 + pgvector image) | Any table — the first DDL is Milestone 1 |
Typed settings, strict mypy, ruff | The MCP SDK dependency (Milestone 1, after verifying the current version) |
JSON logging, stderr-only | Metrics and tracing (Milestone 2) |
Async Alembic + round-trip and drift tests | Domain models |
Template-database test harness | Embeddings, retrieval, ranking |
0001_baseline is intentionally empty: Milestone 0 proves the migration pipeline, not a schema.
The downgrade and drift tests therefore pass trivially today — they exist now so they are already
wired when Milestone 1 adds the first tables.
Layout
src/memhub/
config.py typed settings, validated at startup
observability/logging.py JSON logs to stderr (stdout is the JSON-RPC channel)
persistence/base.py declarative base + constraint naming convention
persistence/engine.py async engine, pool, server-side statement timeout
migrations/ async Alembic
tests/ unit + integration, real PostgreSQL
docs/architecture.md the design, including what was deliberately not builtLicense
MIT
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
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent memory for AI agents with OAuth-backed hosted MCP access.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceShared memory for any MCP-compatible AI, enabling cross-platform knowledge persistence and retrieval so users' context, preferences, and project info follow them everywhere.3AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceDurable, inspectable memory for MCP agents. Preserves decisions, preferences, and project knowledge across sessions with full provenance and version history.2Apache 2.0
- FlicenseNot gradedqualityBmaintenanceProvides self-hosted, versioned project memory with full-text and vector search, enabling search, retrieval, upsertion, and history management of project entries via MCP tools.
- AlicenseNot gradedqualityAmaintenanceEnables MCP agents to maintain durable, evidence-aware project knowledge, retrieve precise excerpts on demand, and track decisions, conflicts, and revisions across sessions.1Apache 2.0
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/shirisha456/mcp_shared_memory_hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server