产品猎人-MCP服务器
语言类型:英语 翻译结果:产品猎人- MCP
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"product-hunt": {
"command": "product-hunt-mcp",
"env": {
"PRODUCT_HUNT_TOKEN": "your_token_here"
}
}
}
}
服务介绍
🚀 Product Hunt MCP 服务器
一个即插即用的 MCP 服务器,用于 Product Hunt
📦 快速安装
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 与任何使用 Model Context Protocol (MCP) 的 LLM 或代理连接起来。非常适合 AI 助手、聊天机器人或您自己的自动化!
- 🔍 获取帖子、集合、话题、用户
- 🗳️ 获取投票、评论等
- 🛠️ 与 Claude Desktop、Cursor 或任何 MCP 客户端一起使用
🛠️ 功能
- 获取关于帖子、评论、集合、话题、用户的详细信息
- 按话题、日期、投票等进行搜索/过滤
- 分页评论、用户点赞等
- 使用 FastMCP 构建,以提高速度和兼容性
🧑💻 适用人群
- AI/LLM 用户:接入 Claude Desktop、Cursor 或您自己的代理
- 开发者:使用 Product Hunt 数据构建机器人、仪表板或自动化
- 爱好者:探索 MCP 生态系统并构建自己的工具
🏁 设置
前提条件
- Python 3.10+
- Product Hunt API 令牌 (在此获取)
- 您需要在 Product Hunt 上创建一个帐户
- 导航到 API 仪表板并创建一个新的应用程序
- 使用
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 安装(最新主分支)
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
对于 Claude Desktop/Cursor 与 Docker 的集成,请使用以下配置:
{
"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