This server provides document management and knowledge graph integration capabilities, focusing on structured document editing and semantic knowledge storage.
Knowledge Graph Integration (Core Functionality)
Document Ingestion: Synchronize RBT and Markdown documents to Neo4j-backed Graphiti knowledge graph with automatic semantic chunking and incremental updates
Smart Chunking: Automatically split documents by structure (H3 headings for Markdown, sections for RBT)
Knowledge Search: Search for memory nodes (entities, preferences, procedures) and facts (relationships) across the graph
Episode Management: Retrieve and delete memory episodes stored in the graph
Entity Relationships: Query and delete entity relationship edges by UUID
Graph Operations: Clear entire knowledge graph when needed
Document Editing & Structure Management (Archived - Available via v-with-editor tag)
Structure Retrieval: Get lightweight document outlines and read specific sections or blocks by ID
Creation: Create documents from templates with placeholder replacement, add sections and blocks (paragraph, code, list, table)
Modification: Update document metadata, section summaries, and block content
Specialized Operations: Append items to lists, update or append table rows
Maintenance: Delete blocks and clear document cache
Supported Document Types: RBT documents (REQ, BP, TASK), Markdown documents, and template-based creation
KnowledgeSmith MCP Server
MCP Server for Graphiti memory and document chunking. Previously included RBT document editing tools (now archived).
📦 Archive Notice
RBT Document Editor Tools (Archived 2025-10-09)
The RBT document editing功能已於 2025-10-09 封存,改用原生 Claude Code Read/Edit/Write 工具以降低維護成本和 token 使用。
封存內容:
document_service.py - 文件服務
document_parser.py - 文件解析器
11 個 editor MCP 工具(get_outline, read_content, update_block 等)
templates/ - 文件模板
cache.py - 文件快取
保留功能:
✅ chunking/ - 文件分塊與同步功能
✅ graphiti_tools.py - Graphiti 記憶體功能(8 個工具)
如何恢復封存的代碼:
🎯 Current Features
Graphiti Knowledge Graph Integration
Intelligent Chunking: Automatically split documents into semantic chunks based on document structure (sections for RBT, H3 headings for Markdown)
Incremental Sync: Only update changed chunks, preserving unchanged content
Neo4j Backend: Store document chunks as episodes in Graphiti knowledge graph
graphiti-memory Compatible: Drop-in replacement with same search_nodes/search_facts API
8 MCP Tools: add_document, search_memory_nodes, search_memory_facts, get_episodes, delete_episode, get_entity_edge, delete_entity_edge, clear_graph
📦 Installation
Prerequisites
1. Setup Neo4j Database
Using Docker (recommended):
Verify at: http://localhost:7474
2. Get OpenAI API Key
Required for Graphiti embeddings and graph operations.
Install MCP Server
Option 1: Install from source (uv)
Option 2: Direct installation
🚀 Quick Start
1. Configure Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Required Environment Variables:
RBT_ROOT_DIR: Root directory for document comparison (required for add_document tool)NEO4J_URI,NEO4J_USER,NEO4J_PASSWORD: Neo4j database connectionOPENAI_API_KEY: OpenAI API key for Graphiti embeddings
Or use full uv command:
2. Set Environment Variables (Optional - if not using Claude Desktop)
3. Test the Server
📚 Available MCP Tools
Document Management
add_document - Sync documents to knowledge graph with automatic chunking
Supports Markdown (chunked by H3 headings) and RBT documents
Incremental sync: only updates changed chunks
Knowledge Graph Query
search_memory_nodes - Search knowledge graph nodes (entities, preferences, procedures)
search_memory_facts - Search knowledge graph facts (relationships)
get_episodes - Retrieve recent memory episodes
Data Management
delete_episode - Delete specific episode
get_entity_edge - Get entity relationship edge by UUID
delete_entity_edge - Delete entity relationship edge
clear_graph - Clear all data from knowledge graph (⚠️ irreversible)
🔗 Graphiti Integration Usage
Adding Documents to Knowledge Graph
General Markdown Documents:
RBT Documents (REQ/BP/TASK):
Searching Knowledge
Difference from graphiti-memory MCP
This MCP server extends the original graphiti-memory MCP with document chunking capabilities:
Original graphiti-memory: Stores entire documents as single episodes
This MCP (graphiti-chunk-mcp): Automatically chunks documents into semantic sections
RBT documents: Split by section (sec-*)
Markdown documents: Split by H3 headings (###)
Incremental updates: Only sync changed chunks
API Compatibility: All search_nodes, search_facts, get_episodes functions maintain the same interface as graphiti-memory.
📖 Documentation
Markdown Writing Guide - How to write Markdown documents that work well with the chunker
MCP Installation Guide - Detailed installation and usage instructions
🧪 Development
Install development dependencies:
Run tests:
Test coverage:
📝 License
MIT License
🤝 Contributing
Contributions welcome! Please open an issue or submit a pull request.