Perplexity AI MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Perplexity AI's API to provide advanced search capabilities through the perplexity_search tool, supporting multiple Sonar models including sonar-reasoning-pro, sonar-reasoning, sonar-pro, and sonar

Perplexity AI MCP 服务器

集成 Perplexity AI 的 API 的 MCP 服务器实现,提供具有多种模型选项的高级搜索功能。

特征

  • 使用 Perplexity AI 的模型进行搜索
  • 支持所有官方 Sonar 型号
  • 可配置结果计数
  • 详细的错误处理和日志记录
  • 兼容 MCP Inspector

可用型号

  • sonar-reasoning-pro(127k 上下文)
  • sonar-reasoning(127k 上下文)
  • sonar-pro(200k 上下文)
  • 声纳(127k 上下文)

安装

pnpm install pnpm build

配置

API 密钥

  1. 注册Perplexity AI 帐户
  2. 从仪表板获取您的 API 密钥
  3. 设置环境变量:
export PERPLEXITY_API_KEY=your_api_key_here

用法

直接执行

node dist/index.js # or if you made it executable ./dist/index.js

发展

pnpm dev

使用 MCP Inspector 进行测试

pnpm inspect

工具参考

困惑度搜索

使用 Perplexity AI 的模型执行搜索。

参数:

  • query (字符串,必需):搜索查询
  • model (字符串,可选):要使用的模型(默认值:“sonar”)
    • 可用选项:sonar-reasoning-pro、sonar-reasoning、sonar-pro、sonar
  • count (数字,可选):结果数量(1-10,默认值:5)

发展

项目结构

src/perplexity/ ├── index.ts # Main server implementation ├── lib/ │ └── logger.ts # Logging configuration └── adr.md # Architectural decisions

日志记录

日志写入项目根目录中的perplexity-mcp.log

执照

麻省理工学院

贡献

  1. 分叉存储库
  2. 创建你的功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建新的 Pull 请求

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP 服务器集成了 Perplexity AI 的 API,提供高级搜索功能,支持多种模型和结果配置。

  1. Features
    1. Available Models
      1. Installation
        1. Configuration
          1. API Key
        2. Usage
          1. Direct Execution
          2. Development
          3. Testing with MCP Inspector
        3. Tool Reference
          1. perplexity_search
        4. Development
          1. Project Structure
          2. Logging
        5. License
          1. Contributing
            ID: s45iho8wbk