Skip to main content

This is a MCP server to provide mermaid js validation tools and prompt for MCP client

Project description

Diagram as Code MCP Server

GitHub Repository License: MIT

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

  1. Clone this repository
  2. Install Python dependencies:
    pip install -r requirements.txt
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz.

File metadata

File hashes

Hashes for hkopenai_diagram_as_code_mcp_server-0.2.1.tar.gz
Algorithm Hash digest
SHA256 15ce79b5f7652b54295def4033173de6ef12ba20d5571621e8a52cfe766ac24a
MD5 89ae36061168dcfc4844f8c7c7c86366
BLAKE2b-256 b79a0ed8255b2ab5b302ef66ef6eaa32844595ec47d3728d5952d7ca022a293b

See more details on using hashes here.

File details

Details for the file hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hkopenai_diagram_as_code_mcp_server-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a03ec4e86f227ee3f626eaa95dbac0e6e90c9bad747ad02c70820d7c523cd160
MD5 075823fe2defa8f7fb90bf09425645bd
BLAKE2b-256 48e4aaffed37c6fa2e31c0b27fc356a397237a9bb01ce747326adf347d8f2007

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page