这是一个使用Perplexity AIAPI提供网络搜索功能的模型上下文协议(MCP)服务器。与Anthropic的Claude桌面客户端兼容。
你可以使用如下的提示词:"搜索网络以找出过去一周Anthropic的新动态。"
<a href="https://glama.ai/mcp/servers/ebg0za4hn9"><img width="380" height="200" src="https://gips3.baidu.com/it/u=1819230641,3409255662&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Perplexity Server MCP服务器" /></a>
该服务器提供一个提示词:
该服务器实现了一个工具:
要通过Smithery自动安装Perplexity MCP给Claude Desktop:
npx -y @smithery/cli install perplexity-mcp --client claude
如果未安装uv。
# 在macOS上使用Homebrew
brew install uv
或者
# 在macOS和Linux上。
curl -LsSf https://astral.sh/uv/install.sh | sh
# 在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:要使用的Perplexity模型(如果没有指定,默认为"sonar")
可用模型:
sonar-deep-research:128k上下文 - 增强的研究能力sonar-reasoning-pro:128k上下文 - 具有专业焦点的高级推理sonar-reasoning:128k上下文 - 增强的推理能力sonar-pro:200k上下文 - 专业级模型sonar:128k上下文 - 默认模型r1-1776:128k上下文 - 替代架构最新的模型列表可在这里找到。
通过编辑Cursor/Claude配置文件添加此工具作为mcp服务器。
"perplexity-mcp": {
"env": {
"PERPLEXITY_API_KEY": "XXXXXXXXXXXXXXXXXXXX",
"PERPLEXITY_MODEL": "sonar"
},
"command": "uvx",
"args": [
"perplexity-mcp"
]
}
/Users/your-username/.cursor/mcp.jsonC:\Users\your-username\.cursor\mcp.json如果一切正常,你现在应该能够从Cursor调用这个工具。 <img width="800" alt="mcp_screenshot" src="https://github.com/user-attachments/assets/4b59774f-646c-41b3-9886-5cfd4c4ca051" width=600>
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json为了验证服务器是否工作,请打开Claude客户端并使用类似“搜索网络以找出过去一周关于openai的新闻”的提示词。你应该会看到一个确认工具使用的弹出框。点击“允许在此聊天中使用”。
<img width="600" alt="mcp_screenshot" src="https://gips2.baidu.com/it/u=3025825973,707418313&fm=3081&app=3081&f=PNG?w=3656&h=4070" />