This is a MCP server to provide mermaid js validation tools and prompt for MCP client
Project description
Diagram as Code MCP Server
This is a MCP server to provide mermaid js validation tools and prompt for MCP client
Why Use This MCP Server?
This MCP server is essential for MCP clients working with Mermaid.js diagrams. Large Language Models (LLMs) might be trained with older data and outdated Mermaid.js syntax, and they may not have enough content trained to effectively fix syntax errors. This server addresses these critical limitations by providing specialized tools to assist in authoring, validating, and automatically fixing Mermaid.js syntax, ensuring diagrams are correctly formatted and functional.
Features
- No Brackets Description: A prompt to instruct bots to avoid using brackets in descriptions.
- Mermaid.js Support: A tool to assist in authoring, validating, and fixing syntax for Mermaid.js diagrams.
Setup
- Clone this repository
- Install Python dependencies:
pip install -r requirements.txt
- Run the server:
</code></pre> </li> </ol> <p>python -m hkopenai.diagram_as_code_mcp_server</p> <pre><code> ### Running Options - Default stdio mode: `python -m hkopenai.diagram_as_code_mcp_server` - SSE mode (port 8000): `python -m hkopenai.diagram_as_code_mcp_server --sse` - Serve prompt as tool: `python -m hkopenai.diagram_as_code_mcp_server --tool` ## Cline Integration Cline does not support prompt from mcp server at this moment. The prompt is provided as tool: To connect this MCP server to Cline using stdio: 1. Add this configuration to your Cline MCP settings (cline_mcp_settings.json): ```json { "hk-prompt-server": { "disabled": false, "timeout": 3, "type": "stdio", "command": "python", "args": [ "-m", "hkopenai.diagram_as_code_mcp_server", "--tool" ] } }
Testing
Tests are available in
tests. Run with:pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz.
File metadata
- Download URL: hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15ce79b5f7652b54295def4033173de6ef12ba20d5571621e8a52cfe766ac24a
|
|
| MD5 |
89ae36061168dcfc4844f8c7c7c86366
|
|
| BLAKE2b-256 |
b79a0ed8255b2ab5b302ef66ef6eaa32844595ec47d3728d5952d7ca022a293b
|
File details
Details for the file hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a03ec4e86f227ee3f626eaa95dbac0e6e90c9bad747ad02c70820d7c523cd160
|
|
| MD5 |
075823fe2defa8f7fb90bf09425645bd
|
|
| BLAKE2b-256 |
48e4aaffed37c6fa2e31c0b27fc356a397237a9bb01ce747326adf347d8f2007
|