perplexity-mcp MCP 服务器
一个模型上下文协议 (MCP) 服务器,使用Perplexity AI 的API 提供网页搜索功能。可与Anthropic Claude 桌面客户端配合使用。
例子
您可以使用类似这样的提示:“搜索网络以了解过去一周 Anthropic 的最新动态。”
Related MCP server: Perplexity MCP Server
格拉玛分数
成分
提示
服务器提供一个提示:
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 的新闻”的提示。您应该会看到一个警告框,提示您确认工具的使用情况。点击“允许本次聊天”。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
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/jsonallen/perplexity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
