5. Using connectors
A connector is an outside service a task can use: a server that gives agents tools over the Model Context Protocol (MCP). Put it at the top level of the workflow, and link it to each task that needs it with a dotted link (-.-).
Code:
agentflow TB
connector github["GitHub"]@{ protocol: "mcp", url: "https://api.githubcopilot.com/mcp/" }
flow triage["Issue triage"]
read["Read issues"]@{ instruction: "List the open issues labelled bug." }
label["Label issues"]@{ instruction: "Add a priority label to each bug." }
read --> label
read -.- github
label -.- github
end
A connector needs two settings:
protocol— always"mcp".url— the full address of the server.
You can also write the settings on their own line, after the connector:
connector github["GitHub"]
github@{ protocol: "mcp", url: "https://api.githubcopilot.com/mcp/" }A dotted link has no direction, so read -.- github and github -.- read mean the same. Only a task can link to a connector, and a connector is never part of the order of steps. An arrow to a connector is an error.
Code:
agentflow TB
connector github["GitHub"]@{ protocol: "mcp", url: "https://api.githubcopilot.com/mcp/" }
flow triage["Issue triage"]
read["Read issues"]@{ instruction: "List the open issues labelled bug." }
read --> github
end
Connector "github" can't be the target of an arrow. Link it with a dotted link instead: <task> -.- github.
A connector that no task links to is an error too, because nothing can use it.
Next: 6. Starting a flow.