Developer documentation ✦MCP · Docker · Apache 2.0

Wire the canon
into your agents.

MsgStack is an MCP server. It exposes your organizational canon as a set of tools that Claude, Cursor, and any MCP-compatible client can call to ground their output in approved truth.

001Quick start

Self-hosted, in one compose file.

MsgStack is Apache 2.0 licensed and fully self-hostable — the MCP server, admin UI, knowledge graph, and artifact engine all run from a single Docker Compose stack. No cloud account, no vendor dependency.

  • Admin UI at http://localhost:8001/
  • MCP endpoint at http://localhost:8001/mcp
  • SQLite store, local vector index — zero external services

Terminal — Docker (recommended)

git clone https://github.com/abidc/msgstack-mcp.git
cd msgstack-mcp
cp .env.example .env
# add OPENAI_API_KEY to .env (required)

docker compose up -d

Prefer bare Python? Clone the repo, create a venv, and run pip install -r requirements.txt — full instructions in the repository README.

002Connect your agent

One URL, any MCP client.

MsgStack speaks MCP over streamable-HTTP and SSE. Point your client at the hosted demo server or at your own instance — the examples below use https://mcp.abidc.dev/mcp; replace it with http://localhost:8001/mcp when self-hosting.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "msgstack": {
      "url": "https://mcp.abidc.dev/mcp"
    }
  }
}

Claude Code — terminal

claude mcp add \
  --transport http \
  msgstack \
  https://mcp.abidc.dev/mcp

Cursor — .cursor/mcp.json

{
  "mcpServers": {
    "msgstack": {
      "url": "https://mcp.abidc.dev/mcp"
    }
  }
}

Reload the client and MsgStack appears as a connected server. Start with list_canon_domains to discover the available truth frameworks, then set_active_domain to pin your grounding context.

003MCP tool reference

Every tool the server exposes, on the record.

Three categories: grounding tools for retrieval and session context, artifact tools for grounded generation, and admin tools for governance and audit.

Grounding· 9 tools
list_canon_domains
Enumerate every canon domain in the workspace, with entry counts and lock status.
search_canon
Hybrid retrieval across the canon — vector search plus keyword reranking, with a min_confidence control.
get_canon_domain
Fetch a full domain: entries, personas, pillars, and governance status.
set_active_domain
Pin one domain as the grounding context for the rest of the session.
get_graph_connections
Deterministic traversal over typed entity relationships — bypasses vector approximation entirely.
compare_canon_domains
Diff claims and positioning across two domains.
get_grounding_context
Assemble the complete grounding block — all approved entries and persona attributes — for generation.
reset_conversation
Clear the session's grounding state and active domain.
list_channels
List distribution channels (email, LinkedIn, sales deck, plus any custom channels).
Artifacts· 3 tools
generate_artifact
Generate a grounded artifact — 12+ types with DOCX and PDF export — cited against the active domain.
build_ui_artifact
Produce a structured visual design spec, rendered on the canvas engine.
list_skills
Enumerate the available generation skills and the context inputs each one requires.
Admin· 4 tools
check_framework_completeness
Score a domain for coverage gaps — missing proof points, personas, or objection handlers.
get_framework_spec
Return the grounding-type schema that defines a domain's structure.
get_entry_history
Full audit trail for a canon entry: status transitions, content changes, and provenance.
list_mcp_tools
Self-describing index of every tool the server exposes.

Legacy tool names (list_message_houses, search_messaging, set_active_house, get_message_house, compare_houses, get_message_history) are preserved as deprecated aliases.

004API keys and scopes

Scoped access, per workspace.

Every request authenticates with a workspace-scoped API key. Keys carry one of three permission scopes, plus optional department scopes for cross-department canon — and each workspace enforces its own rate limits and token budgets.

See the system architecture ✦
read

Grounding queries only — search the canon, traverse the graph, list domains and channels. The right scope for most AI-client sessions.

write

Everything in read, plus creating and updating canon entries, personas, and generated artifacts.

admin

Full control: key management, workspace settings, governance actions, approval and locking.

dept:*

Department scopes (dept:marketing, dept:legal, ...) restrict a key to specific department-owned canon domains for cross-department deployments.