Skip to main content
Glama
PStryder

MemoryGate

by PStryder

MemoryGate

MemoryGate is a production-ready MCP server that provides durable memory for AI agents. It combines structured storage with semantic search, OAuth-based authentication, and lifecycle controls for retention and archiving.

Highlights

  • 20 MCP tools for storage, retrieval, knowledge graph, and cold storage.

  • OAuth 2.0 + PKCE for MCP clients, plus Google/GitHub login for users.

  • API keys with bcrypt hashing and prefix-based lookup.

  • Postgres + pgvector for semantic search; SQLite fallback for local/dev.

  • Retention engine with hot/cold tiers, summaries, tombstones, and archives.

  • Metadata-only audit logging.

  • Rate limiting, security headers, and request size limits by default.

Related MCP server: Recall

Architecture

  • core/ contains shared business logic and models.

  • app/ wires FastAPI middleware, routes, and OAuth flows.

  • core/mcp registers FastMCP tools and exposes SSE/streamable HTTP.

Endpoints:

  • /mcp/ - SSE MCP transport (authenticated).

  • /MemoryGate - Alias endpoint for streamable HTTP MCP.

  • /auth/* - OAuth login, client credentials, API key management.

  • /oauth/* and /.well-known/* - MCP OAuth discovery and PKCE flow.

  • /health - Health check.

Quick Start (Local)

Install deps:

pip install -r requirements.txt
pip install -r requirements-postgres.txt

Configure environment (Postgres + pgvector):

export DATABASE_URL="postgresql://user:password@localhost:5432/memorygate"
export OPENAI_API_KEY="sk-..."
export PSTRYDER_DESKTOP="client-id"
export PSTRYDER_DESKTOP_SECRET="client-secret"
export PSTRYDER_DESKTOP_REDIRECT_URIS="https://claude.ai/api/mcp/callback"

Run:

uvicorn app.main:asgi_app --host 0.0.0.0 --port 8080

Verify:

curl http://localhost:8080/health

For local dev without auth, you can set REQUIRE_MCP_AUTH=false.

Agent Usage (Example)

# Bootstrap
memory_bootstrap(ai_name="Kee", ai_platform="Claude")

# Initialize a session
memory_init_session(
    conversation_id="uuid",
    title="OAuth integration",
    ai_name="Kee",
    ai_platform="Claude",
)

# Store an observation
memory_store(
    observation="Completed OAuth 2.0 + PKCE integration",
    confidence=0.95,
    domain="technical_milestone",
    evidence=["Deployment successful"]
)

MCP Tool Set

  • Session and docs: memory_init_session, memory_bootstrap, memory_user_guide

  • Storage: memory_store, memory_store_document, memory_store_concept, memory_update_pattern

  • Retrieval: memory_search, memory_recall, memory_get_concept, memory_get_pattern, memory_patterns, memory_stats

  • Knowledge graph: memory_add_concept_alias, memory_add_concept_relationship, memory_related_concepts

  • Cold storage: search_cold_memory, archive_memory, rehydrate_memory, list_archive_candidates

Documentation

See docs/INDEX.md for the full documentation set.

License

Apache 2.0 - see LICENSE.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    Provides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.
    14
  • F
    license
    A
    quality
    -
    maintenance
    Provides long-term memory storage for AI assistants with semantic search, enabling persistent storage of preferences, decisions, and context with relationship tracking between memories.
    19
  • A
    license
    -
    quality
    D
    maintenance
    Provides a persistent, vendor-neutral memory layer that allows AI tools and agents to share context and knowledge across different platforms while maintaining local data ownership. It enables users to store, recall, and manage structured memories through hybrid semantic search and automated context assembly.
    6
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Universal memory for AI agents and tools. Save, organize and search context anywhere.

  • Persistent memory for AI agents — verbatim conversations, searchable by meaning.

  • Persistent memory for AI agents. Search, store, and recall across sessions.

View all MCP Connectors

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/PStryder/MemoryGate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server