Skip to main content
Glama

HK Prompt MCP Server

by hkopenai

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

  1. Clone this repository
  2. Install Python dependencies:
pip install -r requirements.txt
  1. Run the server:
python -m hkopenai.diagram_as_code_mcp_server

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):
{ "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
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

An MCP server that provides custom prompts for guiding bot interactions, specifically to avoid using brackets in descriptions.

  1. Why Use This MCP Server?
    1. Features
      1. Setup
        1. Running Options
      2. Cline Integration
        1. Testing

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            An MCP server that enables posting messages to Discord webhooks, allowing customization of content, username, and avatar URL.
            Last updated -
            1
            0
            JavaScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            An MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.
            Last updated -
            10
            Python
            MIT License
          • -
            security
            -
            license
            -
            quality
            An MCP server that provides tools for interacting with Anthropic's prompt engineering APIs, allowing users to generate, improve, and templatize prompts based on task descriptions and feedback.
            Last updated -
            1
            TypeScript
            ISC License
          • -
            security
            F
            license
            -
            quality
            An MCP server that provides user dialogue capabilities for AI code editors, allowing AI to interact with users through dialog boxes when needing input during the coding process.
            Last updated -
            Python

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/hkopenai/document_as_code'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server