Skip to main content
The pflow mcp command group manages Model Context Protocol (MCP) server connections. MCP servers expose external tools that can be used in pflow workflows.
Setup commands. You run add, remove, and sync to configure MCP servers. Your agent uses tools and info to discover available tools when building workflows.

Commands

CommandDescription
addAdd MCP servers from config
listList configured servers
removeRemove a server
syncDiscover and register tools
toolsList registered MCP tools
infoShow tool details
serveRun pflow as an MCP server

pflow mcp add

Add MCP servers from config files or JSON.
pflow mcp add <CONFIG_SOURCE>...
Arguments:
  • CONFIG_SOURCE - One or more config file paths or raw JSON strings
Examples:
# Add from config file
pflow mcp add ./github.mcp.json

# Add from raw JSON (simple format)
pflow mcp add '{"github": {"command": "npx", "args": ["-y", "@github/mcp-server"]}}'

# Add HTTP server
pflow mcp add '{"slack": {"type": "http", "url": "https://mcp.example.com/slack"}}'

# Add multiple servers
pflow mcp add github.mcp.json slack.mcp.json
Config formats: Simple format (recommended):
{
  "github": {
    "command": "npx",
    "args": ["-y", "@github/mcp-server"],
    "env": {
      "GITHUB_TOKEN": "${GITHUB_TOKEN}"
    }
  }
}
Full MCP format (compatible with Claude Desktop):
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@github/mcp-server"]
    }
  }
}
HTTP server format:
{
  "slack": {
    "type": "http",
    "url": "https://mcp.example.com/slack",
    "headers": {
      "Authorization": "Bearer ${TOKEN}"
    }
  }
}
Environment variables in env and headers support ${VAR} and ${VAR:-default} syntax. They expand at runtime.

pflow mcp list

List all configured MCP servers.
pflow mcp list [--json]
Options:
  • --json - Output as JSON
Output:
Configured MCP servers:

  github:
    Transport: stdio
    Command: npx -y @github/mcp-server
    Environment: GITHUB_TOKEN=${GITHUB_TOKEN}

  slack:
    Transport: http
    URL: https://mcp.example.com/slack

pflow mcp remove

Remove an MCP server configuration.
pflow mcp remove <NAME> [--force]
Arguments:
  • NAME - Server name to remove
Options:
  • --force, -f - Skip confirmation prompt
Examples:
# Remove with confirmation
pflow mcp remove github

# Remove without confirmation
pflow mcp remove github --force
Removing a server also removes all its tools from the registry.

pflow mcp sync

Discover and register tools from MCP servers.
pflow mcp sync [NAME] [--all]
Arguments:
  • NAME - Server name to sync (conflicts with --all)
Options:
  • --all, -a - Sync all configured servers
Examples:
# Sync specific server
pflow mcp sync github

# Sync all servers
pflow mcp sync --all
Output:
Syncing server 'github'...
✓ Discovered 15 tools
✓ Registered 15 tools in pflow registry

Registered tools:
  - mcp-github-create-issue
  - mcp-github-list-issues
  - mcp-github-get-issue
  ... and 12 more
pflow auto-syncs servers when workflows run. Manual sync is useful for immediate testing or troubleshooting.

pflow mcp tools

List registered MCP tools.
pflow mcp tools [SERVER] [--json]
Arguments:
  • SERVER - Filter by server name (optional)
Options:
  • --json - Output as JSON
Examples:
# List all MCP tools
pflow mcp tools

# List tools from specific server
pflow mcp tools github

# JSON output
pflow mcp tools --json
Output:
Registered MCP tools:

  github (15 tools):
    - mcp-github-create-issue: Create a new issue
    - mcp-github-list-issues: List repository issues
    - mcp-github-get-issue: Get issue details
    ...

  slack (8 tools):
    - mcp-slack-send-message: Send a message
    - mcp-slack-list-channels: List channels
    ...

pflow mcp info

Show detailed information about an MCP tool.
pflow mcp info <TOOL>
Arguments:
  • TOOL - Tool name to inspect
Example:
pflow mcp info mcp-github-create-issue
Output:
Tool: mcp-github-create-issue
Server: github
Description: Create a new issue in a GitHub repository

Parameters:
  - repo (string, required): Repository in owner/repo format
  - title (string, required): Issue title
  - body (string): Issue body/description
  - labels (array): List of label names

Outputs:
  - result (object): Created issue details

pflow mcp serve

Run pflow as an MCP server for AI tools.
pflow mcp serve [--debug]
Options:
  • --debug - Enable debug logging
This command starts pflow as an MCP server using stdio transport. AI tools connect to pflow and can use its workflow capabilities.
This is typically invoked by AI tools automatically, not run directly. See the integrations guide for setup instructions.
Exposed tools: The MCP server exposes tools for:
  • Discovering workflows and nodes
  • Executing workflows
  • Validating workflows
  • Saving workflows to the library
  • Managing settings

Tool naming convention

MCP tools are registered with the pattern mcp-{server}-{tool}:
FormatExample
Fullmcp-github-create-issue
Server-qualifiedgithub-create-issue
Short (if unique)create-issue
Agents can use the shortest unambiguous name in workflows.

Using MCP tools in workflows

After syncing, MCP tools work like any other node:
{
  "nodes": [
    {
      "id": "create-issue",
      "type": "mcp-github-create-issue",
      "params": {
        "repo": "owner/repo",
        "title": "Bug report",
        "body": "Description of the bug"
      }
    }
  ]
}

File locations

PathPurpose
~/.pflow/mcp-servers.jsonServer configurations
~/.pflow/registry.jsonRegistered tools

Common workflows

Initial setup

# Add servers
pflow mcp add github.mcp.json

# Sync to discover tools
pflow mcp sync --all

# Verify tools
pflow mcp tools

Troubleshooting

# Check configured servers
pflow mcp list

# Resync a server
pflow mcp sync github

# Get tool details
pflow mcp info mcp-github-create-issue