Skip to main content
Glama

Perplexity MCP 服务器

一款由 Perplexity 专用 AI 模型驱动的智能研究助手。它具有自动查询复杂度检测功能,可将请求路由到最合适的模型以获得最佳结果。与官方服务器不同,它拥有针对所有任务的搜索功能,本质上

工具

快速提示:由于实现差异,深度研究工具将与 cline 等一些工具超时,但不会与 cursor 等其他工具超时,但原因工具可以弥补这一点。

1. 搜索(Sonar Pro)

快速搜索简单查询和基本信息查找。最适合需要简洁直接答案的简单问题。

const result = await use_mcp_tool({
  server_name: "perplexity",
  tool_name: "search",
  arguments: {
    query: "What is the capital of France?",
    force_model: false // Optional: force using this model even if query seems complex
  }
});

2.Reason(Sonar Reasoning Pro)

处理需要详细分析的复杂、多步骤任务。非常适合解释、比较和解决问题。

const result = await use_mcp_tool({
  server_name: "perplexity",
  tool_name: "reason",
  arguments: {
    query: "Compare and contrast REST and GraphQL APIs, explaining their pros and cons",
    force_model: false // Optional: force using this model even if query seems simple
  }
});

3.深度研究(Sonar深度研究)

进行全面的研究并生成详细的报告。非常适合深入分析复杂的主题。

const result = await use_mcp_tool({
  server_name: "perplexity",
  tool_name: "deep_research",
  arguments: {
    query: "The impact of quantum computing on cryptography",
    focus_areas: [
      "Post-quantum cryptographic algorithms",
      "Timeline for quantum threats",
      "Practical mitigation strategies"
    ],
    force_model: false // Optional: force using this model even if query seems simple
  }
});

Related MCP server: SystemPrompt MCP Server

智能模型选择

服务器自动分析查询复杂度以将请求路由到最合适的模型:

  1. 简单查询→ Sonar Pro

    • 基本信息查找

    • 直截了当的问题

    • 简要事实

  2. 复杂查询→ Sonar Reasoning Pro

    • 如何/为什么的问题

    • 比较

    • 逐步解释

    • 解决问题的任务

  3. 研究查询→ Sonar 深度研究

    • 深入分析

    • 综合研究

    • 详细调查

    • 多方面主题

您可以在任何工具的参数中使用force_model: true覆盖自动选择。

设置

  1. 先决条件

  2. 配置 MCP 设置

添加到您的 MCP 设置文件(位置因平台而异):

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": ["/path/to/perplexity-server/build/index.js"],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

或者使用 NPX 而不必在本地安装(推荐用于 macos):

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "-y",
        "perplexity-mcp"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_api_key"
      }
    }
  }
}
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DaInfernalCoder/perplexity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server