Kroki MCP
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.
README
kroki-mcp
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.
Quick start
# 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
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
KROKI_MCP_KROKI_URL |
Yes | — | URL of your self-hosted Kroki instance (e.g. http://localhost:8000) |
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 |
Tools
render_diagram
Render 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— whentrueand format is PNG, return base64 string instead of MCP Image
list_diagram_types
List all supported diagram types and their output formats. Returns a JSON array.
Resources
kroki://health
Check if the Kroki instance is reachable. Returns JSON with status ("ok" or "unreachable").
Prompts
diagram_helper
Get 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"
Authentication
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.
Docker
export KROKI_MCP_KROKI_URL=http://kroki:8000
docker compose up -d
See Docker deployment for volumes, UID/GID, and Traefik setup.
Development
uv sync --all-extras
uv run pytest
uv run ruff check src/ tests/
uv run mypy src/
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.