Atlas / MCP servers / n-r-w / KnowledgeGraph

KnowledgeGraphBLOCK

mcp/n-r-w/knowledgegraph

MCP server for enabling persistent knowledge storage for Claude through a knowledge graph with multiple storage backends and fuzzy search

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
10 2r · 4w · 4d
Transport
stdio
License
MIT
Stars
26
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://mseep.ai/app/n-r-w-knowledgegraph-mcp)

I've become disillusioned with automated context management tools like this, as it's nearly impossible to control. After a while, I always have to manually clean up the mess or correct inappropriate LLM notes. Instead, I created a tool that gives the LLM agent access to dynamically loaded context. However, the context itself is user-created: https://github.com/n-r-w/agent-standards-mcp

KnowledgeGraph MCP Server

A simple way to give LLMs persistent memory across conversations. This server lets Claude or vscode remember information about you, your projects, and your preferences using a knowledge graph.

Key Features:

  • Multiple Storage Backends: PostgreSQL (recommended) or SQLite (local file)
  • Project Separation: Keep different projects isolated (auto-detected using prompts)
  • Better Search: Find information with fuzzy search and pagination

Complete Setup Guide

Follow these steps in order to get the knowledge graph working with Claude:

Step 1: Choose Your Installation Method

Option A: NPX (Easiest - No download needed)

# Test that it works
npx knowledgegraph-mcp --help

Option B: Docker

# Clone and build
git clone https://github.com/n-r-w/knowledgegraph-mcp.git
cd knowledgegraph-mcp
docker build -t knowledgegraph-mcp .

Step 2: Choose Your Database

SQLite (Default - No setup needed):

  • No database installation required
  • Database file created automatically in [you home folder]/.knowledge-graph/
  • Perfect for personal use and most scenarios
  • This is the default backend

PostgreSQL (For advanced users):

  • Install PostgreSQL on your system
  • Create a database: CREATE DATABASE knowledgegraph;
  • Better for production use with multiple concurrent users

Step 3: Configure client

Claude Desktop

Edit your Claude Desktop configuration

Read from source at commit 270414469cf1OBSERVED · 2026-10-09
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add knowledgegraph-mcp -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "knowledgegraph-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}
03

Exposed tools (10)

2 read · 4 write · 4 destructive. Blast radius: 4 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
add_observationswriteADD new factual observations to existing entities. Requires exact entity names that exist in the knowledge graph. Use search_knowledge first to verify entity existence.
add_tagswriteADD categorical TAGS to existing entities for filtering and organization. Tags are case-sensitive exact-match labels used for quick retrieval with search_knowledge. Common categories: status, priority, type, domain.
create_entitieswriteCREATE new entities with OBSERVATIONS and optional tags. MANDATORY: If creating multiple entities, use a SINGLE call (batch). Each entity requires a unique name, type, and at least one observation. Ignores existing names. Use search_knowledge first.
create_relationswriteCREATE directional RELATIONSHIPS between existing entities. Both source and target entities must exist. Use active voice relationship types (e.g.,
delete_entitiesdestructivePermanently DELETE entities and all their RELATIONSHIPS. This action is irreversible and cascades to remove all connections. Verify entity existence with search_knowledge first. Consider delete_observations for partial updates.
delete_observationsdestructiveDELETE specific OBSERVATIONS from entities while preserving the entity, its relationships, and tags. Use for correcting errors or removing outdated facts without deleting the entire entity.
delete_relationsdestructiveDELETE specific RELATIONSHIPS between entities while preserving both entities. Use for updating connection status when relationships change (job changes, project completion, etc.).
open_nodesreadRETRIEVE specific ENTITIES by exact names along with their interconnections. Returns detailed information about the specified entities and relationships between them. Requires knowing exact entity names.
read_graphreadRETRIEVE the complete KNOWLEDGE GRAPH with all entities and relationships for a project. Returns comprehensive view of the entire network structure. Can be large for projects with many entities.
remove_tagsdestructiveREMOVE specific TAGS from existing entities to maintain accurate categorization. Use for status updates, priority changes, or cleaning up outdated classifications. Tags must match exactly (case-sensitive).
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (6 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
found

Findings (14)

HIGHHard-coded secrets · secret.db_uri · CWE-798, CWE-321
.env.example:23
# For PostgreSQL testing: postgresql://postgres:password@localhost:5432/knowledgegraph_test
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
README.md:101
"KNOWLEDGEGRAPH_CONNECTION_STRING": "postgresql://postgres:yourpassword@localhost:5432/knowledgegraph"
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
README.md:163
"-e", "KNOWLEDGEGRAPH_CONNECTION_STRING=postgresql://postgres:[email protected]:5432/knowledgegraph",
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
README.md:183
"-e", "KNOWLEDGEGRAPH_CONNECTION_STRING=postgresql://postgres:[email protected]:5432/knowledgegraph",
MEDIUMHard-coded secrets · secret.db_uri · CWE-798, CWE-321
docs/TESTING.md:171
KNOWLEDGEGRAPH_TEST_CONNECTION_STRING="postgresql://postgres:password@localhost:5432/knowledgegraph_test"
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_entities, delete_observations, delete_relations, remove_tags
Why it matters. 4 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
search/strategies/base-strategy.ts:1
import { Entity } from '../../core.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
search/strategies/postgresql-strategy.ts:3
import { Entity } from '../../core.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
search/strategies/sqlite-strategy.ts:3
import { Entity } from '../../core.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
storage/providers/sql-storage.ts:4
import { KnowledgeGraph, Entity, Relation } from '../../index.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
storage/providers/sqlite-storage.ts:3
import { KnowledgeGraph, Entity, Relation } from '../../core.js';
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
better-sqlite3, fuse.js, pg, @types/better-sqlite3, @types/jest, @types/node, @types/pg, jest
Why it matters. 11 dependency range(s) float
Fix. pin exact versions or ship a lockfile
INFOPrompt injection · prompt.authority_framing · CWE-94, CWE-1427
prompts/all-in-one.md:127
- **Current project entities**: Full access for modifications
INFOPrompt injection · prompt.authority_framing · CWE-94, CWE-1427
prompts/knowledge-graph.md:127
- **Current project entities**: Full access for modifications

Gates applied: no_behavioural_pass.

Audited 2026-10-09 · audit v0.4.1 · source sha 270414469cf1full audit observations/trust-audit/mcp-server/n-r-w__knowledgegraph.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-09270414469cf1BLOCKD69first audit
06

Questions

What is the KnowledgeGraph MCP server?

MCP server for enabling persistent knowledge storage for Claude through a knowledge graph with multiple storage backends and fuzzy search

What tools does KnowledgeGraph expose?

10 in total: 2 read-only, 4 that write, and 4 that can delete or overwrite (delete_entities, delete_observations, delete_relations, remove_tags). Every one is listed on this page with its risk.

Is KnowledgeGraph safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 4 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does KnowledgeGraph need?

No credential environment variables were found in its source, so it appears to need none.

How does KnowledgeGraph run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as knowledgegraph-mcp at 1.7.4.

How current is this page?

The grade is for one exact copy of the source (270414469cf1), read on 2026-10-09. The repository is watched and re-audited when it changes.

Advertisement