AI Competitive Research Assistant (NitroStack MCP)
# AI Competitive Research Assistant (NitroStack MCP)
> **Hackathon Edition**: An end-to-end AI agent & interactive widget platform built on NitroStack MCP for automated startup competitive intelligence, web discovery, feature matrix comparison, and strategic market gap analysis.
---
## ๐ Overview
The **AI Competitive Research Assistant** takes a raw startup or product idea and automatically executes a **7-step competitive research pipeline** over the Model Context Protocol (MCP):
1. **`understand_idea`**: Analyzes the idea into category, core problem, target audience, value prop, and search terms.
2. **`discover_competitors`**: Performs deterministic web search (Tavily) to discover real competitors.
3. **`extract_competitor_profiles`**: Gathers deep company profiles (pricing, features, tech stack, funding, strengths/weaknesses, USP).
4. **`compare_competitors`**: Builds comparative feature matrix tables and identifies market leaders.
5. **`market_gap_analysis`**: Identifies unaddressed customer problems and whitespace opportunities.
6. **`innovation_scoring`**: Calculates an Innovation Potential Index score across 4 key dimensions.
7. **`generate_report`**: Synthesizes a C-level executive strategy report.
All 7 steps are orchestratable via a single master tool: **`run_competitive_research`**!
---
## ๐๏ธ Architecture
```text
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ End User / LLM (NitroStudio / MCP) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ run_competitive_research (Orchestrator) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ IdeaService โ โ TavilyClient โ โ GeminiService โ
โ (NLP Parsing)โ โ (Live Search) โ โ (Structured Output) โ
โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NitroStack UI Widgets (@Widget SDK) โ
โ - /idea-summary - /competitor-list โ
โ - /competitor-profile - /competitor-comparison โ
โ - /pipeline-progress โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ Quick Start
### 1. Prerequisites
- **Node.js**: v18 or higher
- **npm**: v9 or higher
### 2. Environment Variables Setup
Create a `.env` file in the root directory:
```env
GEMINI_API_KEY=your_gemini_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
```
*(Note: If `TAVILY_API_KEY` is omitted or set to a placeholder, the system gracefully uses high-quality simulated competitor search data).*
### 3. Installation
```bash
npm install
```
### 4. Build Workspace
```bash
npm run build
```
### 5. Run Development Server with Widgets
```bash
npm run dev
```
---
## ๐ ๏ธ MCP Tools Reference
| Tool Name | Input Schema | Interactive Widget | Description |
| :--- | :--- | :--- | :--- |
| **`run_competitive_research`** | `{ idea, industry?, geography?, targetAudience? }` | `/pipeline-progress` | Master orchestrator tool executing the entire 7-step pipeline. |
| **`understand_idea`** | `{ idea, industry?, geography?, targetAudience? }` | `/idea-summary` | Deconstructs startup idea into structured components. |
| **`discover_competitors`** | `{ idea, category?, coreProblem?, valueProposition?, keywords? }` | `/competitor-list` | Live web search (Tavily) to discover competitors. |
| **`extract_competitor_profiles`** | `{ competitors, ideaAnalysis? }` | `/competitor-profile` | Extracts pricing, features, tech stack, funding, strengths/weaknesses. |
| **`compare_competitors`** | `{ profiles }` | `/competitor-comparison` | Generates feature comparison table, winner badges, and market leader rankings. |
---
## ๐ Project Structure
```text
c:\Nitroooo\
โโโ src/
โ โโโ api/ # External API clients (TavilyClient with retry logic)
โ โโโ modules/ # MCP Tool Controllers (@Tool & @Widget decorators)
โ โโโ services/ # Core Business Logic & AI Pipeline Services
โ โโโ types/ # Strict Zod Schemas & TypeScript interfaces
โ โโโ widgets/ # Next.js 14 Interactive Frontend Widgets
โ โ โโโ app/
โ โ โ โโโ idea-summary/
โ โ โ โโโ competitor-list/
โ โ โ โโโ competitor-profile/
โ โ โ โโโ competitor-comparison/
โ โ โ โโโ pipeline-progress/
โ โ โโโ widget-manifest.json
โ โ โโโ next.config.js
โ โโโ app.module.ts # Root AppModule
โ โโโ index.ts # Server Entry Point
โโโ dist/ # Compiled Production Server
โโโ package.json
โโโ README.md
```
---
## ๐งช Testing in NitroStudio
1. Download & open **NitroStudio** ([https://nitrostack.ai/studio](https://nitrostack.ai/studio)).
2. Connect to local project (`c:\Nitroooo`).
3. Select `run_competitive_research` under **Tools**.
4. Enter input:
```json
{
"idea": "An AI-powered interview prep platform with live mock interviews and feedback"
}
```
5. Click **Execute Tool** to view the live 7-step progress tracker and synthesized executive report widget!
---
## ๐ License
MIT License. Built for the NitroStack MCP Hackathon.
TDQS
Scored across 8 tools
Each tool targets a distinct stage of the research pipeline, from idea understanding through competitor discovery, profiling, comparison, gap analysis, scoring, and final report generation. The only potential overlap is run_competitive_research, but that is clearly positioned as an orchestrator of the full pipeline, not a duplicate.
Most tools follow a verb_noun pattern (understand_idea, discover_competitors, extract_competitor_profiles, compare_competitors, generate_report, run_competitive_research). Two tools (market_gap_analysis, innovation_scoring) deviate with a noun_noun style, creating a minor inconsistency but no real confusion.
Eight tools map cleanly onto the seven-step research pipeline, with the orchestrating run_competitive_research earning its place for automation. This is a well-scoped count for a specialized research assistant.
The full lifecycle of competitive research is covered: idea analysis, competitor discovery, profiling, comparison, gap identification, scoring, and report generation. No obvious missing stage, and the pipeline even includes an automated end-to-end runner, making the surface self-sufficient.