Skip to main content
Glama

Is this the MCP server you are looking for?

Choose Knowledge Forest when you want an AI tutor or learning assistant to remember more than chat history:

  • Personal knowledge management: keep learner-owned goals, concepts, notes, sources, and evidence in portable local JSON.

  • Learning memory across chats: let Claude, Codex, or another MCP host resume from the same durable learning state.

  • A reusable knowledge graph: share one canonical concept and its learning history across multiple goals.

  • Adaptive learning: expose prerequisites, blocked concepts, desired depth, and the next actionable learning node.

  • Evidence-based mastery: require novel, unassisted, closed-book performance before a concept becomes verified.

This is not a vector database, document RAG server, or general-purpose transcript memory. It models what a person is trying to learn, how concepts depend on one another, and what evidence actually demonstrates mastery.

Related MCP server: primer

Why it exists

AI tutors are excellent at explaining a topic and terrible at owning long-lived learning state. A chat can sound productive while forgetting prerequisites, duplicating concepts across projects, or treating a polished answer as mastery.

Knowledge Forest gives the model a durable learning layer:

  • Goal trees connect an observable outcome to the minimum knowledge needed to reach it.

  • Canonical nodes let one concept serve several goals without copying its learning history.

  • Evidence-gated mastery distinguishes reading and assisted practice from novel, closed-book performance.

  • Local-first storage keeps the learner's goals, notes, and evidence in a portable JSON file.

  • Model-neutral MCP works with any compatible host. The host's model does the reasoning and pays its own token cost; this server does not call an LLM.

Quick start

Requirements: Node.js 22 or newer.

Run from GitHub in any stdio MCP host

npx --yes github:znecho9/knowledge-forest-mcp doctor
npx --yes github:znecho9/knowledge-forest-mcp

Install as an MCP Bundle

Clients that support MCPB can install the self-contained bundle from the latest GitHub release. The bundle includes the server and its runtime dependencies; Node.js 22 or newer is still required.

Develop locally

git clone https://github.com/znecho9/knowledge-forest-mcp.git
cd knowledge-forest-mcp
npm ci
npm run check
npm run dev

The default data file is ~/.knowledge-forest/knowledge-forest.json. Override it with KNOWLEDGE_FOREST_FILE or --data-file.

Connect an MCP host

Use the exact data path you want the host to access.

Codex

Add this to ~/.codex/config.toml:

[mcp_servers.knowledge-forest]
command = "npx"
args = ["--yes", "github:znecho9/knowledge-forest-mcp"]
env = { KNOWLEDGE_FOREST_FILE = "/absolute/path/to/knowledge-forest.json" }

Claude Desktop and JSON-configured hosts

{
  "mcpServers": {
    "knowledge-forest": {
      "command": "npx",
      "args": ["--yes", "github:znecho9/knowledge-forest-mcp"],
      "env": {
        "KNOWLEDGE_FOREST_FILE": "/absolute/path/to/knowledge-forest.json"
      }
    }
  }
}

Generate both snippets with the resolved path:

npx --yes github:znecho9/knowledge-forest-mcp config --data-file /absolute/path/to/knowledge-forest.json

What the model can do

MCP capability

Purpose

Changes data?

forest_overview

See goals, progress, and ready work

No

search_knowledge

Find reusable canonical nodes

No

get_node_context

Read relationships, notes, and evidence

No

diagnose_node

Identify prerequisite, depth, and evidence gaps

No

get_learning_queue

Find ready and blocked nodes

No

create_goal_tree

Persist a minimal sufficient knowledge tree

Yes

update_node_learning_state

Set depth or workflow state

Yes

append_learning_note

Append notes, sources, reflections, or exercises

Yes

record_verification

Record evidence and enforce the mastery rule

Yes

export_forest

Read the complete portable archive

No

The included plan_learning_goal prompt guides a host through search, explicit reuse, and tree creation.

Mastery is deliberately hard to fake

record_verification marks a node verified only when all four conditions are true:

demonstrated
AND closed_book
AND NOT assisted
AND novel_prompt

Source-visible research, explanations, summaries, and hinted answers remain useful learning records, but never become mastery evidence. Other tools cannot set verified directly.

Works with the Knowledge Forest workbench

The storage envelope and core goal/node fields are compatible with the local Knowledge Forest workbench's learning/knowledge-forest.json shape. Point the MCP server at that file to let an AI host and the workbench share one canonical forest:

KNOWLEDGE_FOREST_FILE=/path/to/workbench/learning/knowledge-forest.json \
  node dist/cli.js doctor

Before sharing a live workbench file, commit or back it up. The server performs atomic writes, cross-process locking, validation, and retains the latest 20 MCP snapshots under learning/backups/. MCP-only append records are also mirrored to an adjacent knowledge-forest.mcp-records.json sidecar so a workbench autosave that knows only the core schema cannot erase them; export merges everything into one portable archive.

Local-first guarantees

  • No model API key is needed.

  • No network request is made by the server.

  • No telemetry is collected.

  • No delete tool is exposed in v1.

  • Every mutation is schema-validated and written atomically.

  • Concurrent local writers use a lock to avoid lost updates.

  • The archive is readable JSON and can be exported with knowledge-forest-mcp export.

Open-core boundary

