Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging level: DEBUG, INFO (default), WARNING, ERROR, CRITICALINFO

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_mermaid_diagram_fileA

Generate a Mermaid diagram and save it to a local file system directory.

SYSTEM PREREQUISITES:

  • Node.js must be installed (v14 or higher)

  • Mermaid CLI must be installed globally: npm install -g @mermaid-js/mermaid-cli

  • The 'mmdc' command must be available in the system PATH

  • Python 3.8 or higher with MCP tools installed

IMPORTANT TRANSPORT & ACCESS REQUIREMENTS:

  • Works with both STDIO and SSE transport modes

  • REQUIRES: The MCP client (e.g., AI assistant) must have access to the local file system where the image is saved

  • The client must have write permissions for the specified folder

PARAMETER GUIDANCE:

  • code: Valid Mermaid diagram syntax (see https://mermaid.js.org/)

  • folder: Absolute or relative path to an existing directory with write permissions

  • name: Filename for the diagram (extension can determine format if format not specified)

  • theme: Theme name for the diagram. MUST be one of: ["default", "neutral", "dark", "forest", "base"]

    • default: Default theme for all diagrams

    • neutral: Great for black and white documents that will be printed

    • dark: Works well with dark-colored elements or dark-mode

    • forest: Contains shades of green

    • base: The only theme that can be modified for customization

  • backgroundColor: Optional hex color code (e.g., '#FFFFFF') or color name (e.g., 'white', 'transparent')

  • format: Output format. Recommended: "png". Also supports "pdf". "svg" is available but not recommended for general use. If not specified:

    1. Inferred from filename extension (e.g., "diagram.png" -> png).

    2. Defaults to "png" if no valid extension or format is provided.

RESPONSE:

  • Returns the absolute path to the generated file

  • The client must be able to access this path to use the generated image

USE CASE: Best suited for scenarios where:

  1. The client needs to persist the diagram to disk

  2. The client has local file system access

  3. The client needs to reference the image file path in subsequent operations

generate_mermaid_diagram_streamA

Generate a Mermaid diagram and return it directly as a base64-encoded image.

SYSTEM PREREQUISITES:

  • Node.js must be installed (v14 or higher)

  • Mermaid CLI must be installed globally: npm install -g @mermaid-js/mermaid-cli

  • The 'mmdc' command must be available in the system PATH

  • Python 3.8 or higher with MCP tools installed

  • MCP client must support SSE transport and binary/base64 image handling

IMPORTANT TRANSPORT REQUIREMENTS:

  • REQUIRES SSE TRANSPORT MODE ONLY

  • Will NOT work with STDIO transport

  • DO NOT use this endpoint if your MCP client doesn't support SSE transport

  • DO NOT use this endpoint if your client can't handle binary/base64 image data

PARAMETER GUIDANCE:

  • code: Valid Mermaid diagram syntax (see https://mermaid.js.org/)

  • theme: Theme name for the diagram. MUST be one of: ["default", "neutral", "dark", "forest", "base"]

    • default: Default theme for all diagrams

    • neutral: Great for black and white documents that will be printed

    • dark: Works well with dark-colored elements or dark-mode

    • forest: Contains shades of green

    • base: The only theme that can be modified for customization

  • backgroundColor: Optional hex color code (e.g., '#FFFFFF') or color name (e.g., 'white', 'transparent')

  • format: Output format. Recommended: "png". Also supports "pdf". "svg" is available but not recommended. Defaults to "png" if not specified.

RESPONSE:

  • Returns the diagram as a base64-encoded image in the specified format

  • No file system access or permissions required

  • Image data is streamed directly back to the client

USE CASE: Best suited for scenarios where:

  1. The client is using SSE transport mode

  2. The client can handle base64-encoded image data

  3. No need to persist the image to disk

  4. No file system access is available or desired

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/codingthefuturewithai/mcp_mermaid_image_gen'

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