Skip to main content
Glama
diagrammo
by diagrammo

@diagrammo/dgmo-mcp

用于渲染 DGMO 图表的 MCP 服务器。适用于 Claude Desktop、Claude Code 以及任何兼容 MCP 的 AI 工具。

工具

工具

描述

render_diagram

将 DGMO 标记渲染为 SVG 或 PNG

share_diagram

生成可分享的 diagrammo.app URL

open_in_app

在 Diagrammo 桌面应用中打开图表(如果未安装,则回退到浏览器)

list_chart_types

列出所有支持的图表类型

get_language_reference

获取 DGMO 语法文档

preview_diagram

渲染一个或多个图表并在浏览器中打开 HTML 预览

generate_report

生成包含多个图表、目录和可选源代码的精美 HTML 报告

preview_diagram

将一个或多个 DGMO 图表渲染为 SVG,并在默认浏览器中打开一个独立的 HTML 页面。该页面包含亮色/暗色主题切换和响应式 SVG 布局。

参数

类型

默认值

描述

diagrams

[{ title?, dgmo }]

(必填)

要预览的一个或多个图表

theme

`'light'

'dark'`

'light'

渲染 SVG 的颜色主题

palette

string

'nord'

调色板

include_source

boolean

false

在可折叠块中显示 DGMO 源代码

单个图表将渲染为简单的预览页面。多个图表将生成报告样式的布局,并带有目录(当超过 3 个部分时)。如果某些图表渲染失败,成功的图表将显示,失败的图表将显示错误占位符。

generate_report

生成精美的多部分 HTML 报告,并可选择在浏览器中打开。包含标题、可选副标题、自动生成的目录、各部分描述以及时间戳页脚。适用于将项目分析打包成可分享的文档。

参数

类型

默认值

描述

title

string

(必填)

报告标题

subtitle

string

可选副标题

sections

[{ title, description?, dgmo }]

(必填)

报告部分,每一部分包含一个图表

theme

`'light'

'dark'`

'light'

渲染 SVG 的颜色主题

palette

string

'nord'

调色板

include_source

boolean

false

在可折叠块中显示 DGMO 源代码

open

boolean

true

在浏览器中打开报告

Related MCP server: drawio

设置

Claude Code

添加到项目的 .claude/settings.local.json 中:

{
  "mcpServers": {
    "dgmo": {
      "command": "npx",
      "args": ["-y", "@diagrammo/dgmo-mcp"]
    }
  }
}

Claude Desktop

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json 中:

{
  "mcpServers": {
    "dgmo": {
      "command": "npx",
      "args": ["-y", "@diagrammo/dgmo-mcp"]
    }
  }
}

保存后重启 Claude Desktop。工具将自动出现。

开发

pnpm install
pnpm build
pnpm typecheck

若要针对 ../dgmo 中检出的未发布 @diagrammo/dgmo 进行迭代,请在安装使用工作区符号链接覆盖 npm 解析的依赖项:

pnpm install
pnpm link ../dgmo   # symlink node_modules/@diagrammo/dgmo → ../dgmo
pnpm --filter @diagrammo/dgmo build   # ensure dist/ is up to date

pnpm install 会撤销该链接,因此如果依赖项发生变化,请重新运行 pnpm link ../dgmo

发布

发布通过 .github/workflows/release.yml 进行标签驱动:

  1. 提升所有三个文件中的版本号(必须完全匹配 — 工作流会进行验证):

    • package.jsonversion

    • manifest.jsonversion

    • server.jsonversion 以及 packages[0].version

  2. 提交并打标签:

    git commit -am "Release vX.Y.Z"
    git tag vX.Y.Z
    git push && git push --tags
  3. 工作流将运行类型检查 + 构建,发布带有来源证明的 npm 包,打包 .mcpb,通过 GitHub OIDC 发布到 MCP 注册表,并将 .mcpb 附加到 GitHub 发布版本中。

所需密钥

  • NPM_TOKEN — 作用域为 @diagrammo/* 写入权限的 npm 精细访问令牌。设置 → Secrets and variables → Actions → New repository secret。

MCP 注册表身份验证会自动使用 GitHub OIDC(无需令牌),因为仓库位于 diagrammo 组织下,且服务器命名空间为 io.github.diagrammo/*

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
11dResponse time
2dRelease cycle
52Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that generates Mermaid diagrams with live browser preview, supports real-time rendering and SVG/PNG export.
    12
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for creating and editing diagrams using draw.io. Allows generating diagrams from Mermaid or XML, searching shapes, and opening them in draw.io for export.
    2
    0
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for generating diagrams, charts, and visualizations using Gemini image generation on Vertex AI. Supports auto-detection of diagram types, multiple style modes, and iterative refinement.
    3
    16
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Diagrams, badges, charts and QR codes as plain image URLs you can paste into Markdown.

  • Generate cloud architecture diagrams, flowcharts, and sequence diagrams.

  • Official Miro MCP server - Supports context to code and creating diagrams, docs, and data tables.

View all MCP Connectors

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/diagrammo/dgmo-mcp'

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