Releases: alexjiaguo/dify-mcp
Releases · alexjiaguo/dify-mcp
Release list
v0.2.0 - Safer auth, cookie-complete authoring
What shipped
Cookie+CSRF is now the full authoring path. MCP hosts can log in without the CLI, HTTP MCP is locked down off localhost, and cookie-only sessions can run, stop, upload, and manage workspaces. 153 tools across 18 namespaces.
New Features
- MCP login tools:
auth.import_cookies,auth.login_console, andauth.set_tokensso agents can authenticate without dropping to the CLI. - Cookie-complete runs: published run/stop, file upload, dependency checks, and workspace get/switch/members work with console cookies (OpenAPI is fallback).
- Plugin lifecycle:
plugin.get,plugin.install, andplugin.uninstall. - Chat and completion:
app.chatandapp.completeover the console SSE surface. - Node last-run:
workflow.node_last_runfor draft debugging. - Non-interactive cookies:
DIFY_CONSOLE_COOKIEand--console-cookie(Cookie header or cookie-editor JSON).
Improvements
- HTTP MCP lock: binds
127.0.0.1by default. Non-loopback binds (including Docker) requireDIFYWF_MCP_TOKEN. Host allowlist, 2MB body cap,/healthstays open for probes. - Secret store:
~/.difywfis0700/ files0600. On macOS, cookies and tokens prefer the OS keychain unlessDIFYWF_HOMEis set. - Draft sync: omitting env/conversation variables keeps current draft values instead of wiping them.
graph_jsonis accepted. Stale hash is retryableVALIDATION_FAILED. - Uploads:
{name, content_b64, mime?}is sent as multipart FormData. - Export secrets:
app.export include_secret=truerequiresconfirm=true. - Workspace switch persists
workspace_idin the local store. - Audit log: nested secret/graph redaction, mode
0600. - Timeouts: HTTP 60s / SSE 300s (
DIFYWF_HTTP_TIMEOUT_MS/DIFYWF_SSE_TIMEOUT_MS).
Safety
- Confirm gates added for copy/convert, trigger create/enable, feature replace, variable create, snippet import confirm, and plugin install/uninstall.
- Code nodes default to confirm (
DIFYWF_CODE_NODES=confirm|allow|forbid). - Private
http-requestURLs warn; privateyaml_urlimports are blocked unlessDIFYWF_ALLOW_PRIVATE_URL=1. difywf mcponly acceptsserve.--output-filereports the realokstatus.
Breaking changes
- HTTP MCP: default bind is
127.0.0.1, not0.0.0.0. Docker setsDIFYWF_MCP_HOST=0.0.0.0and requiresDIFYWF_MCP_TOKEN. - Tag/tool readback failures now return
SERVER_ERRORinstead ofDSL_VERSION_MISMATCH.
Stats
- 153 tools, 18 namespaces
- 99 unit tests (all passing)
- Typecheck clean
- MCP stdio + Streamable HTTP smoke in CI
See the README for setup, including DIFY_CONSOLE_COOKIE and HTTP MCP tokens.
v0.1.0 - The complete Dify MCP server + CLI
What is this?
dify-mcp exposes the entire Dify console API as 138 tools across 16 namespaces - so any AI agent can build, test, and ship Dify workflows programmatically, without a browser.
Highlights
- 138 tools, 16 namespaces - app, workflow, provider, plugin, trigger, workspace, file, runs, stats, comment, annotation, audio, RAG, snippet, agent, explore
- Agent-agnostic - works with Claude Code, Codex, Gemini CLI, Cursor, Cline, Windsurf, Roo Code, Continue, Zed, Aider, and any MCP-compatible or shell-capable agent
- Dual surface - CLI (
difywf) + MCP server (stdio), same tools, same JSON contract - Cookie + CSRF auth - handles Dify's session auth with auto-refresh and token-rotation persistence
- Safe by default - confirm gates on destructive ops, offline graph validation, audit log, dry-run support
- Zero build step - runs on Node 23.6+ native TypeScript
- Live-verified against cloud.dify.ai - full authoring loop tested end-to-end
Quick start
git clone https://github.com/alexjiaguo/dify-mcp.git
cd dify-mcp && npm install && npm link
difywf auth import-cookies --base-url https://cloud.dify.ai --file cookies.json
difywf app listConnect your agent
# Claude Code
claude mcp add dify -- difywf mcp serve
# Codex (~/.codex/config.toml)
[mcp_servers.dify]
command = "difywf"
args = ["mcp", "serve"]See the README for all supported agents and full setup.
Stats
- 138 tools
- 42 unit tests (all passing)
- Typecheck clean
- MCP smoke passing
- Live-verified against cloud.dify.ai