AA

alcova-ai/perplexity-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

27 stars 6 forks 质量 56 趋势 11MIT

一个用于 Claude Code 和 Claude Desktop 的 Perplexity MCP 服务器,增强了搜索和推理能力。

概览

一个用 Go 编写的 Perplexity API 模型上下文协议(MCP)服务器。该服务器使 AI 助手如 Claude(代码和桌面)和 Cursor 能够直接从界面无缝访问 Perplexity 强大的搜索和推理能力。 Perplexity MCP 服务器作为 AI 助手与 Perplexity API 之间的桥梁,使其能够: 1. 通过perplexity_ask工具使用 Perplexity 的 Sonar Pro 模型 2.通过 perplexity_reason 工具使用 Perplexity 的 Sonar Reasoning Pro 模型 这种集成使像Claude这样的AI助手无需离开界面即可实时访问信息和专业推理能力,为用户创造无缝体验。

概述(AI 翻译)

一个用 Go 编写的 Perplexity API 模型上下文协议(MCP)服务器。该服务器使 AI 助手如 Claude(代码和桌面)和 Cursor 能够直接从界面无缝访问 Perplexity 强大的搜索和推理能力。

描述

Perplexity MCP 服务器作为 AI 助手与 Perplexity API 之间的桥梁,使其能够:

  1. **通过 perplexity_ask 工具使用 Perplexity 的 Sonar Pro 型号搜索网页并获取最新信息
  2. 通过 perplexity_reason 工具使用 Perplexity 的 Sonar Reasoning Pro 模型执行复杂推理任务

这种集成使像Claude这样的AI助手无需离开界面即可实时访问信息和专业推理能力,为用户创造无缝体验。

主要优势

  • 实时信息访问:从网络获取最新数据、新闻和信息
  • 增强推理能力:利用专门模型处理复杂问题解决任务
  • 无缝集成:原生支持Claude Code、Claude Desktop和Cursor
  • 简单安装:使用自制软件、Go或预建二进制文件快速设置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Perplexity MCP Server

A Model Context Protocol (MCP) server for the Perplexity API written in Go. This server enables AI assistants like Claude (Code and Desktop) and Cursor to seamlessly access Perplexity’s powerful search and reasoning capabilities directly from their interfaces.

Description

The Perplexity MCP Server acts as a bridge between AI assistants and the Perplexity API, allowing them to:

  1. Search the web and retrieve up-to-date information using Perplexity’s Sonar Pro model via the perplexity_ask tool
  2. Perform complex reasoning tasks using Perplexity’s Sonar Reasoning Pro model via the perplexity_reason tool

This integration lets AI assistants like Claude access real-time information and specialized reasoning capabilities without leaving their interface, creating a seamless experience for users.

Key Benefits

  • Access to real-time information: Get current data, news, and information from the web
  • Enhanced reasoning capabilities: Leverage specialized models for complex problem-solving tasks
  • Seamless integration: Works natively with Claude Code, Claude Desktop, and Cursor
  • Simple installation: Quick setup with Homebrew, Go, or pre-built binaries
  • Customizable: Configure which Perplexity models to use for different tasks

Installation

Using Homebrew (macOS and Linux)

brew tap alcova-ai/tap
brew install perplexity-mcp

From Source

Clone the repository and build manually:

git clone https://github.com/Alcova-AI/perplexity-mcp.git
cd perplexity-mcp
go build -o perplexity-mcp-server .

From Binary Releases (Other platforms)

Download pre-built binaries from the releases page.

Usage

This server supports only the stdio protocol for MCP communication.

Setup with Claude Code

Adding to Claude Code:

claude mcp add-json --scope user perplexity-mcp '{"type":"stdio","command":"perplexity-mcp","env":{"PERPLEXITY_API_KEY":"pplx-YOUR-API-KEY-HERE"}}'

That’s it! You can now use Perplexity in Claude Code.

Setup with Claude Desktop

Adding to Claude Desktop:

  1. Exit the Claude Desktop MCP config:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the Perplexity MCP server:
  {
    "mcpServers": {
+        "perplexity-mcp": {
+            "command": "perplexity-mcp",
+            "args": [
+                "--model",
+                "sonar-pro",
+                "--reasoning-model",
+                "sonar-reasoning-pro"
+            ],
+            "env": {
+                "PERPLEXITY_API_KEY": "pplx-YOUR-API-KEY-HERE"
+            }
+        }
    }
  }

Command Line Options

  • --model, -m: Specify the Perplexity model to use for search (default: “sonar-pro”)
    • Can also be set with the PERPLEXITY_MODEL environment variable
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { + "perplexity-mcp": { + "command": "perplexity-mcp", + "args": [ + "--model", + "sonar-pro", + "--reasoning-model", + "sonar-reasoning-pro" + ], + "env": { + "PERPLEXITY_API_KEY": "pplx-YOUR-API-KEY-HERE" + } + } } }