Skip to main content
Glama
productHuntAnalyst

productHuntAnalyst

by phuhao00

Product Hunt Analyst

Independent project: pulls data from Product Hunt, analyzes hot product trends from the past 1 / 2 / 3 / 4 weeks or 1 month, and provides a visual web interface.

It can be integrated with tools such as Codex, Cursor, Claude Desktop, and Workbuddy via MCP / CLI / HTTP API.

Features

  • Pull Product Hunt products by time window (sorted by upvotes)

  • Automatically generate trend reports: Top products, category distribution, daily launch volume, topic keywords, and textual insights

  • React visualization dashboard (line charts, bar charts, leaderboard)

  • MCP server for direct invocation by AI agents

  • CLI script that outputs JSON / Markdown

Related MCP server: Trends MCP

Quick Start

1. Install Dependencies

cd product-hunt-analyst
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate

pip install -r requirements.txt

2. Configure the Product Hunt Token

  1. Create an application at Product Hunt OAuth Apps

  2. Copy the Developer Token

  3. Copy .env.example to .env and fill it in:

PRODUCT_HUNT_TOKEN=your_token_here

When no Token is configured, the Web UI automatically switches to Demo mode and displays sample data.

3. Command Line Analysis

# JSON 报告
python scripts/analyze.py --period 2w

# Markdown 报告
python scripts/analyze.py --period 1m --markdown

# 仅拉取原始数据
python scripts/fetch_posts.py --period 3w --compact

4. Launch the Web Visualization

Method A: Development mode (frontend and backend separated)

# 终端 1 - API
python -m backend.app

# 终端 2 - 前端
cd frontend
npm install
npm run dev
# 打开 http://localhost:5173

Method B: Production mode (single port)

cd frontend && npm install && npm run build
cd ..
python -m backend.app
# 打开 http://127.0.0.1:8765

Time Range

Parameter

Meaning

1w

Last 1 week (7 days)

2w

Last 2 weeks (14 days)

3w

Last 3 weeks (21 days)

4w

Last 4 weeks (28 days)

1m

Last 1 month (30 days)

MCP Integration (Codex / Cursor / Claude)

Codex

pip install -r requirements.txt
export PRODUCT_HUNT_TOKEN=your_token
codex mcp add productHuntAnalyst --command python --arg mcp/server.py

After linking or copying skill/SKILL.md to the Codex skills directory, you can trigger it using $product-hunt-analyst.

Cursor

Add the following to .cursor/mcp.json in the project root:

{
  "mcpServers": {
    "productHuntAnalyst": {
      "command": "python",
      "args": ["mcp/server.py"],
      "cwd": "E:/codex/product-hunt-analyst",
      "env": {
        "PRODUCT_HUNT_TOKEN": "your_token"
      }
    }
  }
}

Claude Desktop

Register the same MCP server configuration in claude_desktop_config.json.

MCP Tools

Tool

Description

list_periods

List supported time windows

fetch_posts

Fetch the product list for a given period

analyze_trends

Full trend analysis (JSON)

analyze_market

Full report (JSON or Markdown)

get_top_products

Top N products

get_topic_trends

Category trends

HTTP API

Endpoint

Description

GET /api/health

Health check

GET /api/periods

Time window list

GET /api/posts?period=2w

Raw product data

GET /api/analyze?period=2w

Analysis report (JSON)

GET /api/analyze?period=2w&format=markdown

Markdown report

GET /api/demo?period=2w

Demo data (no Token required)

Workbuddy / Automation

Just call it via HTTP or CLI:

curl "http://127.0.0.1:8765/api/analyze?period=4w"
python scripts/analyze.py -p 4w --markdown > report.md

Project Structure

product-hunt-analyst/
├── backend/           # FastAPI + PH API 客户端 + 分析引擎
├── frontend/          # React + Vite + Recharts 可视化
├── mcp/               # MCP Server
├── scripts/           # CLI 工具与测试
├── skill/             # Codex/Cursor Agent Skill
├── agents/            # OpenAI Agents 配置
└── requirements.txt

Testing

python scripts/test_product_hunt_analyst.py

Notes

  • The Product Hunt API is rate limited (around 6250 complexity points / 15 minutes)

  • The data is for research and reference only and does not constitute investment or business decision advice

  • Please comply with the Product Hunt API Terms

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Real-time trend data from Google Trends (Search, Images, News, Shopping), YouTube, TikTok, Reddit, Amazon, Wikipedia, npm, Steam, Spotify, X (Twitter), App Store, Google Play, web traffic, and news sentiment via one MCP connection. Works with Claude, Cursor, VS Code, Windsurf, ChatGPT, and any MCP-compatible AI.
      28
      MIT