Skip to main content
Glama

Perplexity MCP Server

by jsonallen

perplexity-mcp MCP 服务器

一个模型上下文协议 (MCP) 服务器,使用Perplexity AI 的API 提供网页搜索功能。可与Anthropic Claude 桌面客户端配合使用。

例子

您可以使用类似这样的提示:“搜索网络以了解过去一周 Anthropic 的最新动态。”

格拉玛分数

成分

提示

服务器提供一个提示:

  • perplexity_search_web:使用 Perplexity AI 搜索网络
    • 搜索查询所需的“查询”参数
    • 可选的“最近度”参数可按时间段过滤结果:
      • ‘day’:过去 24 小时
      • ‘周’:过去 7 天
      • ‘month’:过去 30 天(默认)
      • ‘year’:过去 365 天
    • 使用 Perplexity 的 API 执行网络搜索

工具

服务器实现了一个工具:

  • perplexity_search_web:使用 Perplexity AI 搜索网络
    • 将“查询”作为必需的字符串参数
    • 可选的“最近”参数来过滤结果(日/周/月/年)
    • 从 Perplexity 的 API 返回搜索结果

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Perplexity MCP:

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

需要UV (快速 Python 包和项目管理器)

如果 uv 未安装。

# Using Homebrew on macOS brew install uv

或者

# On macOS and Linux. curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows. powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

环境变量

您的 claude_desktop_config.json 中需要以下环境变量。您可以从Perplexity获取 API 密钥

  • PERPLEXITY_API_KEY :您的 Perplexity AI API 密钥

可选的环境变量:

  • PERPLEXITY_MODEL :要使用的困惑度模型(如果未指定,则默认为“sonar”)可用型号:
    • sonar-deep-research :128k context - 增强研究能力
    • sonar-reasoning-pro :128k context - 专业重点的高级推理
    • sonar-reasoning :128k context - 增强推理能力
    • sonar-pro :200k context - 专业级模型
    • sonar :128k context - 默认模型
    • r1-1776 :128k 上下文 - 替代架构

更新后的模型列表可在此处获取[ https://docs.perplexity.ai/guides/model-cards ]

Cursor 和 Claude 桌面安装

通过编辑 Cursor/Claude 配置文件将此工具添加为 mcp 服务器。

"perplexity-mcp": { "env": { "PERPLEXITY_API_KEY": "XXXXXXXXXXXXXXXXXXXX", "PERPLEXITY_MODEL": "sonar" }, "command": "uvx", "args": [ "perplexity-mcp" ] }
光标
  • 在 MacOS 上: /Users/your-username/.cursor/mcp.json
  • 在 Windows 上: C:\Users\your-username\.cursor\mcp.json

如果一切正常,您现在应该能够从 Cursor 调用该工具。

克劳德桌面
  • 在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • 在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

要验证服务器是否正常工作,请打开 Claude 客户端,并使用类似“在过去一周内搜索网络上有关 openai 的新闻”的提示。您应该会看到一个警告框,提示您确认工具的使用情况。点击“允许本次聊天”。

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

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.

利用 Perplexity AI 的 API 实现网络搜索功能的服务器,旨在与 Claude 桌面客户端集成以增强搜索查询。

  1. 例子
    1. 格拉玛分数
      1. 成分
        1. 提示
        2. 工具
      2. 安装
        1. 通过 Smithery 安装
        2. 需要UV (快速 Python 包和项目管理器)
        3. 环境变量
        4. Cursor 和 Claude 桌面安装

      Related MCP Servers

      • A
        security
        F
        license
        A
        quality
        This server allows users to perform web searches using Perplexity AI, providing a tool for retrieving search results through a simple API interface.
        Last updated -
        1
        44
        3
      • A
        security
        A
        license
        A
        quality
        Facilitates web search capabilities using Perplexity's API, allowing users to retrieve search results through Claude's interface.
        Last updated -
        4
        MIT License
      • -
        security
        F
        license
        -
        quality
        Allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information using the Perplexity API, with features for filtering results by time period.
        Last updated -
        8
        • Apple
      • A
        security
        A
        license
        A
        quality
        An MCP server that enables Claude to perform web searches using Perplexity's API with intelligent model selection based on query intent and support for domain and recency filtering.
        Last updated -
        3
        MIT License
        • Apple

      View all related MCP servers

      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/jsonallen/perplexity-mcp'

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