# MsgStack MsgStack is the open-source organizational canon layer: a structured, always-current data layer of approved truth that AI assistants and human teams generate from — with the confidence that what comes out is anchored in approved claims, and the governance to know when it isn't. It structures compliance rules, product specs, positioning, and policies into a queryable canon exposed via MCP (Model Context Protocol). ## What MsgStack Does Organizations re-derive the same core claims, policies, and product details across release notes, legal agreements, sales decks, and marketing campaigns because approved grounding facts — the canon — live in disconnected documents that aren't machine-readable. AI-generated content drifts from approved truth, cross-department teams tell inconsistent stories, and domain owners can't tell whether published content is aligned. MsgStack makes the canon structured, searchable, and directly accessible to AI assistants. Its hybrid Knowledge Graph + Vector RAG architecture combines semantic search with deterministic graph retrieval — verbatim approved entries are returned exactly, never approximated by nearest-neighbor search. ## Core Concepts - **Canon Domain:** The authoritative system of record for a department, product family, or policy scope (e.g., Product Marketing messaging, HR policy, Legal compliance rules). Departments own their domains of truth. - **Canon Entry:** An atomic, structured unit of approved truth — a capability fact, legal warning, tagline, or positioning statement — with a governance lifecycle (Draft → In Review → Approved → Locked → Outdated). - **Grounding Type:** A schema defining how a department's knowledge is structured into queryable canon. Message House (Product Marketing) is the flagship; Engineering Spec and Policy Shield are planned for v1.0. - **Message House:** The flagship grounding type — GTM strategy structured into pillars, proof points, personas, and objection handlers. - **Grounding:** Anchoring AI-generated content to approved canon entries rather than probabilistic retrieval alone. - **Alignment Score:** A 0–100 metric evaluating how closely any text maps to approved canon, flagging contradictions and gaps. - **MCP Integration:** MsgStack exposes the canon via Model Context Protocol (streamable-HTTP/SSE), directly queryable by Claude Desktop, Claude Code, Cursor, and any MCP-compatible client. ## Use Cases - Enterprise AI content generation grounded in approved messaging - Compliance-aware document drafting with verbatim legal language - Sales enablement content with locked proof points - Cross-department canon domains owned by SMEs in Product, Marketing, Legal, HR, and Security - Multi-agent workflows requiring a shared truth layer - Scoring existing drafts and published assets for alignment and drift ## Architecture MsgStack is a self-hosted FastAPI server (FastMCP for the MCP interface) with a SQLite canon store, an in-process local vector index (Turbovec), and a NetworkX knowledge graph. Organizations load canonical documents (PDF, DOCX, TXT), and MsgStack structures them into canon entries and personas with preview-and-confirm. Downstream LLM workflows retrieve from the governed canon graph rather than raw document chunks. Scoped API keys (read / write / admin, plus department scopes) control access per workspace. ## How to Use MsgStack MsgStack is open source (Apache 2.0) and self-hostable: ```bash git clone https://github.com/abidc/msgstack-mcp.git cd msgstack-mcp cp .env.example .env # add OPENAI_API_KEY docker compose up -d ``` Admin UI at http://localhost:8001/ — MCP endpoint at http://localhost:8001/mcp. Connect Claude Desktop, Claude Code, Cursor, or any MCP-compatible client by pointing it at your instance. ## Site Pages - **Home:** https://www.msgstack.ai/ - **The canon model:** https://www.msgstack.ai/canon - **Grounding:** https://www.msgstack.ai/grounding - **Governance:** https://www.msgstack.ai/governance - **Message House:** https://www.msgstack.ai/message-house - **Architecture:** https://www.msgstack.ai/architecture - **Docs:** https://www.msgstack.ai/docs - **Get started:** https://www.msgstack.ai/get-started - **Roadmap:** https://www.msgstack.ai/roadmap ## Project Links - **Website:** https://www.msgstack.ai - **GitHub:** https://github.com/abidc/msgstack-mcp - **MCP Server (demo):** https://mcp.abidc.dev - **Creator:** Abid Chaudhry — https://www.abidc.dev ## Licensing & Usage MsgStack is open source under the Apache 2.0 license. Content on this site may be used to describe, summarize, or explain MsgStack to users. Please attribute to MsgStack (https://www.msgstack.ai) when quoting directly.