xgmem
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xgmem Remember that Alice is a senior developer in the demo-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
xgmem MCP Memory Server
xgmem is a TypeScript-based Model Context Protocol (MCP) server for enabling project-specific and knowledge graph-based memory for Claude, LLM agents, and other tools. It supports storing, retrieving, and managing entities, relations, and observations per project, with a focus on flexibility and cross-project knowledge sharing.
Features
Knowledge graph storage for entities, relations, and observations
CRUD operations via MCP tools
Persistence to disk (memory.json)
Docker and TypeScript support
Related MCP server: Knowledge Graph MCP Server
Use Case
xgmem is ideal for:
Agents and LLMs that need to store and retrieve structured memory (entities, relations, observations) per project.
Cross-project knowledge sharing and migration.
Scalable, disk-persistent, and queryable memory for agent ecosystems.
Usage
MCP Config Example
Add to your MCP config (e.g., for windsurf):
"mcpServers": {
"xgmem": {
"command": "npx",
"args": ["-y", "xgmem@latest"]
}
}Install dependencies
npm installBuild
npm run buildRun (development)
npx ts-node index.tsRun (production)
npm startDocker
docker build -t xgmem-mcp-server .
docker run -v $(pwd)/memories:/app/memories xgmem-mcp-serverThis will persist all project memory files in the memories directory on your host.
How to Save Memory (MCP API)
To save observations (memory) for a project, call the save_project_observations tool via the MCP API:
Example JSON:
{
"name": "save_project_observations",
"args": {
"projectId": "demo-project",
"observations": [
{
"entityName": "Alice",
"contents": [
"Alice joined Acme Corp in 2021.",
"Alice is a software engineer."
]
},
{
"entityName": "Bob",
"contents": [
"Bob joined Acme Corp in 2022.",
"Bob is a product manager."
]
}
]
}
}You can use any compatible MCP client, or send this JSON via stdin if running the server directly.
Tooling and API
xgmem exposes the following tools:
save_project_observationsget_project_observationsadd_graph_observationscreate_entitiescreate_relationsdelete_entitiesdelete_observationsdelete_relationsread_graphsearch_nodessearch_all_projectsopen_nodescopy_memory
See the get_help tool (if enabled) for documentation and usage examples via the MCP API.
Configuration
Set
MEMORY_DIR_PATHenv variable to change the memory storage directory (default:/app/memories).
License
MIT
Available Tools
14 toolsadd_graph_observationsB
Add new observations to existing entities in the project knowledge graph.
Inputs: projectId (required), observations (required).
copy_memoryA
Copy memory entities and their relations from one project to another
Inputs: sourceProjectId (required), targetProjectId (required), entityNames (required).
create_entitiesB
Create multiple new entities in the project knowledge graph
Inputs: projectId (required), entities (required).
create_relationsB
Create multiple new relations between entities in the project knowledge graph
Inputs: projectId (required), relations (required).
delete_entitiesB
Delete multiple entities and their associated relations from the project knowledge graph
Inputs: projectId (required), entityNames (required).
delete_observationsB
Delete specific observations from entities in the project knowledge graph
Inputs: projectId (required), deletions (required).
delete_relationsB
Delete multiple relations from the project knowledge graph
Inputs: projectId (required), relations (required).
get_project_observationsB
Get all observations saved in the separate file for a given projectId.
Inputs: projectId (required).
list_projectsB
List all projects with stored memory
Inputs: no named parameters.
open_nodesB
Open specific nodes in a project's knowledge graph by their names
Inputs: projectId (required), names (required).
read_graphA
Read the entire knowledge graph for a specific project
Inputs: projectId (required).
save_project_observationsB
Save observations for a project to a separate file in the format { projectId, observations: [{ entityName, contents: [...] }] }.
Inputs: projectId (required), observations (required).
search_all_projectsB
Search for nodes across all projects' knowledge graphs based on a query
Inputs: query (required).
search_nodesB
Search for nodes in a specific project's knowledge graph based on a query
Inputs: projectId (required), query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a distinct purpose: CRUD for entities, relations, observations, plus project management and search. No significant overlap.
Mostly snake_case verb_noun pattern consistent. Minor deviations like 'open_nodes' vs 'get_project_observations' and 'copy_memory' instead of 'copy_entities'.
14 tools is well-scoped for a knowledge graph memory system, covering essential operations without excess.
Covers create, delete, read, and search, but missing update operations for entities, relations, and observations. No project deletion either.
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Cloud-hosted MCP server for durable AI memory
Hosted memory for AI agents over MCP. One memory shared by all your agents.
An MCP memory server. One memory your agents share — across models, devices and apps.
Related MCP Servers
- AlicenseAqualityDmaintenanceA TypeScript MCP server that allows querying documents using LLMs with context from locally stored repositories and text files through a RAG (Retrieval-Augmented Generation) system.417MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript MCP server for managing persistent knowledge graphs with entities, directional relations, and time-based observations. It enables users to create, search, and track structured information with built-in concurrency control and JSON file storage.MIT
- AlicenseNot gradedqualityDmaintenanceOpen-source MCP server that gives any LLM long-term memory using a knowledge graph and vector search hybrid. It stores entities, observations, and relationships, enabling semantic recall across sessions with automatic clustering and fail-loud infrastructure.51MIT
- AlicenseNot gradedqualityCmaintenanceA universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.18 PyPI1MIT