DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

🚀 Feature: draw.io MCP connector preset

Open dartpain opened this issue 2 months ago • 2 comments

🔖 Feature description

Add draw.io to the Connectors catalog as a remote MCP preset, so agents can draw flowcharts, architecture diagrams and other diagrams and hand the user a link that opens the result in the draw.io editor.

draw.io runs an official hosted MCP server at https://mcp.draw.io/mcp (jgraph/drawio-mcp). It needs no sign-in at all, which the preset inclusion rules allow (see the top of docsgpt/connectors/presets/mcp.yaml).

🎤 Why is this feature needed?

"Draw our ingestion pipeline as a flowchart" is a very common request in a docs and engineering assistant. draw.io diagrams are editable and widely used, and the server works for every DocsGPT user with no account.

✌️ How do you aim to achieve this?

  1. Add an entry to docsgpt/connectors/presets/mcp.yaml, following the existing ones:
    • key: mcp:drawio, name: draw.io, a one-line description
    • icon: drawio, category: projects
    • mcp_url: https://mcp.draw.io/mcp
    • capabilities: [read]; confirm with tools/list
    • docs_url: https://github.com/jgraph/drawio-mcp
  2. Add the icon at frontend/src/assets/connectors/drawio.svg (draw.io's official mark).
  3. Add the description key settings.connectors.descriptions.mcp_drawio to all seven locale files in frontend/src/locale/ (de en es jp ru zh zh-TW).
  4. Add draw.io to the preset lists in docs/content/Sources/Connectors/index.mdx (the "MCP presets" section) and docs/content/Tools/mcp-tools.mdx.
  5. Update tests/connectors/test_catalog.py if it lists or validates the presets.

Notes for draw.io:

  • It needs no sign-in.
    • Every existing preset uses auth_kind: mcp_oauth. In frontend/src/connectors/useConnectorLauncher.tsx, entries with auth_kind mcp or mcp_oauth open the MCP server form prefilled from the preset. An entry with auth_kind: none falls through to the generic connector wizard instead.
    • Start with auth_kind: mcp and confirm that connecting saves a working server without asking for anything.
    • Excalidraw (#2914) and CoinGecko (#2917) have the same question. Reuse whichever approach lands first; if this lands first, include any small fix (with a test).
  • Tools:
    • create_diagram takes draw.io XML or Mermaid and returns an app.diagrams.net link.
    • search_shapes finds shapes in draw.io's libraries.
    • The server also ships an inline MCP Apps view. DocsGPT doesn't render those yet (tracked in #2913), so the link is the useful result for now.
  • Sessions: the server is stateful and returns an mcp-session-id header. Confirm that a multi-step conversation (create, then revise the diagram) keeps working.
  • Privacy: with the hosted server, diagram content is sent to draw.io's servers. jgraph's README documents this and a self-hosted option. Mention it in the docs line.

Other presets are being added in parallel this month and touch the same YAML and locale files, so expect to rebase on main before merge.

Acceptance criteria

  • draw.io appears on the Connectors page with its icon and description in every locale.
  • Connecting it needs no sign-in or form input, and the connection then works as an agent tool.
  • Asking an agent to "draw a flowchart of how a RAG pipeline answers a question" returns a link that opens the diagram in draw.io.
  • ruff check ., python -m pytest tests/connectors and cd frontend && npm run lint pass. If you change frontend logic, also run npm run build.

🔄️ Additional Information

Please attach a screenshot of the draw.io card on the Connectors page and of the diagram opened from the agent's link. UI work follows frontend/DESIGN.md.

dartpain avatar Oct 03 '26 08:10 dartpain

Hi! I'd like to take this one on. I'll add the draw.io preset, icon, translations and docs, then test the connection and creating/editing a diagram. Could you assign it to me? Thanks!

haddybhaiya avatar Oct 03 '26 12:10 haddybhaiya

@haddybhaiya, you're assigned.

  • Open a PR or post a progress update within 14 days; otherwise the issue may be reassigned.
  • Read CONTRIBUTING.md and frontend/DESIGN.md before starting.
  • Include screenshots or a short recording in the PR showing the draw.io connector card and the diagram opened from the agent's link.

Automated triage. A maintainer will follow up.

arc53-machine avatar Oct 03 '26 12:10 arc53-machine