AI Expert Workflow
AI Expert Workflow MCP
An MCP server that implements the AI Expert Workflow for integration with Task Master, using OpenRouter API for AI capabilities.
🚀 Quick Start for End Users
If you just want to use the AI Expert Workflow MCP with Task Master, follow these steps:
Setup
-
Install both MCPs globally:
npm install -g ai-expert-workflow-mcp task-master-ai
-
Get the required API keys:
- OpenRouter API key for AI Expert Workflow: Get one here
- Anthropic API key for Task Master AI: Get one here
- Perplexity API key (optional) for Task Master AI enhanced research capability: Get one here
-
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", "MODEL": "anthropic/claude-3-sonnet-20240229", "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:
- For creative tasks:
openai/gpt-4o
,anthropic/claude-3-opus-20240229
- For balanced performance:
anthropic/claude-3-sonnet-20240229
,mistral/mistral-large
- For faster, cost-effective options:
openai/gpt-3.5-turbo
,anthropic/claude-3-haiku-20240307
- Other options:
google/gemini-pro
,meta/llama-3-70b
,cohere/command-r
See the complete list of OpenRouter models for all available options.
- For creative tasks:
-
Enable the MCPs in your Cursor settings.
Complete Workflow Example
Option 1: Fully Automated Workflow (Recommended)
## Install the necessary packages globally
npm install -g ai-expert-workflow-mcp task-master-ai
## Make sure to set your API keys in your environment or .env file:
## OPENROUTER_API_KEY=your_openrouter_key_here (for AI Expert Workflow)
## ANTHROPIC_API_KEY=your_anthropic_key_here (for Task Master)
## PERPLEXITY_API_KEY=your_perplexity_key_here (optional, for Task Master AI research)
## Generate PRD and automatically parse it into tasks with one command
## You can specify a different model with the MODEL environment variable
MODEL=openai/gpt-4o 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:
- Generate a comprehensive PRD document based on your description
- Save it in a format compatible with Task Master
- Automatically launch Task Master to parse the PRD and create tasks
- Display the tasks and next steps
Option 2: Interactive Conversation Workflow
Step 1: Plan your Product with the AI Product Manager
User: 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]
Step 2: Generate the PRD with Task Master Integration
User: Can you generate a complete PRD document based on our consultation and save it for Task Master?
AI: [Generates comprehensive PRD with MVP focus and lean startup validation plan]
AI: Document saved to PRD.md and also saved for Task Master at scripts/prd.txt. You can now use Task Master to parse this PRD with: "Can you parse the PRD at scripts/prd.txt and generate tasks?"
Step 3: Create Tasks with 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]
Step 4: Implement Tasks
User: Help me implement the "Ingredient Search Feature" task.
AI: [Task Master provides guidance and code for implementing the specific feature]
This streamlined workflow transforms your idea into a well-planned product and organized development tasks, all through natural conversation with specialized AI experts.
Features
- Consult with AI experts in three key roles:
- AI Product Manager
- AI UX Designer
- AI Software Architect
- Generate comprehensive documents:
- Product Requirements Document (PRD) with MVP focus and lean startup approach
- UX Design Document with prototype descriptions and user testing plans
- Software Architecture Specification with functional specifications and technical design
- Seamless integration with Task Master
- Powered by OpenRouter API for maximum flexibility across AI models:
- Works with OpenAI models (GPT-4o, GPT-4-turbo, GPT-3.5-turbo)
- Works with Anthropic models (Claude 3 Opus, Sonnet, Haiku)
- Works with other models (Google Gemini, Mistral, Llama, Cohere, etc.)
Benefits of Using AI Expert Workflow MCP
- Complete Project Planning: Get expert guidance through the entire product planning process
- Lean Startup Approach: Focus on MVP definition and validation plans
- User-Centered Design: Create user experiences based on solid UX principles
- Technical Excellence: Design scalable architectures that meet your requirements
- Task Master Integration: Convert your PRD directly into development tasks
- Cursor Integration: Seamless workflow within your development environment
- Model Flexibility: Choose from dozens of AI models through OpenRouter API
- Use high-performance models (Claude Opus, GPT-4o) for complex planning
- Use balanced models (Claude Sonnet, Mistral) for everyday work
- Use fast models (Claude Haiku, GPT-3.5) for quick iterations
Installation
Global Installation (Recommended)
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.
Local Development
-
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:
- Copy
.env.example
to.env
- Add your OpenRouter API key to the
.env
file (get one from https://openrouter.ai/keys)
- Copy
-
Build the project:
npm run build
-
Start the server:
npm start
-
Run tests (optional):
# 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
Test results will be saved to
tests/results/result_test.md
andtests/results/result_test_ts.md
.
Usage with Cursor AI
- Add the MCP configuration to your editor:
{
"mcpServers": {
"ai-expert-workflow": {
"command": "npx",
"args": ["-y", "ai-expert-workflow-mcp"],
"env": {
"OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY_HERE",
"MODEL": "anthropic/claude-3-sonnet-20240229",
"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"
}
}
}
}
-
Enable the MCP in your editor settings
-
Use natural language to interact with the AI Expert Workflow:
Can you start the AI Expert Workflow for my project?
Can you consult with the AI Product Manager to create a PRD for my project?
Can you generate a complete PRD document based on our consultation?
- After generating your PRD, use Task Master to create tasks:
Can you parse the PRD at scripts/prd.txt and generate tasks?
AI Expert Workflow
The workflow consists of three main phases:
1. Product Definition (AI Product Manager)
The Product Manager helps you create a PRD that includes:
- Product overview and problem statement
- User personas and user stories
- Feature requirements with priorities
- MVP scope definition
- Business model
- Lean startup validation plan
2. UX Design (AI UX Designer)
The UX Designer helps you create a UX document that includes:
- User personas and journey maps
- Information architecture
- Wireframe descriptions
- Prototype specifications
- User testing plans
3. Technical Architecture (AI Software Architect)
The Software Architect helps you create a specification that includes:
- System architecture
- Technology stack recommendations
- Functional specifications
- Technical design
- Integration requirements
Task Master Integration
The AI Expert Workflow seamlessly integrates with Task Master in two ways:
Note: You will need both API keys for the full workflow:
- 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)
Method 1: Automated PRD Generation (Recommended)
Use the provided script to generate a PRD and prepare it for Task Master:
## Install the AI Expert Workflow MCP
npm install -g ai-expert-workflow-mcp
## Make sure to set your OpenRouter API key in your environment:
## export OPENROUTER_API_KEY=your_openrouter_key_here
## Run the automated script with your project details (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:
- Generates the PRD document based on your description
- Automatically saves it in Task Master compatible format (at
scripts/prd.txt
) - Provides instructions for using Task Master to parse the PRD
Using Task Master to Parse the PRD
You can use Task Master in one of two ways:
Option 1: MCP Integration (Recommended for Cursor users)
- Add the Task Master MCP to your editor configuration:
"mcpServers": { "taskmaster-ai": { "command": "npx", "args": ["-y", "task-master-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "MODEL": "claude-3-sonnet-20240229" } } }
- Then ask your AI assistant:
Can you parse the PRD at scripts/prd.txt and generate tasks?
Option 2: Command Line Usage
- Install Task Master:
npm install -g task-master-ai
- Parse the PRD:
task-master parse-prd scripts/prd.txt
Method 2: Manual Integration
For more control over the process:
-
When generating a PRD, use the
saveForTaskMaster
parameter:generateDocument productManager "Your project details" true
-
This saves your PRD in a format that Task Master can parse (at
scripts/prd.txt
) -
Then use one of the Task Master methods described above to parse the PRD and create tasks.
For More Information
See the 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 OPENROUTER.md.
For Task Master AI documentation, see Task Master on npm.
License
MIT