
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
mcp-knowledge-graph
Advanced tools
MCP server enabling persistent memory for AI models through a local knowledge graph
Persistent memory for AI models through a local knowledge graph.
Store and retrieve information across conversations using entities, relations, and observations. Works with Claude Code/Desktop and any MCP-compatible AI platform.
AIM stands for AI Memory - the core concept of this knowledge graph system. The three AIM elements provide clear organization and safety:
.aim directories: Keep AI memory files organized and easily identifiableaim_ tool prefixes: Group related memory functions together in multi-tool setups_aim safety markers: Each memory file starts with {"type":"_aim","source":"mcp-knowledge-graph"} to prevent accidental overwrites of unrelated JSONL filesThis consistent AIM naming makes it obvious which directories, tools, and files belong to our AI memory system.
.aim dir vs _aim file markerTwo different things with similar names:
.aim = Project-local directory name (MUST be named exactly .aim for project detection to work)_aim = File safety marker (appears inside JSONL files: {"type":"_aim","source":"mcp-knowledge-graph"})For project-local storage:
.aim in your project rootmy-project/.aim/memory.jsonlFor global storage (--memory-path):
~/yourusername/.aim/, ~/memories/, ~/Dropbox/ai-memory/, ~/Documents/ai-data/File Location Priority:
.aim - Uses .aim/memory.jsonl (project-local)memory-work.jsonl, memory-personal.jsonlSafety System:
{"type":"_aim","source":"mcp-knowledge-graph"}The master database is your primary memory store - used by default when no specific database is requested. It's always named default in listings and stored as memory.jsonl.
work, personal, health) for organizing specific topics.aim directoriesAdd to your claude_desktop_config.json or .claude.json:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"mcp-knowledge-graph",
"--memory-path",
"/Users/yourusername/.aim/"
]
}
}
}
This creates memory files in your specified directory:
memory.jsonl - Master Database (default for all operations)memory-work.jsonl - Work databasememory-personal.jsonl - Personal databaseIn any project, create a .aim directory:
mkdir .aim
Now memory tools automatically use .aim/memory.jsonl (project-local master database) instead of global storage when run from this project.
Once configured, AI models use the master database by default or can specify named databases with a context parameter. New databases are created automatically - no setup required:
// Master Database (default - no context needed)
aim_create_entities({
entities: [{
name: "John_Doe",
entityType: "person",
observations: ["Met at conference"]
}]
})
// Work database
aim_create_entities({
context: "work",
entities: [{
name: "Q4_Project",
entityType: "project",
observations: ["Due December 2024"]
}]
})
// Personal database
aim_create_entities({
context: "personal",
entities: [{
name: "Mom",
entityType: "person",
observations: ["Birthday March 15th"]
}]
})
// Master database in specific location
aim_create_entities({
location: "global",
entities: [{
name: "Important_Info",
entityType: "reference",
observations: ["Stored in global master database"]
}]
})
Global Setup:
/Users/yourusername/.aim/
├── memory.jsonl # Master Database (default)
├── memory-work.jsonl # Work database
├── memory-personal.jsonl # Personal database
└── memory-health.jsonl # Health database
Project Setup:
my-project/
├── .aim/
│ ├── memory.jsonl # Project Master Database (default)
│ └── memory-work.jsonl # Project Work database
└── src/
aim_create_entities - Add new people, projects, eventsaim_create_relations - Link entities togetheraim_add_observations - Add facts to existing entitiesaim_search_nodes - Find information by keywordaim_read_graph - View entire memoryaim_open_nodes - Retrieve specific entities by nameaim_list_databases - Show all available databases and current locationaim_delete_entities - Remove entitiesaim_delete_observations - Remove specific factsaim_delete_relations - Remove connectionscontext (optional) - Specify named database (work, personal, etc.). Defaults to master databaselocation (optional) - Force project or global storage location. Defaults to auto-detectionUse aim_list_databases to see all available databases:
{
"project_databases": [
"default", // Master Database (project-local)
"project-work" // Named database
],
"global_databases": [
"default", // Master Database (global)
"work",
"personal",
"health"
],
"current_location": "project (.aim directory detected)"
}
Key Points:
Important: Always specify --memory-path to control where your memory files are stored.
Home directory:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"mcp-knowledge-graph",
"--memory-path",
"/Users/yourusername/.aim"
]
}
}
}
Custom location (e.g., Dropbox):
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"mcp-knowledge-graph",
"--memory-path",
"/Users/yourusername/Dropbox/.aim"
]
}
}
}
Auto-approve all operations:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"mcp-knowledge-graph",
"--memory-path",
"/Users/yourusername/.aim"
],
"autoapprove": [
"aim_create_entities",
"aim_create_relations",
"aim_add_observations",
"aim_search_nodes",
"aim_read_graph",
"aim_open_nodes",
"aim_list_databases"
]
}
}
}
"File does not contain required _aim safety marker" error:
{"type":"_aim","source":"mcp-knowledge-graph"} as first line_aim marker or delete and let the system recreate itMemories going to unexpected locations:
.aim folder (uses project-local storage)--memory-path directoryaim_list_databases to see all available databases and current locationls .aim/ or ls /Users/yourusername/.aim/ to see your memory filesToo many similar databases:
MIT
FAQs
MCP server enabling persistent memory for AI models through a local knowledge graph
The npm package mcp-knowledge-graph receives a total of 231 weekly downloads. As such, mcp-knowledge-graph popularity was classified as not popular.
We found that mcp-knowledge-graph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.