一个 MCP 服务器,使用 Perplexity 的 API 提供网络搜索功能,为用户带来便捷的信息搜索体验。
在使用本服务器前,你需要完成相关的安装和配置工作,之后就可以让 Claude 轻松进行信息搜索啦。
通过 Smithery 可自动安装 Perplexity 服务器,只需执行以下命令:
npx -y @smithery/cli install @jaacob/perplexity-mcp --client claude
git clone https://github.com/jaacob/perplexity-mcp
cd perplexity-mcp
npm install
npm run build
~/Library/Application Support/Claude/claude_desktop_config.json:{
"mcpServers": {
"perplexity-server": {
"command": "node",
"args": [
"/absolute/path/to/perplexity-mcp/build/index.js"
],
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here",
"PERPLEXITY_MODEL": "sonar"
}
}
}
}
请将 /absolute/path/to 替换为您实际克隆仓库的路径。
通过设置 PERPLEXITY_MODEL 环境变量指定要使用的模型,可用选项如下:
| 模型名称 | 详情 |
|---|---|
sonar-reasoning-pro |
最强大的模型,具有增强推理功能 |
sonar-reasoning |
增强推理能力 |
sonar-pro |
响应速度更快 |
sonar |
默认模型(未指定模型时使用) |
有关模型的最新定价和可用性,请访问:https://docs.perplexity.ai/guides/pricing
在配置服务器并重新启动 Claude 后,您只需让 Claude 搜索信息即可。例如:
如果 Claude 意外未使用该功能,您可以在提示前加上“Search the web”来强制执行。
要修改服务器,可按以下步骤操作:
src/index.tsnpm run build 重建本项目采用 MIT 许可证。