Getting Started

Workflows

Understanding workflows in MCPN

What are MCPN Workflows?

MCPN workflows are the building blocks of software development, allowing you to organize and orchestrate multiple prompts and tools. Think of workflows as a dynamic prompting library that you can easily share and version control through YAML files.

Why Use Workflows?

The key to effective AI assistance is knowing when and how to use the right tools. Workflows help make this process easier by:

  • ✅ Combining prompts with MCP servers into reusable workflows
  • ✅ Triggering workflows with custom commands like "enter debugger mode"
  • ✅ Defining strategies for how to use multiple tools (sequential or situational)
  • ✅ Easily onboarding your team to the best prompts with version control

How Workflows are Organized

In MCPN, workflows are typically stored within the .mcp-workflows folder, with each file representing a specific configuration or "mode" of operation. Some examples:

  • coding.yaml — Defines prompts for debugging, architecture, or refactoring steps
  • thinking.yaml — Contains reflective or brainstorming prompts
  • github.yaml — Sets up prompts for reviewing pull requests, creating branches, or saving changes

Workflow Structure

Each .yaml file can contain multiple named sections with description and prompt, and optionally typed parameters:

my_mode:
  description: "Custom reflection mode"
  prompt: |
    You are in custom reflection mode. We'll systematically gather requirements and weigh tradeoffs...
  parameters:
    question:
      type: "string"
      required: true

Tool Configuration Styles

You can define tools in several ways:

Situational Tools (Default)

Tools that can be used as needed:

web_debugger_mode:
  description: Debug my web application with browser logs
  prompt: |
    Reflect on why this isn't working. Theorize different possible sources of the problem.
  tools: getConsoleLogs, getConsoleErrors, getNetworkLogs, getNetworkErrors, takeScreenshot

Sequential Tools

Tools that should be executed in a specific order:

web_debugger_mode:
  description: Debug my web application with browser logs
  prompt: |
    Reflect on why this isn't working. Theorize different possible sources of the problem.
  toolMode: sequential
  tools: getConsoleLogs, getConsoleErrors, getNetworkLogs, getNetworkErrors, takeScreenshot

Using Parameters

A powerful feature is the ability to inject parameters into your prompts:

custom_mode:
  description: "Workflow with parameter injection"
  parameters:
    thought:
      type: "string"
      description: "A thought to reflect upon"
      required: true
  prompt: |
    Deeply reflect upon the provided thought: {{ thought }}

Parameters are automatically validated based on their type definitions and injected into your prompts at runtime.

To learn how to create your own workflow from scratch, see Tutorials > Create a Workflow.