Skip to main content
Glama
README.md
# dify-canvas-mcp

**MCP server for Dify workflow canvases.** Read, patch, publish and test drafts through the user's signed-in Chrome — in any MCP client (Qoder, DSH, Claude Desktop, …).

## Tools

| Tool | What it does |
| --- | --- |
| `dify_instances` | List configured instances |
| `dify_setup` | Add/update an instance (alias + site URL only) |
| `dify_browser_status` | Show which browser channel is available |
| `dify_browser_launch` | Start a dedicated Chrome with a debugging port |
| `dify_apps` | List apps (an app can be referenced by name later) |
| `dify_canvas_get` | Draft node index (+ hash), or one node in full |
| `dify_canvas_patch` | Patch nodes; dry-run by default, `apply:true` writes with backup + self-check + reload verification |
| `dify_canvas_publish` | Publish and verify the published hash |
| `dify_run` | Run the draft once and return the executed node path |

## Install

```sh
npm i -g dify-canvas-mcp
# or run without installing:
npx -y dify-canvas-mcp
```

MCP client config (stdio):

```json
{
  "mcpServers": {
    "dify-canvas": {
      "command": "npx",
      "args": ["-y", "dify-canvas-mcp"]
    }
  }
}
```

## First use

The transport is resolved automatically, in this order:

1. **Your daily Chrome, via `--autoConnect`** — nothing to restart or reopen. Chrome asks for permission once (`chrome://inspect` remote debugging), then the connection is kept alive and reused. This preserves your sign-ins, extensions and tabs.
2. **chrome-pool** on `127.0.0.1:3333`, when present (one shared authorized connection).
3. **A Chrome started with `--remote-debugging-port`**.
4. `dify_browser_launch` — a dedicated Chrome window (isolated profile, sign in once) as the fallback.

Then:

```
dify_setup { alias: "prod", baseUrl: "https://dify.example.com" }
```

From then on, say the app's **name** — no UUID needed.

## Credentials

The credential is the browser session. No cookie or token is stored on disk. Config lives in `~/.dify-canvas/config.json`; backups of every written draft go to `~/.dify-canvas/backups/`.

## Write safety

- `dify_canvas_patch` is dry-run unless `apply:true`.
- Pre-write: on-disk backup + self-check (dangling edges, self loops, `default_value` types, code-node parameter mismatch).
- Post-write: page reload, rendered-node count, crash banners.
- `dify_canvas_publish` verifies the published hash against the draft hash.

MIT.

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a clearly distinct resource or lifecycle stage: instance configuration, browser channel status/launch, app listing, draft read/patch/publish, and draft test run. The status-versus-launch and read-versus-patch-versus-publish boundaries are explicit. No two tools appear to perform the same action.

Naming Consistency4/5

All names use a consistent snake_case style with the dify_ prefix and meaningful resource grouping such as browser_ and canvas_. However, the convention is not uniformly verb_noun: some are noun-only list-style names (dify_instances, dify_apps), while others are verb-based (dify_run) or resource_action combinations. This is readable and mostly predictable, with only minor deviations.

Tool Count5/5

Nine tools is well-scoped for a Dify canvas management server. Instance setup, browser handling, app discovery, draft inspection, editing, publishing, and test running each earn their place without redundant coverage.

Completeness3/5

The surface covers listing apps, reading drafts, modifying existing nodes, publishing, running drafts, and supporting instance/browser setup. However, there are notable authoring gaps: no tool creates or deletes canvas nodes, and dify_canvas_patch explicitly only modifies existing nodes. Creating new apps/workflows is also absent, limiting full lifecycle coverage.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues