KnowledgeGraph MCP Server

by n-r-w

24 stars
401 downloads
Not rated
GitHub

About

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

Details

Author
n-r-w
GitHub stars
24
Downloads
401
Categories
Database, Other, AI, Knowledge Base

- Multiple storage backends: PostgreSQL (recommended) or SQLite (local file)
- Project separation: keep different projects isolated
- Better search: fuzzy search and pagination
- Entities, relations, observations, and tags for rich knowledge modeling
- Performance optimizations: entity loading limits and chunked processing
- Comprehensive input validation to prevent errors

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name KnowledgeGraph MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the server via npx (npx knowledgegraph-mcp --help) or Docker (build from source). Choose SQLite (default, no setup) or PostgreSQL. Configure your client (Claude Desktop or VS Code) by adding the server definition to the MCP configuration file, optionally setting environment variables for storage type, connection strings, and search limits. Restart the client and test with commands like “Remember that I prefer morning meetings.”

search_knowledge

SEARCH ENTITIES by TEXT or TAGS across names, types, observations, and tags. Supports exact/fuzzy search modes, multiple query batching, tag filtering, and pagination. Returns entities and their relationships. MUST USE BEFORE create_entities, add_observations, and create_relations to verify entity existence. PAGINATION: Use page parameter to navigate large result sets (page=0 for first page, page=1 for second, etc.).

create_entities

CREATE 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.

add_observations

ADD new factual observations to existing entities. Requires exact entity names that exist in the knowledge graph. Use search_knowledge first to verify entity existence.

create_relations

CREATE directional RELATIONSHIPS between existing entities. Both source and target entities must exist. Use active voice relationship types (e.g., 'works_at', 'manages', 'depends_on'). Verify entity existence with search_knowledge first.

delete_entities

Permanently 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_observations

DELETE 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_relations

DELETE specific RELATIONSHIPS between entities while preserving both entities. Use for updating connection status when relationships change (job changes, project completion, etc.).

read_graph

RETRIEVE 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.

open_nodes

RETRIEVE 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.

add_tags

ADD 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.

remove_tags

REMOVE 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).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "knowledgegraph mcp server": {
            "knowledgegraph-mcp": {
                "command": "npx",
                "args": [
                    "knowledgegraph-mcp",
                    "--help"
                ]
            }
        }
    }
}

McpServers

{
    "knowledgegraph-mcp": {
        "command": "npx",
        "args": [
            "knowledgegraph-mcp",
            "--help"
        ]
    }
}

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)
```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.