- Kroki Mcp Server
Kroki Mcp Server
Kroki-MCP is a Go-based Model Context Protocol tool that converts textual diagram definitions (PlantUML, Mermaid, and more) into images via a Kroki backend. Designed for simplicity and flexibility, it supports both local and remote Kroki servers, offers configurable settings, and outputs multiple formats – making it ideal for developers building AI
Content
Kroki-MCP
Kroki-MCP is a command-line tool and MCP integration for converting textual diagrams (e.g., PlantUML, Mermaid) into images using a Kroki backend. It supports both local and remote Kroki servers, with flexible configuration and multiple output formats.
Features
- Modes:
- SSE: Streams results using Server-Sent Events.
- STDIO (default): Reads diagram code from stdin and outputs to stdout.
- Output Formats: Supports
png(default),svg,jpeg, andpdf. - Kroki Server: Configurable backend host (default:
https://kroki.io). - Extensible: Easily add support for more diagram types and output formats.
- MCP Integration: Exposes diagram conversion as an MCP tool using github.com/mark3labs/mcp-go.
Usage
# Default (SSE mode, PNG, default Kroki host)
kroki-mcp
# Specify output format
kroki-mcp --format svg
# Use STDIO mode
kroki-mcp --mode stdio --format pdf
# Specify a custom Kroki server
kroki-mcp --kroki-host http://localhost:8000
Configuration
| Option | Description | Type | Default |
|---|---|---|---|
--host, -h | Server host address | string | localhost |
--port, -p | Server port | int | 5090 |
--mode, -m | Operation mode (sse or stdio) | string | stdio |
--format, -f | Output format (png, svg, jpeg, pdf) | string | png |
--kroki-host | Kroki server URL | string | https://kroki.io |
--log-level | Log level (debug, info, warn, error) | string | info |
--log-format | Log format (text or json) | string | text |
Project Structure
kroki-mcp/
├── cmd/
│ └── kroki-mcp/ # Main CLI and MCP server entry point
├── internal/
│ ├── kroki/ # Kroki client logic (HTTP, formats)
│ ├── config/ # Configuration management (flags, env, files)
│ └── mcp/ # MCP tool/server integration
├── test/ # Unit and integration tests
├── Dockerfile # Docker build file
├── docker-compose.yml # Docker Compose for dev environment
├── go.mod # Go module definition
├── README.md # Project documentation
└── .gitignore # Git ignore file
Implementation Steps
- Scaffold Go project.
- Implement CLI with default SSE mode, format flags.
- Implement Kroki client supporting all formats.
- Implement SSE and STDIO modes.
- Integrate with mcp-go for MCP tool support.
- Add error handling and tests.
- Document usage.
Example: Running as an MCP Server
To run Kroki-MCP as an MCP server from source:
go run github.com/utain/kroki-mcp/cmd/kroki-mcp@latest --mode sse --format png --kroki-host https://kroki.io
You can configure the MCP server in your MCP configuration file as follows:
{
"mcpServers": {
"kroki-mcp": {
"command": "go",
"args": [
"run",
"github.com/utain/kroki-mcp/cmd/kroki-mcp@latest",
"-m", "stdio",
"-f", "png",
"--kroki-host", "https://kroki.io"
]
}
}
}
Development with Docker
You can use Docker and docker-compose for local development and testing.
Build and Run with Docker
docker build -t kroki-mcp .
docker run --rm -it kroki-mcp --help
Using docker-compose (with local Kroki server)
docker-compose up --build
- This will start both a Kroki server and the kroki-mcp service.
- kroki-mcp will connect to the Kroki server at
http://kroki:8000.
Contributing
Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
Changelog
See CHANGELOG.md for release history.
Related Projects
License
This project is licensed under the MIT License.
Server Config
{
"mcpServers": {
"kroki-mcp": {
"command": "go",
"args": [
"run",
"github.com/utain/kroki-mcp/cmd/kroki-mcp@latest",
"-m",
"stdio",
"-f",
"png",
"--kroki-host",
"https://kroki.io"
]
}
}
}Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.