
AI Expert Workflow
STDIOMCP server for AI expert workflow in product management, UX design, and software architecture.
MCP server for AI expert workflow in product management, UX design, and software architecture.
An MCP (Model Context Protocol) server that implements the AI Expert Workflow using OpenRouter API for AI capabilities. This project allows you to consult with AI experts in product management, UX design, and software architecture to plan and develop your projects. It can be used standalone or with Task Master for task management (optional).
The AI Expert Workflow is designed to provide a natural, conversational experience that guides you through the product development process:
The system engages in conversation with you until you're ready to generate a document:
You Control Document Generation
Comprehensive Topic Coverage
Verification Before Completion
When you're ready to generate documents:
PRD.md
, UX_Design_Document.md
)scripts/prd.txt
file is continuously updated throughout all phases:
scripts/prd.txt
contains a comprehensive specification with input from all three expertsImportant: The scripts/prd.txt
file is continuously improved throughout the workflow, making it ready for Task Master at any point, but it's most valuable after all three expert phases are complete.
Install AI Expert Workflow globally:
npm install -g ai-expert-workflow-mcp
Get an OpenRouter API key:
Generate a PRD for your project:
# Set your API key export OPENROUTER_API_KEY=your_key_here # Generate a PRD npx ai-expert-workflow-generate "Your detailed project description"
Review your PRD in prd.md
If you also want to use Task Master for task management (optional):
Install Task Master globally:
npm install -g task-master-ai
Get the additional API keys:
Configure your Cursor settings with both MCPs:
{ "mcpServers": { "ai-expert-workflow": { "command": "npx", "args": ["-y", "ai-expert-workflow-mcp"], "env": { "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE", "OPENROUTER_MODEL": "tngtech/deepseek-r1t-chimera:free", "MAX_TOKENS": 8000, "TEMPERATURE": 0.7 } }, "taskmaster-ai": { "command": "npx", "args": ["-y", "task-master-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", "MODEL": "claude-3-sonnet-20240229", "PERPLEXITY_MODEL": "sonar-pro", "MAX_TOKENS": 64000, "TEMPERATURE": 0.2, "DEFAULT_SUBTASKS": 5, "DEFAULT_PRIORITY": "medium" } } } }
Note on models: With OpenRouter, you can choose from many AI models beyond Claude:
openai/gpt-4o
, anthropic/claude-3-opus-20240229
anthropic/claude-3-sonnet-20240229
, mistral/mistral-large
openai/gpt-3.5-turbo
, anthropic/claude-3-haiku-20240307
google/gemini-pro
, meta/llama-3-70b
, cohere/command-r
See the complete list of OpenRouter models for all available options.
Enable the MCPs in your Cursor settings.
# Install AI Expert Workflow globally npm install -g ai-expert-workflow-mcp # Set your OpenRouter API key export OPENROUTER_API_KEY=your_openrouter_key_here # Generate a PRD with one command npx ai-expert-workflow-generate "I want to build a recipe app that helps users find recipes based on ingredients they already have at home. Target users are home cooks who want to reduce food waste and save money."
This single command will:
prd.md
in your current directoryscripts/prd.txt
) in case you want to use Task Master laterUser: Can you start the AI Expert Workflow for my new mobile recipe app?
AI: I'll start the AI Expert Workflow to help you plan your mobile recipe app. What specific aspect would you like to begin with?
User: Let's create a PRD with the AI Product Manager. I want to build a recipe app that helps users find recipes based on ingredients they already have at home.
AI: [Asks clarifying questions about target users, key features, monetization, etc.]
User: [Provides detailed responses about the app vision]
User: Can you generate a complete PRD document based on our consultation?
AI: [Generates comprehensive PRD with MVP focus and lean startup validation plan]
AI: Document saved to PRD.md. You can now review it and use it for your development planning.
If you want to break down your PRD into development tasks, you can optionally use Task Master:
User: Can you parse the PRD at scripts/prd.txt and generate tasks?
AI: [Task Master parses the PRD and creates a structured list of tasks with priorities]
User: What's the next task I should work on?
AI: [Task Master suggests the highest priority task with implementation details]
This streamlined workflow transforms your idea into a well-planned product with a comprehensive PRD. You can then optionally use Task Master to break it down into development tasks.
The easiest way to use AI Expert Workflow MCP is to install it directly from npm:
npm install -g ai-expert-workflow-mcp
This makes the ai-expert-workflow-mcp
command globally available in your terminal.
Clone the repository:
git clone https://github.com/bacoco/ai-expert-workflow-mcp.git
cd ai-expert-workflow-mcp
Install dependencies:
npm install
Configure environment variables:
.env.example
to .env
.env
file (get one from https://openrouter.ai/keys)Build the project:
npm run build
Start the server:
npm start
Run tests (optional):
# Run essential tests (recommended for quick verification)
npm run test:essential
# Run individual tests
npm run test:mcp-only # Test only the MCP server
npm run test:openrouter-direct # Test only the OpenRouter API
# Run JavaScript tests
npm test
# Run TypeScript tests
npm run test:ts
# Or use the shell scripts
./tests/run-js-test.sh
./tests/run-ts-test.sh
# Run comprehensive tests (builds and runs both JS and TS tests)
./tests/run-comprehensive-test.sh
Test results will be saved to tests/results/result_test.md
and tests/results/result_test_ts.md
.
IMPORTANT: The tests will fail with the default API key. To verify your OpenRouter API key without modifying the
.env
file, use one of these scripts:Verify and update in one step:
npm run verify-and-update YOUR_API_KEY
Or run the steps separately:
# Verify your API key npm run verify-openrouter YOUR_API_KEY # Update the MCP configuration npm run update-config YOUR_API_KEY
{ "mcpServers": { "ai-expert-workflow": { "command": "node", "args": ["dist/index.js"], "cwd": "${workspaceFolder}", "env": { "OPENROUTER_API_KEY": "${env:OPENROUTER_API_KEY}", "OPENROUTER_MODEL": "tngtech/deepseek-r1t-chimera:free", "MAX_TOKENS": 4000, "TEMPERATURE": 0.7, "MCP_TIMEOUT": "120000", "DEBUG": "mcp" } }, "taskmaster-ai": { "command": "npx", "args": ["-y", "task-master-ai"], "env": { "OPENROUTER_API_KEY": "${env:OPENROUTER_API_KEY}", "OPENROUTER_MODEL": "openai/gpt-4-turbo", "MAX_TOKENS": 8000, "TEMPERATURE": 0.7, "DEFAULT_SUBTASKS": 5, "DEFAULT_PRIORITY": "medium" } } } }
Enable the MCP in your editor settings
Use natural language to interact with the AI Expert Workflow:
Start the complete workflow:
Can you start the AI Expert Workflow for my project?
Work with specific experts:
Can you consult with the AI Product Manager to create a PRD for my project?
Move between stages:
Let's move to the next stage
Generate documents:
Can you generate a complete PRD document based on our consultation?
Check progress:
What topics have we covered so far?
What topics do we still need to discuss?
Can you parse the PRD at scripts/prd.txt and generate tasks?
The workflow has been enhanced with a structured conversation flow that guides users through a comprehensive product development process. It follows the "Méthode des Trois Sphères" (Three Spheres Method), a methodical approach that transforms ideas into functional products through three distinct phases:
The AI Expert Workflow implements the Three Spheres Method, where each expert builds upon the work of the previous one:
Sphere 1: Product Definition & Architectural Foundation (AI Product Manager)
Sphere 2: UX Design & Feature Expansion (AI UX Designer)
Sphere 3: Technical Planning & Implementation Specifications (AI Software Architect)
Each expert has access to the documents generated by previous experts, ensuring a progressive development process where each phase builds upon the previous one.
The system is designed to engage in conversation with the user until either:
User Explicitly Requests Document Generation
shouldGenerateDocument
function (lines 101-118) checks for phrases like "generate document", "create PRD", etc.AI Determines Enough Information Has Been Gathered
Verification Before Moving On
Document Storage
PRD.md
) and the scripts directory (e.g., scripts/prd.txt
)scripts/prd.txt
for Task Master compatibilityscripts/ux_design.txt
scripts/software_spec.txt
comprehensive_specification.md
and scripts/comprehensive_specification.txt
The Product Manager guides you through defining your product vision and requirements.
Required Topics:
Output: A comprehensive Product Requirements Document (PRD)
The UX Designer helps you create a user experience plan based on the PRD.
Required Topics:
Output: A detailed UX Design Document
The Software Architect helps you define the technical implementation plan.
Required Topics:
Output: A comprehensive Software Specification
The workflow automatically tracks which topics have been covered in each stage and guides you through a complete product development process. For more details, see Enhanced Workflow Documentation.
The AI Expert Workflow is designed to work completely standalone:
# Install the AI Expert Workflow MCP npm install -g ai-expert-workflow-mcp # Set your OpenRouter API key export OPENROUTER_API_KEY=your_openrouter_key_here # Generate a PRD with the default model npx ai-expert-workflow-generate "Your detailed project description" # Or specify a different model for more creative or complex projects MODEL=openai/gpt-4o npx ai-expert-workflow-generate "Your detailed project description"
This script:
prd.md
in your current directoryscripts/prd.txt
) in case you want to use Task Master laterNote: Task Master integration is completely optional. You can use AI Expert Workflow on its own to generate PRDs.
If you do want to use Task Master, you'll need these API keys:
- OpenRouter API key for AI Expert Workflow (get one from OpenRouter)
- Anthropic API key for Task Master AI (get one from Anthropic)
- Perplexity API key (optional) for Task Master AI enhanced research capabilities (get one from Perplexity)
If you want to convert your PRD into development tasks, you can use Task Master in one of two ways:
Option 1: MCP Integration (For Cursor users)
"mcpServers": { "taskmaster-ai": { "command": "npx", "args": ["-y", "task-master-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "MODEL": "claude-3-sonnet-20240229" } } }
Can you parse the PRD at scripts/prd.txt and generate tasks?
Option 2: Command Line Usage
npm install -g task-master-ai
task-master parse-prd scripts/prd.txt
The project includes utility scripts to demonstrate Task Master integration:
src/generate-task-master-files.js
: Creates sample PRD and Task Master integration files using the MCP implementationsrc/generate-task-master-files-simple.js
: Creates sample PRD and Task Master integration files without using MCPThese scripts are useful for testing and understanding how the integration works.
See the docs/Create-MCP.md file for a complete guide on creating your own AI Expert Workflow MCP server from scratch.
For details on OpenRouter API integration, see docs/OPENROUTER.md.
For Task Master AI documentation, see Task Master on npm.
MIT