skillfed

mkdocs-kroki-plugin

MkDocs plugin for Kroki-Diagrams

mkdocs-kroki-plugin v1.6.0 84.3K downloads/30d#14,005 on PyPI63
Permissive license MIT Active released

What it is and what it does

mkdocs-kroki-plugin bridges MkDocs and Kroki, a universal diagram-rendering service. You write diagram syntax (BlockDiag, BPMN, Mermaid, Excalidraw, and others) inside Markdown code fences tagged with `kroki-`, and the plugin renders them server-side, embedding the results as images or SVG objects in your built documentation. It handles HTTP requests to a Kroki server (public or self-hosted), caches rendered diagrams to speed up rebuilds during local development, and supports configuration for output format, styling, timeouts, and display options like width and alignment.

The plugin depends on mkdocs as its framework, httpx for HTTP requests, and defusedxml for safe XML parsing. It targets modern Python (3.10–3.14) and is in Beta status. Maintenance is active, with recent releases and ongoing commits. No known security vulnerabilities are recorded.

Use it for:

  • Embed architecture diagrams, flowcharts, and sequence diagrams directly in API or system documentation without external image files.
  • Generate BPMN process diagrams in technical documentation that stay in sync with your source code repository.
  • Create Mermaid flowcharts and state diagrams in MkDocs sites, leveraging Kroki's rendering instead of client-side JavaScript.
  • Build documentation with theme-aware diagram styling (light/dark mode backgrounds and colors) using the plugin's style configuration.
  • Speed up local documentation builds by caching rendered diagrams, avoiding re-rendering on every file save during `mkdocs serve`.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A MkDocs plugin that converts Kroki diagram syntax in Markdown code fences into rendered diagrams (BlockDiag, BPMN, Excalidraw, Mermaid, and others) embedded in your documentation.

Yes. The plugin is actively maintained, has no known vulnerabilities, installs with low friction, and solves a clear problem—embedding diagrams in MkDocs without manual image management. MIT licensing removes legal friction. Install it if you use MkDocs and want to include Kroki diagrams; the only prerequisite is access to a Kroki server and Python 3.10+.

Install

mkdocs-kroki-plugin on PyPI

pip

pip install mkdocs-kroki-plugin

uv

uv add mkdocs-kroki-plugin

poetry

poetry add mkdocs-kroki-plugin

Installing mkdocs-kroki-plugin

Before you install

Low friction: pure Python wheel with five runtime dependencies (mkdocs, httpx, defusedxml, properdocs, result). Active maintenance with a recent release 123 days ago and ongoing commits.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Quickstart

pip install mkdocs-kroki-plugin

# In mkdocs.yml:
plugins:
  - kroki:
      server_url: 'https://kroki.io'

# In your Markdown:
```kroki-blockdiag
blockdiag {
  A -> B -> C;
}
```

Requires Python 3.10 or later; requires a running Kroki server (public instance at https://kroki.io or self-hosted).

Verify before relying

  • Whether the plugin supports all Kroki diagram types equally or if some have known limitations.
  • Performance impact of caching strategies on large documentation builds with hundreds of diagrams.
  • Compatibility with MkDocs themes that use custom HTML rendering or CSS frameworks.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — defusedxml, httpx, mkdocs, properdocs, result
Maintenance actively maintained — 123 days since the last release
Last repo commit
First released
Downloads 84,348/month — #14,005 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mkdocs_kroki_plugin-1.6.0-py3-none-any.whl

Keywords: diagram, kroki, markdown, mkdocs, python

Development Status :: 4 - BetaFramework :: MkDocsIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Software Development :: Documentation

Tags

mkdocs diagram pluginkroki diagram renderingembed diagrams in markdownblockdiag mermaid mkdocsdocumentation diagram generationkroki server integrationmarkdown diagram fence
diagram-renderingmkdocs-pluginkroki-integration

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mkdocs-drawio

A MkDocs plugin that embeds interactive Drawio…

permissive · top 15,000 on PyPI

mkdocs-mermaid2-plugin

A MkDocs plugin that renders Mermaid diagram…

permissive · top 5,000 on PyPI

mkdocs-panzoom-plugin

Adds interactive pan and zoom functionality to…

permissive · top 5,000 on PyPI

blockdiag

blockdiag generates block-diagram images from a…

permissive · top 15,000 on PyPI

mkdocs-video

A MkDocs plugin that embeds videos in…

permissive · top 15,000 on PyPI

mkdocs-include-markdown-plugin

A MkDocs plugin that includes content from…

permissive · top 15,000 on PyPI

neoteroi-mkdocs

Provides a collection of MkDocs plugins and…

permissive · top 15,000 on PyPI

mkdocs-render-swagger-plugin

Renders Swagger and OpenAPI schemas as…

permissive · top 15,000 on PyPI

markdown-exec

Executes code blocks embedded in Markdown files…

permissive · top 5,000 on PyPI

sphinxcontrib-blockdiag

A Sphinx extension that embeds block diagrams…

permissive · top 15,000 on PyPI