Skip to main content
Agent commands. Your AI agent uses this node in workflows. You manage the MCP servers that provide these tools with pflow mcp commands.
MCP (Model Context Protocol) lets you extend pflow with external tools. When you add an MCP server, its tools become pflow nodes — same validation, same error handling, same template access as built-in nodes.

How it works

  1. Add an MCP server with pflow mcp add
  2. Sync tools with pflow mcp sync (or let auto-sync handle it)
  3. Tools become nodes named mcp-{server}-{tool}
  4. Agent uses them like any other node

Node naming

MCP tools become nodes with the pattern mcp-{server}-{tool}:

Parameters

MCP node parameters come directly from the tool’s input schema. Each MCP server defines its own tools with their own parameters. To see a tool’s parameters:

Output

All MCP nodes write to: For dict results, read nested fields through result: If a tool returns {"issue_url": "...", "issue_number": 123}, use:
MCP nodes do not extract top-level result fields into ${node.field} and do not write a {server}_{tool}_result alias. Each workflow node already has its own namespace, so ${node.result} is the canonical success output.

Example workflow

Setup

To use MCP tools, first add MCP servers to pflow. See Adding MCP servers for configuration format, authentication, and examples. pflow supports both local (stdio) and remote (HTTP) MCP servers. Both work identically in workflows - same naming, parameters, and output structure.

Error handling

MCP nodes return error action on:
  • Connection failure: Server not reachable
  • Tool error: Tool reported an error (via isError flag)
  • Timeout: Request took too long (default 30 seconds)
The node does not retry automatically - MCP calls start a server subprocess, and retries would cause resource conflicts.

Auto-sync

When you run a workflow, pflow automatically syncs MCP tools if the server configuration has changed. You don’t need to manually run pflow mcp sync after adding servers. Manual sync is useful for:
  • Testing connection immediately after adding a server
  • Debugging connection issues
  • Forcing re-discovery without running a workflow