home / mcp / memento mcp server
Memento MCP: A Knowledge Graph Memory System for LLMs
Configuration
View docs{
"mcpServers": {
"gannonh-memento-mcp": {
"command": "npx",
"args": [
"-y",
"@gannonh/memento-mcp"
],
"env": {
"DEBUG": "true",
"NEO4J_URI": "bolt://127.0.0.1:7687",
"NEO4J_DATABASE": "neo4j",
"NEO4J_PASSWORD": "memento_password",
"NEO4J_USERNAME": "neo4j",
"OPENAI_API_KEY": "your-openai-api-key",
"NEO4J_VECTOR_INDEX": "entity_embeddings",
"MEMORY_STORAGE_TYPE": "neo4j",
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"NEO4J_VECTOR_DIMENSIONS": "1536",
"NEO4J_SIMILARITY_FUNCTION": "cosine"
}
}
}
}Memento MCP provides persistent, graph-backed memory for LLMs. It stores entities and their relations in a knowledge graph, enables semantic retrieval and temporal awareness, and exposes an MCP interface for client applications to perform memory operations with high performance and reliability.
You connect to Memento MCP from an MCP client (for example Claude Desktop or similar) to perform memory operations that enrich your conversations with persistent context. Use semantic_search to retrieve concepts by meaning, get_entity_embedding to inspect embeddings, and manage entities and relations with the available tools. The system intelligently chooses the best search strategy (vector, keyword, or hybrid) and maintains a complete history for entities and relationships to support point-in-time queries and decay-based reasoning over time.
Prerequisites: you need a supported runtime for the MCP server (Node.js and npm are typical). You should also have access to a Neo4j 5.13+ database with vector search enabled.
# Clone the MCP repository (or obtain the package from your preferred source)
git clone https://github.com/gannonh/memento-mcp.git
cd memento-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run tests (optional)
npm testTo run the MCP server locally and connect via Claude Desktop, you can use the standard MCP runtime configuration shown below. This starts the server as a local process and exposes the necessary environment variables for memory storage, vector indexing, and embedding service access.
{
"mcpServers": {
"memento": {
"command": "npx",
"args": ["-y", "@gannonh/memento-mcp"],
"env": {
"MEMORY_STORAGE_TYPE": "neo4j",
"NEO4J_URI": "bolt://127.0.0.1:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "memento_password",
"NEO4J_DATABASE": "neo4j",
"NEO4J_VECTOR_INDEX": "entity_embeddings",
"NEO4J_VECTOR_DIMENSIONS": "1536",
"NEO4J_SIMILARITY_FUNCTION": "cosine",
"OPENAI_API_KEY": "your-openai-api-key",
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"DEBUG": "true"
}
}
}
}As an alternative, you can run the MCP server locally by invoking the Node runtime with the built entry point. This form is useful for development and testing.
{
"mcpServers": {
"memento_local": {
"command": "/path/to/node",
"args": ["/path/to/memento-mcp/dist/index.js"],
"env": {
"MEMORY_STORAGE_TYPE": "neo4j",
"NEO4J_URI": "bolt://127.0.0.1:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "memento_password",
"NEO4J_DATABASE": "neo4j",
"NEO4J_VECTOR_INDEX": "entity_embeddings",
"NEO4J_VECTOR_DIMENSIONS": "1536",
"NEO4J_SIMILARITY_FUNCTION": "cosine",
"OPENAI_API_KEY": "your-openai-api-key",
"OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
"DEBUG": "true"
}
}
}
}Create multiple new entities with identifiers, types, and initial observations.
Attach new observations to existing entities to enrich their context.
Remove entities and all their related relations from the graph.
Remove specific observations from entities.
Establish new relations between entities with strength, confidence, and metadata.
Retrieve a specific relation with its enhanced properties.
Modify an existing relation's strength, confidence, and metadata.
Delete specific relations between entities.
Read the entire knowledge graph.
Search for nodes based on textual queries.
Retrieve specific nodes by name.
Find semantically related entities using embeddings and vector similarity.
Get the vector embedding for a specific entity.
Obtain complete version history for an entity.
Obtain complete version history for a relation.
Get the graph state at a specific timestamp.
Get a graph with time-decayed confidence values.