Author DAGs With Connections
Experimental
Connections are experimental and off by default. Turn them on with experimental_connections: true in config.yaml, or DAGU_EXPERIMENTAL_CONNECTIONS=true. While they are off, the editor completes and checks no connection, and the Tools panel and the starter DAG do not exist. See Turn Connections On.
Editor Completion
The DAG editor in the Web UI completes connection fields from the connections of the DAG's workspace, the one its workspace label names, or the global connections without one:
| Field | Completes |
|---|---|
connection in mcp.call | Every connection |
connection in http.request, a mail account, and smtp | Every connection except mcp ones, whose token is only for their MCP server |
tool and the keys of arguments in mcp.call | The tools of the mcp connection the step names, with their input schemas |
- The editor reads the connection list once per editing session, and the tools of each connection it names once. A keystroke reads nothing.
- Tools come from the connection's saved tool list, which needs
developeror above in the workspace. - A DAG of a remote node gets no completion, since this server does not serve that node's connections.
Editor Warnings
While connections are on, the editor's validation checks the connections a DAG names, as warnings. A warning blocks no save.
| Warning | Cause |
|---|---|
connection "x" is not in workspace "ops"; a run fails before its first step | The DAG's workspace has no such connection. For a mail account or smtp, mail sent through it fails instead |
| An admission check fails | A literal http.request URL is not HTTPS on a bound host, or an mcp.call sets server beside an mcp or oauth2 connection |
connection "x" is an mcp connection, whose token is only for its MCP server; use an oauth2 connection | An mcp connection in http.request, a mail account, or smtp |
the DAG's workspace labels name no single valid workspace | The workspace labels are malformed, or name two workspaces |
the oauth block is deprecated, and keeps working; ... | A mail oauth block. See Move From oauth Blocks |
The checks read each named connection's record, and no token. A pending or needs_reconnect connection passes them. Users with no role in the DAG's workspace get no connection warnings, since the warnings tell which connections it has.
Try It and Copy as Step
The Tools panel of the connection page lists each tool of an MCP connection, with its input schema. Developers of the workspace can:
- Try it: fill in a form built from the tool's input schema and call the tool once. A tool not marked read-only asks first. A confirmation request from the server is shown inline, and only the user who started the call can answer it.
- Copy as step: copy the tool as an
mcp.callstep that names the connection, with the arguments in the form. A$in an argument is escaped, so the step sends the same text that Try it sent.
- id: call_list_issues
action: mcp.call
with:
connection: tracker
tool: list_issues
arguments:
state: open2
3
4
5
6
7
The CLI does the same:
dagu connection tools tracker --workspace ops
dagu connection call tracker --workspace ops --tool create_issue --args '{"title": "Disk full"}'2
dagu connection call prints the step's output as JSON. A tool not marked read-only is called only after a yes, or with --yes. --yes never answers the server's own form. Without a terminal, the command declines each form and fails with confirmation_required.
Limits of Try it and dagu connection call:
- Each request waits at most 50 seconds for the output or the next form. A slower tool fails with kind
timeout. - A call waiting for an answer is held for up to 10 minutes, by the server that took it. Behind several frontend replicas, an answer that reaches another replica fails with
call_not_found, and the page offers Call again. - A server holds at most 8 calls at once, 4 per user. Arguments or an answer over 64 KiB are refused. Output over 128 KiB, or responses over 192 KiB, fail with kind
too_large.
Tool lists are cached for 10 minutes per connection on each host, so the panel, dagu connection tools, and repeated reads cost the MCP server at most one listing per 10 minutes.
Starter DAG
After a sign-in, the connect dialog offers a starter DAG under Start from a template, and Create DAG saves it. The CLI prints it too, with the connection's name filled in:
dagu example connection-mcp-call --connection trackerdagu example lists the starter DAG, as connection-mcp-call, only when experimental_connections is on in the configuration it reads. --connection applies only to the connection-* examples. GET /connection-templates?connection=tracker returns the same DAGs.
The DAG takes the URL, tool, and arguments as parameters. For an mcp connection, URL is the MCP server's own URL, the one the connection was created with:
type: graph
params:
- name: URL
type: string
description: The MCP server's URL, on one of the connection's bound hosts
required: true
- name: TOOL
type: string
description: The tool to call. The connection page and dagu connection tools list them
required: true
- name: ARGUMENTS
type: string
description: The tool's arguments, as a JSON object
required: true
default: "{}"
steps:
- id: call
action: mcp.call
with:
connection: "tracker"
url: ${params.URL}
tool: ${params.TOOL}
arguments: ${params.ARGUMENTS}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
The getting started list on the home page offers Connect an account until the workspace has a connection that signed in.
Read Connections From an MCP Client
Dagu's own MCP server lets an AI client read connections while they are on. dagu_read takes target=connections, a page of 50 connections unless perPage says otherwise, and target=connection, one connection with the tools of each MCP service from its saved tool list. Both return names, providers, services, bound hosts, the MCP server's URL, and status, with the roles of the Connections page, and never a token or secret. The tools need developer or above in the connection's workspace.

