This report summarizes scanner evidence for jgraph/drawio-mcp, a JavaScript project with 5,605 GitHub stars. SynthScan examined 26,287 lines of code across 79 source files, recording 90 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 6.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 48 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 55 finding(s).
Which changes need focused human review? 90 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 90 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 60 | // ─── No-ops ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 73 | // ─── Routing ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 128 | // ─── Pages (#73) ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 128 | // ─── Pages (#73) ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 170 | // ─── Wrapped cells ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 203 | // ─── Determinism ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 254 | // ─── Unroutable connectors ─────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/libavoid-pass.test.js | 312 | // ─── Rotated shapes ────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/mermaid-elk.test.js | 9 | // ─── Diagram type (drawio-dev's getMermaidDiagramType) ─────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/mermaid-elk.test.js | 37 | // ─── Selecting the ELK layout ──────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/mermaid-elk.test.js | 96 | // ─── The trigger draw.io actually uses ─────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/elk-pass.test.js | 63 | // ─── No-ops (no ELK bundle needed) ─────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/elk-pass.test.js | 74 | // ─── Layout ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/elk-pass.test.js | 267 | // ─── Headless mxGraph shim ─────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/normalize-model.test.js | 166 | // ─── Entities in attribute values ──────────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/normalize-model.test.js | 230 | // ─── Edges written without a geometry ──────────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/test/normalize-model.test.js | 255 | // ─── Containers that clip their children ───────────────────────── | COMMENT |
| MEDIUM | mcp-tool-server/src/elk-pass.js | 57 | // ─── Layout ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 58 | // ── Create jsdom with minimal stubs ────────────────────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 157 | // ── Load app.min.js ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 171 | // ── Intercept template entry calls ─────────────────────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 227 | // ── Build a minimal Sidebar and run initPalettes ───────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 324 | // ── Run initPalettes to trigger all shape registrations ────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 339 | // ── Deduplicate by style string ────────────────────────────────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 357 | // ── Derive titles for shapes that have tags but no title ──────────────────── | COMMENT |
| MEDIUM | shape-search/generate-index.js | 411 | // ── Write output ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/shape-search.js | 1 | // ── Shape search ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-xml.js | 21 | // ─── Parsing ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-xml.js | 239 | // ─── Model construction ────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-xml.js | 347 | // ─── Write-back ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/icon-search.js | 1 | // ── Icon search ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-model.js | 31 | // ─── mxGraph globals ───────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-model.js | 137 | // ─── Model ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-model.js | 646 | // ─── Graph ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | shared/mx-model.js | 786 | // ─── Normalization (mirrors Graph.prototype.normalizeModel) ────── | COMMENT |
| MEDIUM | mcp-app-server/src/worker.js | 61 | // ── Sessions ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/worker.js | 159 | // ── MCP ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/shared.js | 1238 | // ─── Layout gate ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/shared.js | 6414 | // ── Diagram validation ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/shared.js | 6580 | // ── Fallback for clients without an MCP Apps UI ────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/shared.js | 6690 | // ── Server ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp-app-server/src/shared.js | 6929 | // ── search_shapes tool (only registered when shapeIndex is provided) ─────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mcp-tool-server/src/elk-engine.js | 1 | // Loads the drawio-elk bundle (ELK engine + mxGraph bridge) for the | COMMENT |
| LOW | mcp-tool-server/src/index.js | 81 | const sharedMermaidPath = join(__dirname, "..", "..", "shared", "mermaid-reference.md"); | COMMENT |
| LOW | mcp-tool-server/src/libavoid-pass.js | 1 | // Server-side libavoid edge-routing pass for open_drawio_xml. | COMMENT |
| LOW | mcp-tool-server/src/libavoid-pass.js | 21 | const __dirname = dirname(fileURLToPath(import.meta.url)); | COMMENT |
| LOW | mcp-tool-server/src/cdn-cache.js | 1 | // Local cache for browser sources loaded from the draw.io CDN, with | COMMENT |
| LOW | mcp-tool-server/src/cdn-cache.js | 21 | // npm's postinstall primes the routing core (src/postinstall.js) so the first | COMMENT |
| LOW | mcp-tool-server/src/elk-pass.js | 1 | // Server-side ELK layout pass for open_drawio_xml (`postLayout: "elk"`). | COMMENT |
| LOW | shared/mx-xml.js | 1 | // mxGraphModel XML <-> headless model, for the server-side diagram passes. | COMMENT |
| LOW | shared/icon-search.js | 1 | // ── Icon search ────────────────────────────────────────────────────────────── | COMMENT |
| LOW | shared/mx-model.js | 1 | // Headless mxGraph model for the servers' diagram passes. | COMMENT |
| LOW | shared/normalize-model.js | 1 | // Model normalization for generated diagrams. | COMMENT |
| LOW | shared/normalize-model.js | 21 | // Two more mistakes travel with the same diagrams and are repaired in the | COMMENT |
| LOW | shared/mermaid-elk.js | 1 | // Mermaid → ELK layout selector. | COMMENT |
| LOW | mcp-app-server/wrangler.toml | 21 | # OpenAI plugin-directory domain verification token, served verbatim at | COMMENT |
| LOW | mcp-app-server/src/build-html.js | 61 | COMMENT | |
| LOW | mcp-app-server/src/index.js | 81 | { | COMMENT |
| LOW | mcp-app-server/src/libavoid-versions.js | 1 | // ETag-versioned CDN URLs for the libavoid script block. | COMMENT |
| LOW | mcp-app-server/src/shared.js | 61 | // execution. The routing pass awaits __libavoidReady on demand; failures | COMMENT |
| LOW | mcp-app-server/src/shared.js | 1361 | { | COMMENT |
| LOW | mcp-app-server/src/shared.js | 1381 | // Placement rules: the config key must live INSIDE the frontmatter (Mermaid | COMMENT |
| LOW | mcp-app-server/src/shared.js | 1641 | { | COMMENT |
| LOW | mcp-app-server/src/shared.js | 2501 | COMMENT | |
| LOW | mcp-app-server/src/shared.js | 3321 | // CSS-transform based soft-follow. mxGraph's view stays at scale=1, | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3341 | // while staying compact enough that the user doesn't see a big empty | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3361 | // the latest few cells — if it includes most of the diagram, the | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3381 | // view, small enough that there's a visible pull-back at finalize. | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3401 | var STREAM_BATCH_PULLBACK_MIN = 0.45; | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3421 | var recentVertexQueue = []; | COMMENT |
| LOW | mcp-app-server/src/shared.js | 3781 | // camera follows those jumps faithfully, which reads as visible | COMMENT |
| LOW | mcp-app-server/src/shared.js | 4001 | // (max-height, viewport, etc.) can clamp our requested height, | COMMENT |
| LOW | mcp-app-server/src/shared.js | 5281 | // --- Layout button: toggles between as-authored and one alternative --- | COMMENT |
| LOW | mcp-app-server/src/shared.js | 5721 | { | COMMENT |
| LOW | mcp-app-server/src/shared.js | 6241 | // When the tab becomes visible, re-notify our size so the host can | COMMENT |
| LOW | .github/workflows/publish-tool-server.yml | 1 | name: Publish Tool Server | COMMENT |
| LOW | .github/workflows/publish-app-server-image.yml | 1 | name: Publish App Server Image | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mcp-app-server/src/index.js | 169 | async function startStreamableHTTPServer() | CODE |
| LOW | mcp-app-server/src/shared.js | 635 | function expandEdgesToEndpointVertexIds(graph, ids) | CODE |
| LOW | mcp-app-server/src/shared.js | 776 | function firstMermaidDirectiveLine(text) | CODE |
| LOW | mcp-app-server/src/shared.js | 821 | function isMermaidHorizontalFlowchart(text) | CODE |
| LOW | mcp-app-server/src/shared.js | 1303 | function rememberMermaidConversion(text, xml) | CODE |
| LOW | mcp-app-server/src/shared.js | 2719 | function waitForPendingAnimationsToSettle() | CODE |
| LOW | mcp-app-server/src/shared.js | 3150 | function hideAndRedrawEdgesForMorph(graph, morphedIdSet) | CODE |
| LOW | mcp-app-server/src/shared.js | 3258 | function penDrawAllEdgesAfterMorph(graph) | CODE |
| LOW | mcp-app-server/src/shared.js | 3663 | function computeTransitionDuration(curS, curTx, curTy, tgtS, tgtTx, tgtTy, viewportSpan) | CODE |
| LOW | mcp-app-server/src/shared.js | 4534 | function enableViewerInteractivity(graph) | CODE |
| LOW | mcp-app-server/src/shared.js | 5262 | function computeTopAnchoredTransform(targetScale) | CODE |
| LOW | mcp-app-server/src/shared.js | 5311 | function captureOriginalCellGeometries(graph) | CODE |
| LOW | mcp-app-server/src/shared.js | 5331 | function restoreOriginalGeometriesToModel(model) | CODE |