Connector
A connector is an outside service, reached over MCP, that the tasks linked to it can use.
Syntax
text
connector id["Label"]@{ protocol: "mcp", url: "…" }
connector id["Label"]
id@{ protocol: "mcp", url: "…" }The connector keyword is what makes it a connector. The label is optional.
Settings
| Setting | Required | Value | Example |
|---|---|---|---|
protocol | yes | "mcp" | protocol: "mcp" |
url | yes | a full address | url: "https://example.com/mcp" |
Where it can go
A connector sits at the top level of the workflow and holds nothing. Tasks in any flow can link to it.
| Arrow | In from | Out to |
|---|---|---|
Arrow (-->) | — | — |
Dotted link (-.-) | task | task |
Rules
- A connector sits at the top level of the workflow. →
CONNECTOR_NOT_ROOT(error) - A connector is linked to at least one other node, which must be a task. →
CONNECTOR_UNBOUND(error); a link from anything but a task isEDGE_KIND_INVALID(error) - Only a task links to a connector, and only with a dotted link. →
EDGE_KIND_INVALID(error) - A task links to a connector once. →
CONNECTOR_BINDING_DUPLICATE(warning) - A connector's id isn't
system, which belongs to the built-in tools. →CONNECTOR_ID_RESERVED(error) - A connector has both
protocolandurl. →METADATA_REQUIRED(error) - A connector takes no other setting. →
METADATA_UNKNOWN_KEY(warning) protocolis"mcp"andurlis a full address. →METADATA_INVALID_VALUE(error)- A connector's id is used by no other node. →
ID_DUPLICATE(error)
Example
Code:
mermaid
agentflow TB
connector github["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
github -.- label
end
Common mistake
A connector written inside a flow.
Code:
mermaid
agentflow TB
flow triage["Issue triage"]
connector github["GitHub"]@{ protocol: "mcp", url: "https://api.githubcopilot.com/mcp/" }
read["Read issues"]@{ instruction: "List the open issues labelled bug." }
read -.- github
end
Connector "github" is inside flow "triage", but connectors belong at the top level of the workflow. Move it out of the flow.