Line9

Render Mermaid with Line9 layout in your assistant.

Should I use this

Quality & Safety

A
Description quality
100%
Schema completeness
97%
Naming quality
100%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~2,754Tokens (tool definitions)
~9.2 KBTypical response size
Significant attention impact (2.15% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "diagrams": {
      "url": "https://mcp.line9.ai/mcp"
    }
  }
}

Remote endpoints

https://mcp.line9.ai/mcpstreamable-http

What it can do

Tool inventory

Tools (3)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢render_diagram(source, plan)

Render Mermaid source with Line9's layout engine. Call this whenever you write or change Mermaid and the user should see the result. Flowcharts and sequence diagrams get Line9's layout; other Mermaid kinds are rendered with Mermaid's own layout and flagged as such. Returns a short verdict — kind, size, warnings, or a parse error with its line and column — plus an "Open in Line9" link. On a parse error, fix the named line and call again. Assistants that support MCP Apps show the diagram in a panel; there, do not paste the SVG or repeat the source in your reply. In an assistant with no panel (a terminal or editor), reply with the verdict line and the `open_url` link — that link is the only way the user sees the diagram. Write flowcharts as `flowchart LR` unless the user asks for top-to-bottom; chat panels are wide and short. No sign-in needed; renders carry a small Line9 mark unless the user is signed in to Line9 Pro. Set theme, orientation, spacing and legend in the source itself (`line9:` frontmatter; `flowchart LR`), never as arguments. This connector cannot publish or save. To publish, the user opens the diagram in Line9 (the `open_url` link) and publishes there — not with the Line9 CLI.

Input Schema

{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "minLength": 1,
      "description": "Mermaid source. Optional YAML frontmatter is honoured — set it in the source, never as arguments: `title`, and a nested `line9:` block with `theme` (one of `boardroom`, `linen`, `blueprint`), `scale: { node, spacing }` and `flowchart: { legend: on | off }`. The flowchart direction directive is also honoured. Maximum 100000 characters."
    },
    "plan": {
      "description": "Opaque plan from a previous result (widget use). A hint only: skips the solve when it still fits the source.",
      "type": "string"
    }
  },
  "required": [
    "source"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}

Output Schema

