loading…
Search for a command to run...
loading…
A production-ready MCP server scaffold that features built-in authentication, Docker support, and a comprehensive CI/CD release pipeline. It provides a standard
A production-ready MCP server scaffold that features built-in authentication, Docker support, and a comprehensive CI/CD release pipeline. It provides a standardized template for deploying servers with multi-transport support and configurable read-only modes.
MCP server wrapping a self-hosted Kroki instance, exposing diagram rendering as MCP tools.
Supports 29+ diagram types including PlantUML, Mermaid, GraphViz, D2, DBML, ERD, and more. See Kroki's diagram support list for the full list.
# Set the Kroki instance URL
export KROKI_MCP_KROKI_URL=http://localhost:8000
# Install and run (stdio transport)
pip install kroki-mcp[mcp]
kroki-mcp serve
| Variable | Required | Default | Description |
|---|---|---|---|
KROKI_MCP_KROKI_URL |
No | https://kroki.io |
URL of your Kroki instance. Defaults to the public instance — not suitable for production (diagram source is sent to a third-party server). |
KROKI_MCP_READ_ONLY |
No | true |
Disable write tools |
KROKI_MCP_LOG_LEVEL |
No | INFO |
Log level (DEBUG, INFO, WARNING, ERROR) |
KROKI_MCP_SERVER_NAME |
No | kroki-mcp |
Server name shown to clients |
KROKI_MCP_INSTRUCTIONS |
No | (dynamic) | System instructions for LLM context |
render_diagramRender a diagram using Kroki.
Parameters:
diagram_type — diagram language (e.g. "plantuml", "mermaid", "graphviz")source — diagram source codeoutput_format — "svg" (default) or "png"as_base64 — when true and format is PNG, return base64 string instead of MCP Imagelist_diagram_typesList all supported diagram types and their output formats. Returns a JSON array.
kroki://healthCheck if the Kroki instance is reachable. Returns JSON with status ("ok" or "unreachable").
diagram_helperGet syntax guidance and a basic example for a given diagram type, plus instructions to use render_diagram.
Parameter: diagram_type — e.g. "mermaid", "plantuml", "graphviz"
The server supports bearer token and OIDC auth for HTTP transport:
| Variable | Description |
|---|---|
KROKI_MCP_BEARER_TOKEN |
Static bearer token |
KROKI_MCP_BASE_URL |
Public server URL — required for OIDC (e.g. https://mcp.example.com) |
KROKI_MCP_OIDC_CONFIG_URL |
OIDC discovery endpoint |
KROKI_MCP_OIDC_CLIENT_ID |
OIDC client ID |
KROKI_MCP_OIDC_CLIENT_SECRET |
OIDC client secret |
KROKI_MCP_OIDC_JWT_SIGNING_KEY |
JWT signing key — required on Linux/Docker to survive restarts |
See Authentication guide for full setup details.
export KROKI_MCP_KROKI_URL=http://kroki:8000
docker compose up -d
See Docker deployment for volumes, UID/GID, and Traefik setup.
uv sync --all-extras
uv run pytest
uv run ruff check src/ tests/
uv run mypy src/
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"kroki-mcp": {
"command": "npx",
"args": []
}
}
}