Reference documentation for dimensional (Kimball) data modelling, built with mdBook.
You need the mdbook binary on your PATH. This project was set up under
WSL (Ubuntu) using the precompiled Linux binary β no Rust toolchain required.
Install (or upgrade) mdBook:
mkdir -p ~/.local/bin
curl -fsSL \
https://github.com/rust-lang/mdBook/releases/download/v0.5.3/mdbook-v0.5.3-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz -C ~/.local/bin mdbook
chmod +x ~/.local/bin/mdbookMake sure ~/.local/bin is on your PATH (Ubuntu's default ~/.profile adds it
automatically once the directory exists β open a new shell or run
source ~/.profile). Verify:
mdbook --version # mdbook v0.5.3Already have Rust?
cargo install mdbookworks too.
Diagrams use the mdbook-mermaid
preprocessor, so building needs that binary too:
curl -fsSL \
https://github.com/badboy/mdbook-mermaid/releases/download/v0.17.0/mdbook-mermaid-v0.17.0-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz -C ~/.local/bin mdbook-mermaid
chmod +x ~/.local/bin/mdbook-mermaidThe runtime assets (mermaid.min.js, mermaid-init.js) and book.toml config
are already committed, so no further setup is required. Author a diagram with a
fenced ```mermaid block β see src/concepts/kimball-keys.md for an example.
Every content image and rendered Mermaid diagram gets a hover zoom icon that
opens a full-screen lightbox (scroll to zoom, drag to pan, Esc to close),
implemented in theme/zoom.js + theme/zoom.css
and loaded via book.toml. No authoring needed β it applies automatically.
From the project root:
mdbook serve --open # build + live-reload preview at http://localhost:3000
mdbook build # render static HTML into ./book
mdbook clean # remove the ./book output directorymdbook serve watches src/ and rebuilds on save, refreshing the browser.
mdBook's file-watcher can miss edits when the project lives on a Windows mount
(/mnt/c/...) under WSL. If live-reload stops picking up changes:
- re-run
mdbook buildmanually after each edit, or - move the project into the Linux filesystem (e.g.
~/dim-modelling-docs) where the watcher is reliable.
A workflow at .github/workflows/deploy-docs.yml
builds the book and publishes it on every push to main. It installs the same
mdbook (0.5.3) and mdbook-mermaid (0.17.0) binaries used locally, runs
mdbook build, and deploys book/ via GitHub Pages.
One-time setup (repo admin): Settings β Pages β Build and deployment β Source:
GitHub Actions. After that, pushes to main deploy automatically; the live URL
appears in the workflow run and under Settings β Pages.
To deploy to any other static host (Netlify, S3, Cloudflare Pages, nginx), just build and upload the output directory:
mdbook build # produces ./book
# then serve / upload the contents of ./book as static filesThe bump from version-pinned binaries in CI keeps deploys reproducible. If you upgrade mdBook/mdbook-mermaid locally, bump
MDBOOK_VERSION/MDBOOK_MERMAID_VERSIONin the workflow to match.
The server picks its transport from environment variables, so the same file runs locally over stdio or remotely over HTTP:
| Variable | Default | Purpose |
|---|---|---|
MCP_TRANSPORT |
stdio |
stdio for desktop clients, http for a remote service. |
MCP_HOST |
0.0.0.0 |
Bind address (HTTP only). |
MCP_PORT |
8000 |
Port (HTTP only). |
DOCS_SRC |
../src |
Path to the docs the server reads. |
Local (stdio) β the usual case; the client launches it. See mcp-server/README.md for client config.
Remote (HTTP) β run it as a long-lived service:
cd mcp-server
MCP_TRANSPORT=http MCP_PORT=8000 uv run server.py
# reachable at http://<host>:8000/mcpDocker β build from the repo root (so the docs are included) using mcp-server/Dockerfile:
docker build -f mcp-server/Dockerfile -t dim-docs-mcp .
docker run -p 8000:8000 dim-docs-mcp # http://localhost:8000/mcpConnect a client to the deployed HTTP server:
claude mcp add --transport http dim-modelling-docs https://<host>/mcpKeep it alive in production with your process manager of choice (systemd, Docker
--restart, a PaaS, or FastMCP Cloud). The server is read-only and stateless, so you can run multiple replicas behind a load balancer. Put it behind TLS/auth if exposed publicly.
.
βββ book.toml # mdBook configuration
βββ README.md # this file
βββ src/
β βββ SUMMARY.md # table of contents (controls the sidebar)
β βββ introduction.md # landing page
β βββ concepts/
β βββ kimball-keys.md
βββ book/ # generated HTML output (not committed)
- Create a Markdown file under
src/(e.g.src/concepts/scd-types.md). - Add a link to it in
src/SUMMARY.mdβ the sidebar is generated from that file. - Run
mdbook serveto preview.