# knowledge-graph-mcp [Health: Active]

**Category:** 🎓 Education  
**Repository:** https://github.com/zcsabbagh/knowledge-graph-mcp  
**GitHub Stars:** 2  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/knowledge-graph-mcp

## Description
Knowledge graph MCP for student learning with spaced repetition and mastery tracking

## Tools
Capabilities this server exposes over MCP:

- **prerequisite** — Must learn source before target
- **builds_on** — Target extends source concept
- **related_to** — Concepts are connected
- **contradicts** — Common misconception
- **applies_to** — Application domain
- **parent_of** — Category hierarchy
- **prerequisites** — All prerequisites for a concept
- **ready_to_learn** — Concepts where prereqs are mastered
- **due_for_review** — Needs review based on schedule
- **struggling** — High difficulty + low mastery
- **stalled** — Multiple reviews, no improvement
- **misconceptions** — Concepts with detected misconceptions
- **knowledge_gaps** — Low mastery blocking progress
- **next_recommended** — Best concept to study next

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/zcsabbagh/knowledge-graph-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npx @smithery/cli install @zcsabbagh/knowledge-graph-mcp --client claude
```

2. Install:

```sh
git clone https://github.com/zcsabbagh/knowledge-graph-mcp.git
```

3. Run:

```sh
cd knowledge-graph-mcp
```

4. Install:

```sh
pip install -e .
```

5. Start the server:

```sh
python -m knowledge_graph_mcp.server
```

## Documentation

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

_Full upstream README: https://allmcps.com/mcp/knowledge-graph-mcp/readme_

