memory-mcp
Verified Safeby Calvin-Francis
Overview
Provides AI assistants with persistent semantic memory and knowledge graph capabilities, enabling cross-session memory, semantic retrieval, and complex reasoning.
Installation
npm startEnvironment Variables
- DATABASE_URL
- DASHSCOPE_API_KEY
Security Notes
The server uses parameterized SQL queries throughout `memory.js` and `graph.js` to prevent SQL injection. Configuration, including API keys and database connection strings, is loaded from environment variables, avoiding hardcoded secrets. Communication occurs over standard I/O (stdio) via JSON-RPC 2.0, which significantly limits external network attack surface. An LRU cache is implemented for embedding generation, reducing frequent calls to external APIs. While the server directly parses arbitrary JSON from stdin, there is no explicit input schema validation before arguments are passed to service functions. PostgreSQL's strong typing does offer a layer of protection against unexpected data types being directly inserted. There is a theoretical potential for denial-of-service (DoS) if excessively large or deeply nested JSON inputs are provided via stdin, though this is less critical for a local stdio connection.
Similar Servers
post-cortex
Post-Cortex is an MCP server that provides AI assistants with long-term memory, storing conversations, decisions, and insights in a searchable knowledge base with automatic entity extraction and semantic search capabilities.
Simple-Memory-Extension-MCP-Server
A persistent key-value memory store for AI agents, designed to extend context windows and enable semantic search over stored memories.
amp
Provides a persistent, structured memory (Short-Term, Long-Term, and Graph) for AI agents, mimicking a hippocampus for continuous learning and recall.
cymbiont
Augments AI assistants with a self-organizing knowledge graph for persistent memory and enhanced context retrieval across various domains.