一个即插即用的 MCP 服务器用于 Product Hunt
pip install product-hunt-mcp
# 运行 MCP 服务器(需要设置 PRODUCT_HUNT_TOKEN 环境变量)
export PRODUCT_HUNT_TOKEN=your_token_here
product-hunt-mcp
Product Hunt MCP Server 将 Product Hunt 的 API 连接到任何支持 模型上下文协议 (MCP) 的 LLM 或代理。非常适合 AI 助手、聊天机器人或您自己的自动化!
Developer Token 作为令牌注意:当在 Product Hunt 上创建新应用时,会被要求提供
redirect_uri。虽然 MCP 服务器不使用重定向 URI,但这是一个必填字段。您可以输入任何有效的 URL,例如https://localhost:8424/callback。
首选:uv(快速、现代的 Python 安装器)
# 如果没有安装 uv,请先安装
pip install uv
uv pip install product-hunt-mcp
# 或
pip install product-hunt-mcp
uv pip install 'git+https://github.com/jaipandya/producthunt-mcp-server.git'
# 或
pip install 'git+https://github.com/jaipandya/producthunt-mcp-server.git'
uv pip install .
# 或
pip install .
安装后,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 令牌。提示:在 macOS 上,Claude Desktop 可能无法总是找到
product-hunt-mcp命令,如果它不在默认的 PATH 中。如果您遇到问题,可以提供可执行文件的完整路径。安装后运行:which product-hunt-mcp在您的 Claude Desktop 配置中使用输出路径,替换
"command": "product-hunt-mcp"为完整的路径(例如,"command": "/Users/youruser/.local/bin/product-hunt-mcp")。
Claude Desktop:
%APPDATA%\claude-desktop\config.json~/Library/Application Support/claude-desktop/config.json~/.config/claude-desktop/config.jsonCursor:
%APPDATA%\Cursor\User\settings.json~/Library/Application Support/Cursor/User/settings.json~/.config/Cursor/User/settings.json您也可以使用 Docker 运行服务器:
# 构建 Docker 镜像
docker build -t product-hunt-mcp .
# 运行 Docker 容器(交互式 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是敏感信息。不要分享或提交到版本控制中。
| 工具 | 描述 | 关键参数 |
|---|---|---|
| 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/ # 主包目录
│ ├── __init__.py
│ ├── cli.py # 命令行入口点
│ ├── api/ # API 客户端及查询
│ ├── schemas/ # 数据验证模式
│ ├── tools/ # MCP 工具定义
│ └── utils/ # 实用函数
├── pyproject.toml # 项目元数据、依赖项、构建配置
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
├── Dockerfile
└── ... (配置文件等)
Product Hunt API 有速率限制,此客户端会遵守这些限制。如果您遇到速率限制错误,客户端将通知您何时速率限制重置。您可以使用 get_api_rate_limits 或 check_server_status 工具检查当前的速率限制状态。
PRODUCT_HUNT_TOKEN 正确设置为环境变量。MIT