- Home
- MCP servers
- MCP Kroki Server
MCP Kroki Server
- javascript
6
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"tkoba1974-mcp-kroki": {
"command": "node",
"args": [
"/path/to/mcp-kroki/build/index.js"
]
}
}
}You run an MCP Kroki Server to convert Mermaid and other diagram formats into SVGs via Kroki.io. This server lets you generate shareable diagram URLs and download diagrams in multiple formats for easy integration into your apps or workflows.
How to use
You can use the server from an MCP client to generate diagram URLs or download diagrams directly. The two main capabilities are to create a Kroki URL for a given diagram type and content, or to fetch and save a diagram locally in your preferred format.
How to install
Prerequisites: Ensure you have Node.js installed on your system. You will also need access to npm or npx depending on how you choose to run the server.
git clone https://github.com/tkoba1974/mcp-kroki.git
cd mcp-kroki
npm install
npm run build
Additional content
The server exposes two MCP configurations you can run locally. Both configurations are designed to run as local processes that the MCP client can invoke. They are defined as stdio servers, meaning you start them from the command line and interact with them through standard input/output.
If you want to run the server locally via Node, you can start it with the following command (as shown in configuration examples):
node /path/to/mcp-kroki/build/index.js
Usage with Claude Desktop configuration
You can configure Claude Desktop to run the server locally. Two example configurations are shown: one that starts the server directly with Node, and another that uses npx to run the package.
{
"mcpServers": {
"mcp_kroki": {
"command": "node",
"args": ["/path/to/mcp-kroki/build/index.js"]
}
}
}
Notes about usage
The server relies on Kroki.io to perform the actual diagram rendering. Diagram content is prepared and sent to Kroki for conversion, and you can choose the output format you need for download or embedding.
Tools and capabilities
-
Generate Diagram URL: Create a Kroki URL for a diagram type (for example mermaid or plantuml) with the specified content and an optional output format such as svg, png, pdf, or jpeg.
-
Download Diagram: Retrieve a diagram in a chosen output format and save it to a local path. You can specify the diagram type, content, output path, and format, with an optional scale parameter for SVG output.
Security and notes
Only run trusted diagram content, especially when sending diagram definitions to external services. Validate inputs and restrict access to the MCP endpoints as appropriate for your deployment.
Available tools
generate_diagram_url
Generates a Kroki URL for a diagram by specifying the diagram type (such as mermaid or plantuml) and the diagram content, with an optional output format.
download_diagram
Downloads a diagram in a chosen format to a local file, given the type, content, and output path, with optional scaling for SVG output.