An MCP server that provides AI agents with structured context through SQLite-backed graph traversal. Supports agent coordination, context validation, and hierarchical knowledge retrieval through the Model Context Protocol.
Problem
AI agents working on complex tasks need structured context — not just flat text, but hierarchical relationships between concepts, decisions, and artifacts. Without this, agents either lose track of relevant context or require expensive re-prompting with entire conversation histories.
Approach
ContextHub models project knowledge as a graph stored in SQLite with JSON1 extensions. Nodes represent concepts, decisions, files, and artifacts. Edges represent relationships like “depends on,” “implements,” and “supersedes.” The MCP server exposes graph traversal as tools that Claude Desktop or other MCP clients can call to retrieve relevant context before making decisions.
What’s Implemented
- SQLite graph storage with JSON1 extensions for flexible node properties
- MCP tool interface — graph queries exposed as callable tools via the Model Context Protocol
- Hierarchical traversal — depth-limited graph walks that return contextually relevant subgraphs
- Context validation — checks for stale references, circular dependencies, and orphaned nodes
- Agent coordination — multiple agents can read from and write to the shared context graph
What This Demonstrates
Graph database design within SQLite constraints, MCP server implementation for AI agent tooling, and structured approaches to the context management problem in multi-agent systems.