Описание
Kng — Model Context Protocol server
README
Knowledge-Narrative-Graph MCP Server - A temporal narrative memory service for AI systems based on the Random Tree Model (RTM).
Overview
The KNG MCP Server implements a sophisticated memory organization system inspired by human memory hierarchies. It organizes information into temporal "books" and "shelves" that compress and preserve knowledge across different time scales (minute → hour → day → week → month → year).
Key Features
- Temporal Hierarchies: Information is organized across multiple time scales with intelligent compression
- Persistent Themes: Important concepts and narratives persist across time boundaries
- Smart Organization: Automatic categorization into active, recent, archived, and reference shelves
- Graph-Based Storage: Built on knowledge graphs with rich node and edge relationships
- MCP Integration: Exposed as Model Context Protocol tools for seamless AI integration
Architecture
The service is built on three core concepts:
- Books: Temporal containers that hold related knowledge graphs organized by time
- Shelves: Categories that organize books by their temporal relevance and purpose
- Persistent Themes: Key concepts that carry forward through time boundaries
Available MCP Tools
kng_create_book- Create a new temporal book from a saved graphkng_get_library_shelves- Get all library shelves organized by categorykng_get_books_on_shelf- Get all books on a specific shelfkng_search_books- Search for books by query and tagskng_get_book- Get a specific book by IDkng_update_book- Update a book when its underlying graph changeskng_delete_book- Safely delete a book while preserving themeskng_get_library_stats- Get library statistics for monitoring
Installation
# Install dependencies
npm install
# Build the server
npm run build
# Run in development mode
npm run dev
# Start the server
npm start
Usage
As an MCP Server
The server runs as a stdio-based MCP server. Configure your MCP client to connect to it:
{
"kng-mcp-server": {
"command": "node",
"args": ["path/to/kng-mcp-server/dist/stdio.js"],
"transport": "stdio"
}
}
Creating a Book
// Example graph structure
const graph = {
metadata: {
id: "graph-001",
title: "AI Research Notes",
description: "Research on temporal memory systems",
tags: ["research", "memory", "AI"],
created: new Date(),
modified: new Date(),
version: "1.0"
},
nodes: new Map([
["node1", { id: "node1", label: "RTM Model", type: "concept" }],
["node2", { id: "node2", label: "Temporal Compression", type: "theme" }]
]),
edges: new Map([
["edge1", { id: "edge1", source: "node1", target: "node2", label: "implements" }]
])
};
// Create book with 'day' time scale
const result = await kng_create_book({
graph: graph,
timeScale: "day"
});
Configuration
The service uses RTM-inspired parameters:
- maxBranchingFactor: Maximum children per temporal node (default: 4)
- maxNarrativeDepth: Maximum temporal hierarchy depth (default: 6)
- compressionTargets: Target compression ratios per time scale
- continuityRules: Rules for determining what persists across time boundaries
Memory Organization
Shelf Categories
- Active: Currently developing stories and themes (< 1 day old)
- Recent: Recently completed narratives (1-7 days old)
- Reference: Persistent themes that span long periods
- Archived: Older narratives preserved for reference (> 30 days)
Temporal Scales
- Minute: No compression, full detail
- Hour: Slight compression (1.2x)
- Day: Moderate compression (2x)
- Week: Significant compression (4x)
- Month: High compression (8x)
- Year: Maximum compression (16x)
Development
# Type checking
npm run type-check
# Build
npm run build
# Development with hot reload
npm run dev
Integration with Aura Framework
This MCP server is designed to integrate with the Aura AI framework, providing:
- Enhanced search capabilities through structured narratives
- Deeper emotional context via persistent themes
- Enriched user profiles with long-term memory
- Automated memory organization with intelligent archiving
License
MIT
Contributing
Contributions are welcome! Please ensure all TypeScript types are properly defined and follow the existing code structure.
Установка Kng
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/angrysky56/kng-mcp-serverFAQ
Kng MCP бесплатный?
Да, Kng MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Kng?
Нет, Kng работает без API-ключей и переменных окружения.
Kng — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Kng в Claude Desktop, Claude Code или Cursor?
Открой Kng на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
автор: UnylyTemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectServer Sequential Thinking
MCP server for sequential thinking and problem solving
автор: GitHub ActionsAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
автор: blustAIdemo
demo — MCP server via Smithery
автор: yoojoohans-jpgServer For Power BI
Enables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.
автор: Mitsubishi-FusoCompare Kng with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
