关于 🚀 Product Hunt MCP Server
Product Hunt MCP Server 是一个 MCP 服务,将 Product Hunt API 接入支持 MCP 的 LLM 或 Agent。它面向 AI 助手用户、开发者和探索者,可用于获取帖子、合集、话题、用户及投票和评论等数据,并通过 PRODUCT_HUNT_TOKEN 进行认证。
主要功能
- 01获取帖子、评论、合集、话题与用户信息
- 02按话题、日期、投票等条件筛选帖子
- 03分页获取评论与用户点赞
- 04查询 API 速率限制与服务状态
适用场景
- 01在 Claude Desktop 或 Cursor 中查询 Product Hunt 数据
- 02构建基于 Product Hunt 数据的自动化脚本或看板
MCP 相关
该项目是一个 MCP 服务,向 MCP 客户端暴露 get_posts、get_user、search_topics 等 11 个工具,用于访问 Product Hunt 数据。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
🚀 Product Hunt MCP 服务
为 Product Hunt 提供的即插即用 MCP 服务
📦 快速安装
pip install product-hunt-mcp
🏃♂️ 快速入门示例
# Run the MCP server (requires PRODUCT_HUNT_TOKEN environment variable)
export PRODUCT_HUNT_TOKEN=your_token_here
product-hunt-mcp
✨ 这是什么?
Product Hunt MCP 服务将 Product Hunt 的 API 连接到任何支持模型上下文协议(MCP)的大模型或 Agent。非常适合 AI 助手、聊天机器人或自定义自动化!
- 🔍 获取帖子、合集、主题和用户
- 🗳️ 获取投票、评论等
- 🛠️ 与 Claude Desktop、Cursor 或任何 MCP 客户端配合使用
🛠️ 功能
- 获取帖子、评论、合集、主题和用户的详细信息
- 按主题、日期、投票数等进行搜索和筛选
- 分页获取评论、用户点赞等
- 基于 FastMCP 构建,运行快速且兼容性强
🧑💻 适用人群
- AI/大模型用户:接入 Claude Desktop、Cursor 或自己的 Agent
- 开发者:使用 Product Hunt 数据构建机器人、仪表板或自动化
- 喜欢折腾的用户:探索 MCP 生态并构建自己的工具
🏁 设置
前置条件
- Python 3.10+
- Product Hunt API 令牌(在此获取)
- 你需要在 Product Hunt 上创建一个账户
- 前往 API Dashboard 并创建一个新应用
- 将
Developer Token用作令牌
**注意:**在 Product Hunt 上创建新应用时,系统会要求填写
redirect_uri。虽然 MCP 服务不会使用重定向 URI,但这是必填项。你可以输入任意有效 URL,例如https://localhost:8424/callback。
安装
首选:uv(快速、现代的 Python 安装程序)
# Install uv if you don't have it
pip install uv
从 PyPI 安装(推荐)
uv pip install product-hunt-mcp
# or
pip install product-hunt-mcp
从 GitHub 安装(最新 main 分支)
uv pip install 'git+https://github.com/jaipandya/producthunt-mcp-server.git'
# or
pip install 'git+https://github.com/jaipandya/producthunt-mcp-server.git'
从源代码本地安装
uv pip install .
# or
pip install .
🚀 在 Claude Desktop 和 Cursor 中使用
安装后,即可使用 product-hunt-mcp 命令。将其添加到 Claude Desktop 或 Cursor 配置中:
{
"mcpServers": {
"product-hunt": {
"command": "product-hunt-mcp",
"env": {
"PRODUCT_HUNT_TOKEN": "your_token_here"
}
}
}
}
- 将
your_token_here替换为你的 Product Hunt API 令牌。 - 必须在 Claude Desktop 或 Cursor 配置中将令牌设置为环境变量,服务才能通过身份验证。
- 编辑配置文件后,务必重启客户端(Claude Desktop/Cursor)。
**提示:**在 macOS 上,如果
product-hunt-mcp命令不在默认 PATH 中,Claude Desktop 可能无法找到它。如果遇到问题,可以提供可执行文件的完整路径。安装后运行:which product-hunt-mcp在 Claude Desktop 配置中使用输出的路径,将
"command": "product-hunt-mcp"替换为完整路径(例如"command": "/Users/youruser/.local/bin/product-hunt-mcp")。
查找配置文件
-
Claude Desktop:
- Windows:
%APPDATA%\claude-desktop\config.json - macOS:
~/Library/Application Support/claude-desktop/config.json - Linux:
~/.config/claude-desktop/config.json
- Windows:
-
Cursor:
- Windows:
%APPDATA%\Cursor\User\settings.json - macOS:
~/Library/Application Support/Cursor/User/settings.json - Linux:
~/.config/Cursor/User/settings.json
- Windows:
Docker
你也可以使用 Docker 运行服务:
# Build the Docker image
docker build -t product-hunt-mcp .
# Run the Docker container (interactive for MCP)
docker run -i --rm -e PRODUCT_HUNT_TOKEN=your_token_here product-hunt-mcp
要通过 Docker 与 Claude Desktop/Cursor 集成,请使用以下配置:
{
"mcpServers": {
"product-hunt": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "PRODUCT_HUNT_TOKEN=your_token_here", "product-hunt-mcp"],
"env": {}
}
}
}
**安全提示:**你的
PRODUCT_HUNT_TOKEN属于敏感信息。请勿分享,也不要将其提交到版本控制中。
🛠️ MCP 工具
| 工具 | 描述 | 关键参数 |
|---|---|---|
| get_post_details | 获取特定帖子的详情 | id 或 slug、comments_count、comments_after |
| get_posts | 根据筛选条件获取帖子 | topic、order、count、featured、posted_before、posted_after |
| get_comment | 获取特定评论的详情 | id(必填) |
| get_post_comments | 获取帖子的评论 | post_id 或 slug、order、count、after |
| get_collection | 获取合集的详情 | id 或 slug |
| get_collections | 根据筛选条件获取合集 | featured、user_id、post_id、order、count |
| get_topic | 获取主题的详情 | id 或 slug |
| search_topics | 搜索主题 | query、followed_by_user_id、order、count |
| get_user | 获取用户的详情 | id 或 username、posts_type、posts_count |
| get_viewer | 获取已通过身份验证的用户的详情 | 无 |
| check_server_status | 检查服务/API 状态和身份验证 | 无 |
🏗️ 项目结构
product-hunt-mcp/
├── src/
│ └── product_hunt_mcp/ # Main package directory
│ ├── __init__.py
│ ├── cli.py # Command-line entry point
│ ├── api/ # API clients & queries
│ ├── schemas/ # Data validation schemas
│ ├── tools/ # MCP tool definitions
│ └── utils/ # Utility functions
├── pyproject.toml # Project metadata, dependencies, build config
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
├── Dockerfile
└── ... (config files, etc.)
🔄 速率限制
Product Hunt API 有速率限制,客户端会遵守这些限制。如果遇到速率限制错误,客户端会告知你限制重置时间。你可以使用 get_api_rate_limits 或 check_server_status 工具查看当前的速率限制状态。
🐛 故障排除
- 缺少令牌:确保已将
PRODUCT_HUNT_TOKEN正确设置为环境变量。 - 连接问题:检查网络连接,并确认 Product Hunt API 可以访问。
- 速率限制:如果达到速率限制,请等到重置时间,或降低查询频率。
- Claude Desktop/Cursor 找不到服务:检查 Python 可执行文件的路径,然后重启客户端。
🤝 贡献
🌐 链接
📝 备注
- 本项目与 Product Hunt 无关联。
- Product Hunt API 可能会发生变化。
📜 许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。