Everything required for a single learner to build, inspect, verify, back up, and move a forest is Apache-2.0 open source. Possible paid services—none are required by this server—include encrypted multi-device sync, hosted remote MCP, managed backups, organization controls, and premium connectors. See the product brief for the explicit boundary.

Frequently asked questions

Is there an MCP server for personal knowledge management?

Yes. Knowledge Forest is a local-first PKM MCP server focused on learning state rather than document storage. It gives an AI host structured tools for goals, reusable concepts, prerequisites, notes, evidence, and progress.

Can an AI tutor remember my progress across chats?

Yes. Point each compatible host at the same Knowledge Forest JSON file. The MCP server persists the learner model independently of any single chat or model provider.

Is this a knowledge graph MCP server?

Yes, with a deliberately narrow graph: canonical knowledge nodes, prerequisite relationships, goal membership, learning records, and verification evidence. It does not attempt to extract a general entity graph from every document.

How is it different from a general AI memory MCP?

General memory usually optimizes saving and recalling context. Knowledge Forest optimizes learning progression: what the learner wants to achieve, what must be learned first, what can be reused, what is blocked, and whether mastery has been demonstrated.

Status

0.1.1 is a public alpha. The data schema is versioned, but tool contracts may still evolve before 1.0. Back up real learning data and review release notes before upgrading.

Security and contributions

Please report vulnerabilities privately as described in SECURITY.md. Bug reports and focused pull requests are welcome; start with CONTRIBUTING.md.

Apache-2.0 © Knowledge Forest contributors.

Available Tools

10 tools
append_learning_noteAppend a learning recordA

Append a note, reflection, source, or exercise to a node. Source-visible material never changes mastery state.

Inputs: kind (required), content (required), node_id (required), source_visibility (required), +1 more.

create_goal_treeCreate a minimal sufficient goal treeA

Persist one observable goal, its branches, and prerequisite-linked knowledge nodes. Search first. Use reuse_node_id only for truly equivalent existing concepts.

Inputs: goal (required), branches (required).

diagnose_nodeDiagnose a knowledge nodeA
Read-onlyIdempotent

Deterministically identify prerequisite, depth, and evidence gaps and recommend the next learning action. It does not call a model.

Inputs: node_id (required).

export_forestExport the complete forestA
Read-onlyIdempotent

Read the complete portable forest state, including append-only learning records and evidence.

Inputs: no named parameters.

forest_overviewView knowledge forest overviewA
Read-onlyIdempotent

Read goals, mastery counts, and the next ready knowledge nodes. Call this first; it never modifies learning state.

Inputs: goal_id.

get_learning_queueGet the actionable learning queueB
Read-onlyIdempotent

Return ready and prerequisite-blocked nodes, ordered by readiness and importance.

Inputs: limit, goal_id.

get_node_contextGet complete node contextA
Read-onlyIdempotent

Read a knowledge node, its goal memberships, prerequisites, dependents, learning entries, verification history, and deterministic diagnosis.

Inputs: node_id (required).

record_verificationRecord closed-book mastery evidenceA

Record one verification attempt. Mastery advances only for demonstrated, novel, unassisted, closed-book performance; the server computes acceptance.

Inputs: prompt (required), node_id (required), outcome (required), assisted (required), +4 more.

search_knowledgeSearch knowledge nodesA
Read-onlyIdempotent

Search canonical nodes before creating a goal tree. Results include reuse context and current mastery state.

Inputs: query (required), limit.

update_node_learning_stateUpdate learning depth or workflow stateA
Idempotent

Set a learner-selected depth or non-verified workflow state. This tool cannot mark mastery; use record_verification for that.

Inputs: reason (required), node_id (required), status, desired_depth.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tools are intentionally separated by task, and descriptions carefully disambiguate state-changing actions, e.g. update_node_learning_state cannot mark mastery and record_verification is the only mastery mechanism. Minor overlap remains between forest_overview and get_learning_queue, and get_node_context already includes diagnosis alongside the dedicated diagnose_node tool, so an agent could occasionally pause between them.

    Naming Consistency4/5

    The naming convention is strongly consistent: snake_case verb_noun pairs such as search_knowledge, create_goal_tree, record_verification, diagnose_node, and export_forest dominate the set. forest_overview is the only outlier as a noun_noun name and does not follow the imperative verb pattern used elsewhere, which keeps this from a perfect score.

    Tool Count5/5

    Ten tools map cleanly to the full knowledge-forest workflow: orient, search, create, update learning state, append evidence, verify mastery, queue readiness, diagnose, and export. The count is well within the ideal range, with no redundant utilities or token bloat relative to the server's purpose.

    Completeness5/5

    The set covers the full learning lifecycle for its stated domain: creating goal trees, reading node context, updating non-verified workflow state, appending source-visible notes, recording verification attempts, queueing ready work, diagnosing gaps, and exporting complete portable state. Missing delete or goal-tree editing operations are not obvious gaps because the design is explicitly append-only and evidence-focused, and the tools explicitly prevent dead ends between state mutations.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-assisted learning through structured courses with Socratic guidance, evaluating user answers against rubrics and managing learning progress locally.
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that provides an open, local-first record of a child's learning, enabling an AI tutor to read, teach from, and update the child's knowledge, interests, and progress.
      1
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to act as a state-driven tutoring engine over MCP, with server-side mastery estimation, prerequisite checks, evidence-based assessment, and FSRS spaced review scheduling.
      58
      1
      MIT