Quadwavemcpproject

rojie-rajan/Quadwavemcpproject

3.1

If you are the rightful owner of Quadwavemcpproject and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The PRD Generator MCP Server is a tool designed to create detailed Product Requirements Documents using OpenAI's GPT-4o, supporting multiple file formats and direct queries.

Tools
5
Resources
0
Prompts
0

PRD Generator MCP Server

A Model Context Protocol (MCP) server that generates comprehensive Product Requirements Documents (PRDs) from various file types or direct queries using OpenAI GPT-4o.

Features

  • Multi-format file support: Process PDF, DOC/DOCX, and TXT files
  • Direct query processing: Generate PRDs from text queries without file uploads
  • Comprehensive PRD templates: Industry-standard PRD structure with 12 detailed sections
  • Content extraction: Preview file content before PRD generation
  • File validation: Check file format compatibility and metadata
  • Professional output: GPT-4o powered generation for high-quality PRDs

Available Tools

1. generate_prd_from_file

Generate a Product Requirements Document from a file.

Parameters:

  • file_path (string): Path to the file to process
  • file_type (optional string): Override file type detection (pdf, docx, txt)

Returns: Comprehensive PRD generated from file content

2. generate_prd_from_query

Generate a Product Requirements Document from a direct text query.

Parameters:

  • query (string): Main product idea, requirements, or description
  • context (optional string): Additional context or constraints

Returns: Comprehensive PRD generated from the query

3. extract_file_content

Extract and return text content from a file without generating a PRD.

Parameters:

  • file_path (string): Path to the file to process
  • file_type (optional string): Override file type detection

Returns: Extracted text content from the file

4. get_prd_template

Get the PRD template structure used by this server.

Returns: The comprehensive PRD template with all sections

5. validate_file_format

Validate if a file is in a supported format and return metadata.

Parameters:

  • file_path (string): Path to the file to validate

Returns: Dictionary with validation results and file metadata

PRD Template Structure

The generated PRDs follow a comprehensive 12-section template:

  1. Executive Summary - Vision, objectives, target market
  2. Problem Statement - Pain points, market opportunity, competition
  3. Product Overview - Value proposition, key features, benefits
  4. User Personas & Use Cases - Target users, journeys, scenarios
  5. Functional Requirements - Core features, UI/UX, integrations
  6. Non-Functional Requirements - Performance, security, accessibility
  7. Technical Specifications - Architecture, tech stack, data requirements
  8. Success Metrics & KPIs - Performance indicators, adoption metrics
  9. Timeline & Milestones - Development phases, deadlines, dependencies
  10. Risk Assessment - Technical/market risks, mitigation strategies
  11. Resource Requirements - Team structure, budget, infrastructure
  12. Launch Strategy - Go-to-market plan, success criteria, support

Supported File Formats

  • PDF (.pdf) - Extracts text using PyPDF2
  • Word Documents (.docx, .doc) - Processes using python-docx
  • Text Files (.txt, .text) - Direct text reading with encoding detection

Installation & Setup

  1. Install dependencies:
uv sync
  1. Set up OpenAI API key (already configured in the code):

    • The server uses GPT-4o for PRD generation
    • API key is embedded: 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
  2. Run the server:

uv run main.py

Usage Examples

Example 1: Generate PRD from file

# Agent call
result = await call_tool("generate_prd_from_file", {
    "file_path": "/path/to/requirements.pdf"
})

Example 2: Generate PRD from query

# Agent call
result = await call_tool("generate_prd_from_query", {
    "query": "A mobile app for task management with AI-powered prioritization",
    "context": "Target users are busy professionals, focus on simplicity and efficiency"
})

Example 3: Extract file content first

# Agent call
content = await call_tool("extract_file_content", {
    "file_path": "/path/to/document.docx"
})

Technical Details

  • Python Version: 3.11+
  • AI Model: OpenAI GPT-4o
  • Protocol: Model Context Protocol (MCP)
  • Transport: STDIO
  • Dependencies: mcp, openai, PyPDF2, python-docx, httpx, anyio

Error Handling

The server includes comprehensive error handling for:

  • File not found errors
  • Unsupported file formats
  • Text extraction failures
  • OpenAI API errors
  • Invalid input validation

Logging

The server logs all operations including:

  • Tool invocations
  • File processing status
  • PRD generation progress
  • Error details

Security Considerations

  • File access is limited to provided file paths
  • No persistent file storage
  • API key is embedded for demo purposes (consider environment variables for production)
  • Input validation on all parameters

Contributing

This MCP server demonstrates comprehensive PRD generation capabilities and can be extended with additional features like:

  • Template customization
  • Multi-language support
  • Export formats (Word, PDF)
  • Version control integration
  • Collaborative editing features

License

This project is provided as an example implementation of an MCP server for PRD generation.