{
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number"
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "diagram_error",
        "ambiguous",
        "not_found",
        "auth_required",
        "forbidden",
        "not_entitled",
        "rate_limited",
        "upstream",
        "invalid_input",
        "internal"
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "line": {
          "type": "number"
        },
        "column": {
          "type": "number"
        },
        "current_version": {
          "type": "number"
        },
        "candidates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": {}
    },
    "path": {
      "type": "string",
      "enum": [
        "solve",
        "plan"
      ]
    },
    "render_mode": {
      "type": "string",
      "enum": [
        "line9",
        "mermaid_fallback"
      ]
    },
    "diagram_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": "string"
    },
    "config": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string"
        },
        "scale": {
          "type": "object",
          "properties": {
            "node": {
              "type": "number"
            },
            "spacing": {
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "flowchart": {
          "type": "object",
          "properties": {
            "direction": {
              "type": "string"
            },
            "legend": {
              "type": "string",
              "enum": [
                "on",
                "off"
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    },
    "orientation": {
      "type": "string",
      "enum": [
        "TB",
        "BT",
        "LR",
        "RL"
      ]
    },
    "controls": {
      "type": "object",
      "properties": {
        "orientation": {
          "type": "boolean"
        },
        "legend": {
          "type": "boolean"
        }
      },
      "additionalProperties": {}
    },
    "node_count": {
      "type": "number"
    },
    "edge_count": {
      "type": "number"
    },
    "stop_reason": {
      "type": "string"
    },
    "fallback_reason": {
      "type": "string",
      "enum": [
        "unsupported_diagram_kind",
        "node_cap_exceeded"
      ]
    },
    "watermark": {
      "type": "boolean"
    },
    "signed_in": {
      "type": "boolean"
    },
    "engine_version": {
      "type": "string"
    },
    "mermaid_version": {
      "type": "string"
    },
    "open_url": {
      "type": "string"
    },
    "svg": {
      "type": "string"
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "plan": {
      "type": "string"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "diagram": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "visibility": {
          "type": "string"
        },
        "version": {
          "type": "number"
        },
        "url": {
          "type": "string"
        },
        "workspace_id": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "diagrams": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        },
        "additionalProperties": {}
      }
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "status"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}
🟢list_diagrams(query, limit)

List the diagrams published in the user's Line9 workspace(s): name, visibility, version, last update and permalink. Use it to find a diagram before `get_diagram`. Requires Line9 sign-in.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "description": "Case-insensitive substring of the diagram name.",
      "type": "string"
    },
    "limit": {
      "description": "Maximum rows to return (1–100; default 50).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}

Output Schema

{
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number"
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "diagram_error",
        "ambiguous",
        "not_found",
        "auth_required",
        "forbidden",
        "not_entitled",
        "rate_limited",
        "upstream",
        "invalid_input",
        "internal"
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "line": {
          "type": "number"
        },
        "column": {
          "type": "number"
        },
        "current_version": {
          "type": "number"
        },
        "candidates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": {}
    },
    "path": {
      "type": "string",
      "enum": [
        "solve",
        "plan"
      ]
    },
    "render_mode": {
      "type": "string",
      "enum": [
        "line9",
        "mermaid_fallback"
      ]
    },
    "diagram_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": "string"
    },
    "config": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string"
        },
        "scale": {
          "type": "object",
          "properties": {
            "node": {
              "type": "number"
            },
            "spacing": {
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "flowchart": {
          "type": "object",
          "properties": {
            "direction": {
              "type": "string"
            },
            "legend": {
              "type": "string",
              "enum": [
                "on",
                "off"
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    },
    "orientation": {
      "type": "string",
      "enum": [
        "TB",
        "BT",
        "LR",
        "RL"
      ]
    },
    "controls": {
      "type": "object",
      "properties": {
        "orientation": {
          "type": "boolean"
        },
        "legend": {
          "type": "boolean"
        }
      },
      "additionalProperties": {}
    },
    "node_count": {
      "type": "number"
    },
    "edge_count": {
      "type": "number"
    },
    "stop_reason": {
      "type": "string"
    },
    "fallback_reason": {
      "type": "string",
      "enum": [
        "unsupported_diagram_kind",
        "node_cap_exceeded"
      ]
    },
    "watermark": {
      "type": "boolean"
    },
    "signed_in": {
      "type": "boolean"
    },
    "engine_version": {
      "type": "string"
    },
    "mermaid_version": {
      "type": "string"
    },
    "open_url": {
      "type": "string"
    },
    "svg": {
      "type": "string"
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "plan": {
      "type": "string"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "diagram": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "visibility": {
          "type": "string"
        },
        "version": {
          "type": "number"
        },
        "url": {
          "type": "string"
        },
        "workspace_id": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "diagrams": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        },
        "additionalProperties": {}
      }
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "status"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}
🟢get_diagram(diagram)

Fetch a published diagram's current Mermaid source by name or slug, and show it rendered. The returned source is stamped with the diagram's identity — keep the `line9:` frontmatter block when you edit it so that Line9 recognises the diagram when it is opened and published there instead of creating a new one. Requires Line9 sign-in. This connector cannot publish or save. To publish, the user opens the diagram in Line9 (the `open_url` link) and publishes there — not with the Line9 CLI.

Input Schema

{
  "type": "object",
  "properties": {
    "diagram": {
      "type": "string",
      "minLength": 1,
      "description": "Diagram name, slug, or trailing public_ref."
    }
  },
  "required": [
    "diagram"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}

Output Schema

{
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number"
    },
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "diagram_error",
        "ambiguous",
        "not_found",
        "auth_required",
        "forbidden",
        "not_entitled",
        "rate_limited",
        "upstream",
        "invalid_input",
        "internal"
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "line": {
          "type": "number"
        },
        "column": {
          "type": "number"
        },
        "current_version": {
          "type": "number"
        },
        "candidates": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": {}
    },
    "path": {
      "type": "string",
      "enum": [
        "solve",
        "plan"
      ]
    },
    "render_mode": {
      "type": "string",
      "enum": [
        "line9",
        "mermaid_fallback"
      ]
    },
    "diagram_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "type": "string"
    },
    "config": {
      "type": "object",
      "properties": {
        "theme": {
          "type": "string"
        },
        "scale": {
          "type": "object",
          "properties": {
            "node": {
              "type": "number"
            },
            "spacing": {
              "type": "number"
            }
          },
          "additionalProperties": {}
        },
        "flowchart": {
          "type": "object",
          "properties": {
            "direction": {
              "type": "string"
            },
            "legend": {
              "type": "string",
              "enum": [
                "on",
                "off"
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "additionalProperties": {}
    },
    "orientation": {
      "type": "string",
      "enum": [
        "TB",
        "BT",
        "LR",
        "RL"
      ]
    },
    "controls": {
      "type": "object",
      "properties": {
        "orientation": {
          "type": "boolean"
        },
        "legend": {
          "type": "boolean"
        }
      },
      "additionalProperties": {}
    },
    "node_count": {
      "type": "number"
    },
    "edge_count": {
      "type": "number"
    },
    "stop_reason": {
      "type": "string"
    },
    "fallback_reason": {
      "type": "string",
      "enum": [
        "unsupported_diagram_kind",
        "node_cap_exceeded"
      ]
    },
    "watermark": {
      "type": "boolean"
    },
    "signed_in": {
      "type": "boolean"
    },
    "engine_version": {
      "type": "string"
    },
    "mermaid_version": {
      "type": "string"
    },
    "open_url": {
      "type": "string"
    },
    "svg": {
      "type": "string"
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "plan": {
      "type": "string"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "diagram": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "visibility": {
          "type": "string"
        },
        "version": {
          "type": "number"
        },
        "url": {
          "type": "string"
        },
        "workspace_id": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "diagrams": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "type": "number"
          },
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        },
        "additionalProperties": {}
      }
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "status"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": {}
}

Recommended Prompts

retrieve_data
Get details about [item] from Line9
Expected tools: get_diagram
fetch_info
Fetch [information type] using Line9
Expected tools: get_diagram
list_items
List all [items] available in Line9
Expected tools: list_diagrams
browse_collection
Show me the [collection] from Line9
Expected tools: list_diagrams
explore_workflow
List available [items], then get details for each one using Line9
Expected tools: list_diagramsget_diagram

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded3 tools
verifiedversion not recorded3 tools