Knowledge Graph MCP logo

Knowledge Graph MCP

Tracks concepts, mastery, prerequisites, misconceptions, and spaced-repetition reviews in a SQLite knowledge graph.

Install Knowledge Graph MCP

Run the project’s own setup commands, in order.

Setup steps from the project

knowledge-graph-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npx @smithery/cli install @zcsabbagh/knowledge-graph-mcp --client claude
    
  2. 2. Install
    git clone https://github.com/zcsabbagh/knowledge-graph-mcp.git
    
  3. 3. Run
    cd knowledge-graph-mcp
    
  4. 4. Install
    pip install -e .
    
  5. 5. Start the server
    python -m knowledge_graph_mcp.server
    

Overview

The knowledge-graph-mcp MCP server helps AI agents maintain a personalized learning graph in SQLite. It stores concepts, prerequisite and related-concept edges, multidimensional mastery scores, misconceptions, and SM-2 review schedules. Agents can query learning readiness, gaps, stalled progress, recommendations, and review tasks, then inspect neighborhoods as JSON or Mermaid diagrams. Reach for it when an agent needs to plan, monitor, or adapt a student's learning path.

Use cases

  • Track a student's mastery across recall, application, and explanation
  • Schedule concept reviews from performance ratings
  • Find prerequisites and knowledge gaps before teaching a topic
  • Record misconceptions for targeted remediation
  • Visualize learning paths and concept neighborhoods

Key features

  • SQLite-backed concept and relationship graph
  • SM-2 spaced-repetition scheduling
  • Separate recall, application, and explanation mastery
  • Misconception and learning-gap tracking
  • Prerequisite and next-topic queries
  • JSON and Mermaid subgraph output

Tools14

What Knowledge Graph MCP lets your agent do. Expand a tool for its parameters.

Self-reported~138 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 76d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit11mo agoMost recent push to the default branch.
Tools exposed14Callable tools this server registers over MCP.
Directory activity8 viewsConfig copies, upvotes, and views on AllMCPs.

How Knowledge Graph MCP works

What knowledge-graph-mcp MCP server does

The knowledge-graph-mcp MCP server gives an AI agent a structured store for student learning data. Concepts are represented as nodes, while edges describe prerequisites, extensions, related ideas, misconceptions, applications, and category relationships. Each node can include a domain, description, difficulty, tags, review history, and separate mastery values for recall, application, and explanation.

The server is designed for workflows where an agent needs more than a list of topics. It can identify what a learner should study next, which prerequisites are ready, which concepts need review, and where low mastery is blocking progress. It also records detected misconceptions so later interactions can target specific problems.

How it works

The server runs with FastMCP and uses SQLite for persistence. By default, its database is stored at ~/.knowledge_graph/knowledge.db. Calling add_node creates a concept, and add_edge connects it to another concept with a supported relationship type. update_node changes mastery data and can record a review result or misconception.

A quality score from 0 to 5 supplied to update_node drives SM-2 scheduling. Stronger responses produce longer intervals, while incorrect responses reduce or reset the interval. Overall mastery is calculated from recall, application, and explanation, weighted at 0.3, 0.4, and 0.3 respectively.

Graph and learning queries are exposed through dedicated MCP tools. query_graph handles prerequisite discovery, review queues, struggling or stalled concepts, misconceptions, knowledge gaps, and next-topic recommendations. get_learning_path returns ordered prerequisites for a target. read_subgraph returns a concept neighborhood in JSON, Mermaid, or both, with upstream, downstream, or bidirectional traversal. get_statistics reports progress metrics.

Setup and configuration

The knowledge-graph-mcp MCP server requires Python 3.10 or newer when installed from source. The repository can be cloned and installed with pip install -e ., then started with python -m knowledge_graph_mcp.server from the project directory.

Smithery provides an installation path through its CLI, including a Claude client option, and also hosts a server page. For local use, configure the server as a stdio MCP process by setting the command to python, passing -m knowledge_graph_mcp.server, and supplying the repository as the working directory. The README provides configurations for both Claude Code and Claude Desktop. No environment variables are documented.

Tools and capabilities

Available operations include:

  • Create and update concept nodes with mastery, difficulty, tags, reviews, and misconceptions.
  • Add edges using prerequisite, builds_on, related_to, contradicts, applies_to, or parent_of.
  • Find prerequisites, review-due concepts, learning gaps, misconceptions, struggling areas, stalled progress, and recommended next concepts.
  • Retrieve prerequisite-based learning paths and graph neighborhoods.
  • Produce Mermaid graph visualizations and learning statistics.

Limitations and notes

It also does not specify graph size limits or guarantees for recommendation quality. Relationship edges may include strength, confidence, and reasoning, although the examples only show the source, target, and relationship type.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Knowledge Graph MCP

knowledge-graph-mcp is an MCP server that connects an AI agent to a SQLite-backed student knowledge graph. Its main tools create and update concept nodes, define prerequisite and related-concept edges, query reviews and learning gaps, generate learning paths, inspect subgraphs, and report progress statistics.

Install it with Smithery or from source. Smithery supports `npx @smithery/cli install @zcsabbagh/knowledge-graph-mcp --client claude`; from source, use Python 3.10+, clone the repository, and run `pip install -e .`.

Run `python -m knowledge_graph_mcp.server` from the project root. Configure the MCP client to use `python` with arguments `-m knowledge_graph_mcp.server` and set the working directory to the cloned repository.

Yes, the README provides configuration examples for both Claude Desktop and Claude Code. Each configuration starts the local Python module and points its working directory at the knowledge-graph-mcp checkout.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewKnowledge Graph MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/knowledge-graph-mcp?style=directory)](https://allmcps.com/mcp/knowledge-graph-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/knowledge-graph-mcp"><img src="https://allmcps.com/api/badge/knowledge-graph-mcp?style=directory" alt="Knowledge Graph MCP on AllMCPs" /></a>