Skip to main content
Glama
shirisha456

MCP Shared Memory Hub

by shirisha456

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 --wait

Install the package with development dependencies:

pip install -e ".[dev]"

Apply migrations:

alembic upgrade head

Run the checks:

ruff check . && ruff format --check . && mypy && pytest -v

Integration 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 built

License

MIT

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Durable, inspectable memory for MCP agents. Preserves decisions, preferences, and project knowledge across sessions with full provenance and version history.
    2
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides self-hosted, versioned project memory with full-text and vector search, enabling search, retrieval, upsertion, and history management of project entries via MCP tools.
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP agents to maintain durable, evidence-aware project knowledge, retrieve precise excerpts on demand, and track decisions, conflicts, and revisions across sessions.
    1
    Apache 2.0

Latest Blog Posts

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