Quick Start: Your First Workflow
Relevant source files
The following files were used as context for generating this wiki page:Zen MCP empowers developers by orchestrating multiple AI models within a single, continuous conversation. This allows for complex, multi-step tasks to be executed seamlessly, with full context preserved across different tools and models. A "workflow" in Zen MCP is a sequence of commands that chain these tools together to accomplish a larger goal, such as performing a code review, planning the required changes, implementing them, and running a final validation check.
The key feature is conversation continuity, where the context and findings from one step are automatically carried over to the next, even when switching between different AI models (e.g., Gemini, GPT-5, Claude). This enables a true AI collaboration experience, where you can leverage the unique strengths of each model for different parts of your task.
Sources: README.md:28-32, README.md:100-103
The Anatomy of a Zen MCP Workflow
A typical development workflow involves several distinct phases. Zen MCP provides specialized tools for each phase, which can be chained together in a single prompt.
This diagram illustrates a common end-to-end workflow from code review to pre-commit validation.
The core tools involved in this workflow are summarized below:
| Tool | Role in Workflow | Description |
|---|---|---|
codereview | Analysis & Discovery | Performs a professional code review, identifying issues with severity levels. Can use multiple models for a comprehensive analysis. |
planner | Strategy & Decomposition | Takes findings from the review and breaks down the required work into a structured, actionable plan. |
chat / clink | Implementation | chat can be used with capable models to generate code fixes. clink can delegate implementation to an external CLI agent. |
precommit | Validation | Acts as a final gatekeeper, reviewing the changes against the original request and ensuring quality before committing. |
Sources: README.md:162-177, systemprompts/codereview_prompt.py:5-8, systemprompts/planner_prompt.py:5-9, systemprompts/precommit_prompt.py:5-18
Step-by-Step: A Multi-Model Code Review Workflow
This section details a practical example of a workflow that leverages multiple AI models for a comprehensive code review, planning, and validation cycle.
Sources: README.md:105-122, slides/slide7.html:36-77
1. Initiate a Multi-Model Code Review
The workflow begins by invoking the codereview tool. You can instruct it to use multiple models, such as Gemini Pro and O3 (OpenAI), to get diverse perspectives on your code.
Example Prompt:
"Perform a codereview using gemini pro and o3, then use planner to create a fix strategy"
Sources: README.md:214-216
The codereview tool is designed to perform a deep analysis, covering architecture, maintainability, performance, and security. It assesses code for high-level design issues and low-level pitfalls like race conditions and resource leaks.
Sources: systemprompts/codereview_prompt.py:5-8, systemprompts/codereview_prompt.py:30-44
This sequence diagram shows how Zen MCP orchestrates the review between different models.
Sources: README.md:105-119
2. Generate an Action Plan with planner
With the comprehensive review complete, the context is passed to the planner tool. The planner's role is to take the list of identified issues and decompose them into a logical, sequential plan for implementation.
Example Prompt (continuation):
"Continue with planner to create a fix plan based on the review"
Sources: examples/prompts/tool-usage-examples.md:69-70
The planner acts as a systems architect, breaking the main objective into steps, identifying dependencies, and even creating branches for alternative approaches. The final output is a structured plan that a developer can follow.
Sources: systemprompts/planner_prompt.py:5-9, systemprompts/planner_prompt.py:24-35
The flow from review to plan is visualized below.
3. Implement Fixes
Once a plan is in place, the next step is implementation. The chat tool, when used with a powerful model like GPT-5 Pro or Gemini 3.0 Pro, can generate the necessary code to fix the highlighted issues. Alternatively, the clink tool can be used to hand off the implementation task to a specialized external CLI agent, keeping the main context clean.
Sources: README.md:164-165, README.md:19-27
Example Prompt (continuation):
"Implement the fixes, then use precommit to validate"
Sources: examples/prompts/tool-usage-examples.md:71-72
The chat tool's prompt system defines it as a "senior engineering thought-partner" capable of engaging deeply with input to refine and generate solutions.
Sources: systemprompts/chat_prompt.py:5-7, systemprompts/chat_prompt.py:27-33
4. Validate with precommit
After the changes are implemented, the precommit tool serves as the final quality gate. It performs a pull-request style review, focusing strictly on the changes made. A key aspect is that it retains the full context of the preceding steps—it knows what the original codereview found, what the planner recommended, and what the implementation was supposed to achieve.
Sources: README.md:121-122, systemprompts/precommit_prompt.py:5-18
The precommit tool evaluates whether the change achieves its goals without introducing regressions and assesses potential repercussions on other parts of the codebase.
Sources: systemprompts/precommit_prompt.py:56-62
Summary
The power of Zen MCP lies in its ability to chain specialized AI tools into cohesive, end-to-end workflows. By preserving conversation continuity across different models and tasks, it transforms a series of isolated commands into a collaborative development process. This quick-start example, moving from multi-model code review to final validation, demonstrates how you can leverage Zen MCP to enhance code quality, streamline development, and build more robust software with the help of an AI dev team.
Sources: README.md:28-32