Perplexity Tool for Claude Desktop
Claude 桌面版的困惑工具
一个自定义的 MCP 工具,将 Perplexity AI 的 API 与 Claude Desktop 集成,允许 Claude 执行基于网络的研究并提供带有引文的答案。
先决条件安装
安装 Git:
对于Mac:
首先通过在终端中粘贴以下内容来安装Homebrew :GXP1
然后安装Git:GXP2
对于 Windows:
从git-scm.com下载 Git
运行安装程序
安装 Node.js:
对于Mac:
brew install node对于 Windows:
从nodejs.org下载
运行安装程序
通过运行以下命令验证安装:
git --version
node --versionRelated MCP server: Perplexity MCP Server
工具安装
克隆存储库
git clone https://github.com/letsbuildagent/perplexity-tool
cd perplexity-tool安装依赖项
npm install设置您的 API 密钥
您有两个选择:
选项 1(快速设置):
打开
server.js找到这一行:
const PERPLEXITY_API_KEY = "YOUR-API-KEY-HERE";用您的 Perplexity API 密钥替换
选项 2(最佳实践):
创建 .env 文件:
# On Mac/Linux: touch .env open .env # On Windows: notepad .env或者简单地在文本编辑器中创建一个名为
.env的新文件将您的 API 密钥添加到 .env 文件:
PERPLEXITY_API_KEY=your-api-key-here安装 dotenv:
npm install dotenv更新server.js:
import 'dotenv/config' const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
配置 Claude 桌面
打开
~/Library/Application Support/Claude/claude_desktop_config.json添加此配置:
{
"mcpServers": {
"perplexity-tool": {
"command": "node",
"args": [
"/full/path/to/perplexity-tool/server.js"
]
}
}
}将/full/path/to替换为您克隆存储库的实际路径。
重启Claude桌面
用法
安装完成后,您可以通过 Claude 使用以下命令使用该工具:
“向 Perplexity 询问人工智能的最新发展”
“使用 Perplexity 研究量子计算的历史”
“在 Perplexity 上搜索有关气候变化的信息,重点关注上个月”
高级选项
您可以指定其他参数:
temperature:控制响应随机性(0-2)max_tokens:限制响应长度search_domain_filter:将搜索限制在特定域search_recency_filter:按时间段(日/周/月/年)过滤
故障排除
未找到 Git:
确保你已正确安装 Git
尝试重启你的终端
在 Mac 上,确保 Homebrew 位于你的 PATH 中
Node.js 错误:
使用
node --version验证 Node.js 安装尝试重新安装 Node.js
API 密钥问题:
确保您已正确复制 API 密钥
检查 .env 文件中没有多余的空格
如果使用选项 2,请验证是否已安装 dotenv
工具未出现在 Claude 中:
检查claude_desktop_config.json中的路径
确保路径指向你的 server.js 文件
重启Claude桌面
检查控制台是否有任何错误消息
执照
麻省理工学院
安全说明
如果您打算分享您的代码或将其公开:
不要将您的 API 密钥提交给 Git
使用 .env 方法(选项 2)
将 .env 添加到你的 .gitignore 文件
Available Tools
1 toolask_perplexityC
Ask a question to Perplexity AI
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | The question to ask | |
| temperature | No | Response randomness (0-2) | |
| max_tokens | No | Maximum tokens in response | |
| search_domain_filter | No | Limit search to specific domains | |
| search_recency_filter | No | Filter results by recency | month |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Ask a question to Perplexity AI,' which implies it's a query tool, but doesn't describe what happens—e.g., whether it performs web searches, generates responses, has rate limits, or requires authentication. This is a significant gap for a tool with multiple parameters and no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no wasted words. It's front-loaded and efficiently conveys the core action, making it easy to scan and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (5 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the tool returns, how it behaves (e.g., search-based vs. generative), or any constraints. The agent must rely heavily on the schema and tool name, which is insufficient for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so parameters like 'question,' 'temperature,' and 'search_recency_filter' are well-documented in the schema. The description adds no additional meaning beyond the schema, such as explaining how parameters interact or typical use cases. This meets the baseline of 3 since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Ask a question to Perplexity AI' clearly states the action (ask) and target (Perplexity AI), which is adequate. However, it's somewhat vague about what Perplexity AI is or does—it doesn't specify if this is for general queries, research, or something else. With no sibling tools, differentiation isn't needed, but the purpose could be more specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool—it doesn't mention use cases, prerequisites, or alternatives. With no sibling tools, there's no need to differentiate, but it lacks any context for appropriate usage, leaving the agent to infer based on the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- Added
ask_perplexity
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'ask_perplexity' has a clearly distinct purpose that cannot be confused with any other tool in this server.
The single tool name follows a clear verb_noun pattern ('ask_perplexity'), and with only one tool, there is perfect consistency. No other naming conventions exist to create inconsistency.
A single tool is generally too few for most server purposes, as it provides minimal functionality and limits agent capabilities. For a Perplexity AI integration, one tool might suffice for basic queries, but it feels thin and lacks operations like follow-up questions or context management.
The tool surface is severely incomplete for interacting with Perplexity AI. While 'ask_perplexity' covers basic queries, there are significant gaps such as no support for conversation history, context setting, or handling different query types, which will likely cause agent failures in complex tasks.
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Web search, scraping, RAG answers with citations, and translation as MCP tools.
An MCP for marketers that gives agents tools for SEO, AEO, socials and ads data. Generous free tier; works in Claude, ChatGPT, Cursor and other MCP clients.
Your agent needs the open web — searched by more than one engine, and read as clean markdown rather than raw HTML. **What you can ask for** • "Search this question with two providers and tell me where they disagree." • "Scrape these 40 URLs into markdown, in one batch." • "Crawl this documentation site and give me every page." • "Do deep research on this topic and cite the sources." • "Find the academic papers behind this claim." **How to use it** Point any MCP client at https://mcp.aisa.one/search/mcp and sign in with OAuth — there is no key to create or paste. 30 tools across several independent providers: Tavily and Exa search, answers, contents and agent runs; Firecrawl scrape, batch scrape, crawl, map and search; Perplexity Sonar, Sonar Pro, reasoning and deep research; Oxylabs AI search and LLM jobs; OpenAI and Anthropic web search; and scholarly search. **Why this rather than the source** Several independent indexes behind one account, because one engine's blind spot is not visible from inside it. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the page here, then ask the same agent who links to it or how much traffic it gets — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/seo-serp/mcp for the Google results page itself, https://mcp.aisa.one/seo-serp-other-engines/mcp for Bing, Baidu and Naver.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn 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.64MIT
- AlicenseAqualityDmaintenanceMCP server that enables Claude to request chat completions with citations from the Perplexity API.1MIT
- FlicenseAqualityDmaintenanceIntegrates Perplexity AI's search-enhanced language models with Claude Desktop, providing three tools with different complexity levels for quick fact-checking, technical analysis, and deep research.32-
- FlicenseNot gradedqualityDmaintenanceIntegrates Perplexity API into Claude/Cowork as MCP tools for search, trend scouting, and deep research.-