Skip to main content
Glama

knowledge-forge

Turn a plain list of links (videos, posts, repos, articles) into a verified, browsable knowledge base — and let your AI coding tool enrich it with grounded, hallucination-checked summaries.

It ships three ways to drive the same pipeline so it works with any AI tool:

  • a CLI (knowledge-forge ...)

  • an MCP server (knowledge-forge-mcp) for Cursor, Claude Code, Claude Desktop, etc.

  • portable skills + editor hooks

What it does

links.txt ──▶ extract (yt-dlp / whisper / youtube-transcript)
          ──▶ classify into categories + pull verified learnings
          ──▶ videos.json ──▶ generate a category/detail canvas (.canvas.tsx)
          ──▶ [optional] rule-based enrichment + an agent queue
          ──▶ agent writes 300-1000 word grounded summaries
          ──▶ validate (anti-hallucination gate) ──▶ apply ──▶ refresh

Key idea: summaries are grounded. A validator enforces word count, per-paragraph token overlap with the source material, source-URL provenance, and a no-engagement-bait rule — so the agent can't invent facts, repos, or URLs.

Related MCP server: Lore Agent

Install

pip install "knowledge-forge[all]"     # CLI + MCP + extraction + transcription
# or pick extras: .[extract] .[transcribe] .[mcp]

Core has no third-party dependencies; the extras add yt-dlp, youtube-transcript-api, faster-whisper, and mcp.

Quick start

knowledge-forge init                 # scaffold config + folders in the current dir
#  ... add URLs to links.txt (see samples/links.sample.txt) ...
knowledge-forge update               # extract + classify + build the canvas
knowledge-forge run                  # rule-based enrich + build the agent queue
knowledge-forge queue                # see what needs an agent-written summary
# agent writes payload.json, then:
knowledge-forge validate --file payload.json
knowledge-forge apply    --file payload.json

Generate a one-command launcher for your OS:

knowledge-forge bootstrap --write    # writes kf.ps1+kf.bat (Windows) or kf.sh (macOS/Linux)

Configuration

Everything is path-driven via knowledge-forge.json (see config.example.json). All relative paths resolve against the config file's directory — no machine- or OS-specific paths are baked in. The config is auto-discovered by walking up from the CWD, or set KNOWLEDGE_FORGE_PROJECT / KNOWLEDGE_FORGE_CONFIG.

Key

Default

Meaning

linksFile / linksDir

links.txt / knowledge-base/links

inputs

dataFile

knowledge-base/videos.json

the knowledge store

transcriptsDir

knowledge-base/transcripts

cached transcripts

queueFile

knowledge-base/.agent-enrich-queue.json

agent work queue

canvasOutput

knowledge-base/canvas/knowledge-base.canvas.tsx

generated UI

enrichMinSummaryWords / MaxSummaryWords

300 / 1000

summary gate

agentEnrichBatchSize

5

entries per agent batch

Use it from your AI tool

Tool

MCP

Hooks

Skills

Cursor

integrations/cursor/mcp.json

integrations/cursor/hooks*

skills/*.cursor/skills/

Claude Code

integrations/claude-code/.mcp.json

skills/*.claude/skills/

any MCP client

run knowledge-forge-mcp

MCP tools: kf_update, kf_refresh, kf_run, kf_queue, kf_list, kf_validate, kf_apply.

See integrations/<tool>/README.md for copy-paste setup.

Project layout

knowledge_forge/      core package (config, pipeline, classify, verify, enrich, canvas, cli)
mcp_server/           FastMCP stdio server
skills/               tool-agnostic SKILL.md files
integrations/         per-tool hooks + MCP config + setup docs
samples/              anonymized example links + data
config.example.json   starter config

License

MIT — see LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A self-improving knowledge agent that provides local retrieval, web research, and structured answer synthesis for Claude Code and VS Code Copilot via MCP. It enables AI tools to manage a project-specific knowledge lifecycle through automated research and indexing.
    12
    9
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to search code by meaning, explore codebase structure, store and query knowledge with temporal facts, and read source code through a set of MCP tools.
    248 npm
    7
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI coding assistants to understand codebase architecture in real time by parsing source code into a relationship graph and exposing call chains, dependencies, class hierarchies, and conventions via MCP tools.
    14
    4
    MIT