
一个模型上下文协议(MCP)服务器,利用 Perplexity AI 的 API 提供网页搜索功能。
概览
一款模型上下文协议(MCP)服务器,利用 Perplexity AI 的 API 提供网页搜索功能。可与 Anthropic Claude 桌面客户端配合使用。 你可以用“搜索网络,了解过去一周Anthropic的新动态”这样的提示。 - perplexity_search_web:使用Perplexity AI搜索网页 - 搜索查询必填“query”参数 - 可选的“最新”参数以按时间段筛选结果: - “day”:过去24小时 - “week”:过去7天 - “month”:过去30天(默认)- “year”:过去365天 - 使用 Perplexity API 进行网页搜索 - perplexity_search_web:使用 Perplexity AI 搜索网页 - 将“query”作为必填字符串参数 - 可选的“最近”参数用于筛选结果(日/周/月/年)- 返回 Perplexity API 的搜索结果 通过Smithery自动安装Perplexity MCP for Claude Desktop: 您的claude_desktop_config.json需要以下环境变量。
概述(AI 翻译)
一款模型上下文协议(MCP)服务器,利用 Perplexity AI 的 API 提供网页搜索功能。可与 Anthropic Claude 桌面客户端配合使用。
示例
你可以用“搜索网络,了解过去一周Anthropic的新动态”这样的提示。
Glama分数
组成部分
提示
服务器提供一个提示词:
- perplexity_search_web:使用Perplexity AI搜索网页
- 搜索查询所需的“query”参数
- 可选的“近期性”参数,用于按时间段过滤结果:
- “一天”:过去24小时
- “周”:最后7天
- “月份”:过去30天(默认)
- “年份”:过去365天
- 使用 Perplexity 的 API 进行网页搜索
工具
服务器实现了一个工具:
- perplexity_search_web:使用Perplexity AI搜索网页
- 将“查询”作为必填字符串参数
- 可选的“最近度”参数用于过滤结果(日/周/月/年)
- 返回 Perplexity API 的搜索结果
安装
通过Smithery安装
通过Smithery自动安装Perplexity MCP for Claude Desktop:
需要 UV(快速 Python 包和项目管理器)
如果没有安装紫外线。
或
环境变量
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
perplexity-mcp MCP server
A Model Context Protocol (MCP) server that provides web search functionality using Perplexity AI’s API. Works with the Anthropic Claude desktop client.
Example
Let’s you use prompts like, “Search the web to find out what’s new at Anthropic in the past week.”
Glama Scores
Components
Prompts
The server provides a single prompt:
- perplexity_search_web: Search the web using Perplexity AI
- Required “query” argument for the search query
- Optional “recency” argument to filter results by time period:
- ‘day’: last 24 hours
- ‘week’: last 7 days
- ‘month’: last 30 days (default)
- ‘year’: last 365 days
- Uses Perplexity’s API to perform web searches
Tools
The server implements one tool:
- perplexity_search_web: Search the web using Perplexity AI
- Takes “query” as a required string argument
- Optional “recency” parameter to filter results (day/week/month/year)
- Returns search results from Perplexity’s API
Installation
Installing via Smithery
To install Perplexity MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install perplexity-mcp --client claude
Requires UV (Fast Python package and project manager)
If uv isn’t installed.
# Using Homebrew on macOS
brew install uv
or
# 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"
Environment Variables
The following environment variable is required in your claude_desktop_config.json. You can obtain an API key from Perplexity
PERPLEXITY_API_KEY: Your Perplexity AI API key
Optional environment variables:
-
PERPLEXITY_MODEL: The Perplexity model to use (defaults to “sonar” if not specified)Available models:
sonar-deep-research: 128k context - Enhanced research capabilitiessonar-reasoning-pro: 128k context - Advanced reasoning with professional focussonar-reasoning: 128k context - Enhanced reasoning capabilitiessonar-pro: 200k context - Professional grade modelsonar: 128k context - Default modelr1-1776: 128k context - Alternative architecture
And updated list of models is avaiable (here)[https://docs.perplexity.ai/guides/model-cards]
Cursor & Claude Desktop Installation
Add this tool as a mcp server by editing the Cursor/Claude config file.
"perplexity-mcp": {
"env": {
安装
uvx perplexity-mcp