Back to MCP directory
publicPublicdnsLocal runtime

Perplexity MCP Server

一个为Claude桌面应用提供Perplexity API网络搜索功能的MCP服务器

article

README

🚀 Perplexity 多用户插件 (MCP) 服务器

一个 MCP 服务器,使用 Perplexity 的 API 提供网络搜索功能,为用户带来便捷的信息搜索体验。

smithery 徽章

🚀 快速开始

在使用本服务器前,你需要完成相关的安装和配置工作,之后就可以让 Claude 轻松进行信息搜索啦。

✨ 主要特性

  • 利用 Perplexity 的 API 提供网络搜索功能。
  • 支持多种模型,可根据需求灵活选择。

📦 安装指南

使用 Smithery 安装

通过 Smithery 可自动安装 Perplexity 服务器,只需执行以下命令:

npx -y @smithery/cli install @jaacob/perplexity-mcp --client claude

手动安装

  1. 克隆此仓库:
git clone https://github.com/jaacob/perplexity-mcp
cd perplexity-mcp
  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build

📚 详细文档

配置

  1. https://www.perplexity.ai/settings/api 获取您的 Perplexity API 密钥。
  2. 将服务器添加到 Claude 的配置文件 ~/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 搜索信息即可。例如:

  • "SpaceX 的最新新闻是什么?"
  • "搜索芝加哥最好的餐厅"
  • "查找爵士乐历史的信息"

如果 Claude 意外未使用该功能,您可以在提示前加上“Search the web”来强制执行。

开发

要修改服务器,可按以下步骤操作:

  1. 编辑 src/index.ts
  2. 使用 npm run build 重建
  3. 重新启动 Claude 以加载更改

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client