Perplexity MCP Server

Perplexity MCP Server

site icon
2025.01.22 1
Go互联网研究AI集成实时信息获取内容生成开发效率
Perplexity MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,旨在为大型语言模型(如 Claude)提供通过 Perplexity API 进行互联网研究的能力。该服务能够提供实时的、最新的信息,并附带来源引用。它是一个非官方集成项目,与 Perplexity AI 或其母公司无直接关联。
View on GitHub

Overview

基本能力

产品定位

Perplexity MCP Server 是一个为大型语言模型提供互联网研究能力的中间件服务,通过集成 Perplexity API,使得 LLMs 能够获取实时信息并进行引用。

核心功能

  • 使用 Perplexity API 进行互联网研究并附带引用
  • 自动跟踪来源和引用
  • 与 Claude Desktop 及其他 MCP 客户端集成

适用场景

  • 需要实时互联网研究的 AI 应用
  • 学术研究辅助工具
  • 内容生成和验证

工具列表

  • research: 执行互联网研究并返回带有引用的结果。
  • 参数: query (字符串): 研究查询或问题
  • 示例查询: "What's the latest research on quantum computing?"

常见问题解答

  • 该服务是非官方的,使用需自行承担风险。
  • 需要自行获取 Perplexity API 密钥。

使用教程

使用依赖

  • Go 1.20 或更高版本
  • Perplexity API 密钥(从 https://www.perplexity.ai/ 获取)
  • MCP Go 框架(github.com/gomcpgo/mcp

安装教程

# 构建服务器二进制文件
./run.sh build

集成 Claude Desktop

在 Claude Desktop 配置文件中添加以下内容:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "perplexity": {
      "command": "/path/to/binary/perplexity-server",
      "env": {
        "PERPLEXITY_API_KEY": "your-perplexity-key"
      }
    }
  }
}

调试方式

  1. cmd/main.go 中进行修改
  2. 使用 ./run.sh build 构建
  3. 通过 Claude Desktop 或 MCP Inspector 测试更改

许可证

该项目遵循 MIT 开源许可条款。