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
Metadata
Release files for hkopenai.diagram-as-code-mcp-server 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz | 5.8 kB | Without provenance | Details for hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl |
Total release size: 12.2 kB
Release files / hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz
| Download URL | hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15ce79b5f7652b54295def4033173de6ef12ba20d5571621e8a52cfe766ac24a
|
|
BLAKE2b-256 checksum How to use checksums |
b79a0ed8255b2ab5b302ef66ef6eaa32844595ec47d3728d5952d7ca022a293b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl
| Download URL | hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a03ec4e86f227ee3f626eaa95dbac0e6e90c9bad747ad02c70820d7c523cd160
|
|
BLAKE2b-256 checksum How to use checksums |
48e4aaffed37c6fa2e31c0b27fc356a397237a9bb01ce747326adf347d8f2007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for hkopenai.diagram-as-code-mcp-server 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.