Perplexity Tool for Claude Desktop
This server enables Claude Desktop to interact with Perplexity AI for web-based research with citations. You can:
Ask Questions: Submit queries to Perplexity AI for detailed answers
Control Response Length: Limit response size with the
max_tokensparameterAdjust Randomness: Modify response creativity using the
temperatureparameter (0-2)Filter by Domain: Restrict search results to specific domains with
search_domain_filterFilter by Recency: Narrow results to specific timeframes (day, week, month, year) using
search_recency_filter
Provides support for storing Perplexity API keys securely in environment variables for better security practices when sharing code.
Allows Claude to perform web-based research through Perplexity AI's API, providing answers with citations. Supports configuration of parameters like temperature, max tokens, domain filtering, and recency filtering.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Perplexity Tool for Claude Desktop research the latest breakthroughs in quantum computing from the past year"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Perplexity Tool for Claude Desktop
A custom MCP tool that integrates Perplexity AI's API with Claude Desktop, allowing Claude to perform web-based research and provide answers with citations.
Prerequisites Installation
Install Git:
For Mac:
Install Homebrew first by pasting this in Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Then install Git:
brew install gitFor Windows:
Download Git from git-scm.com
Run the installer
Install Node.js:
For Mac:
brew install nodeFor Windows:
Download from nodejs.org
Run the installer
Verify installations by running:
git --version
node --versionRelated MCP server: Perplexity MCP Server
Tool Installation
Clone the repository
git clone https://github.com/letsbuildagent/perplexity-tool
cd perplexity-toolInstall dependencies
npm installSet up your API Key
You have two options:
Option 1 (Quick setup):
Open
server.jsFind this line:
const PERPLEXITY_API_KEY = "YOUR-API-KEY-HERE";Replace with your Perplexity API key
Option 2 (Best practice):
Create a .env file:
# On Mac/Linux: touch .env open .env # On Windows: notepad .envOr simply create a new file named
.envin your text editorAdd your API key to the .env file:
PERPLEXITY_API_KEY=your-api-key-hereInstall dotenv:
npm install dotenvUpdate server.js:
import 'dotenv/config' const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
Configure Claude Desktop
Open
~/Library/Application Support/Claude/claude_desktop_config.jsonAdd this configuration:
{
"mcpServers": {
"perplexity-tool": {
"command": "node",
"args": [
"/full/path/to/perplexity-tool/server.js"
]
}
}
}Replace /full/path/to with the actual path where you cloned the repository.
Restart Claude Desktop
Usage
Once installed, you can use the tool through Claude with commands like:
"Ask Perplexity about recent developments in AI"
"Use Perplexity to research the history of quantum computing"
"Search Perplexity for information about climate change, focusing on the last month"
Advanced Options
You can specify additional parameters:
temperature: Controls response randomness (0-2)max_tokens: Limits response lengthsearch_domain_filter: Restricts search to specific domainssearch_recency_filter: Filters by time period (day/week/month/year)
Troubleshooting
Git not found:
Make sure you've installed Git correctly
Try restarting your terminal
On Mac, make sure Homebrew is in your PATH
Node.js errors:
Verify Node.js installation with
node --versionTry reinstalling Node.js
API Key issues:
Make sure you've correctly copied your API key
Check that there are no extra spaces in your .env file
If using Option 2, verify dotenv is installed
Tool not appearing in Claude:
Check the path in claude_desktop_config.json
Make sure the path points to your server.js file
Restart Claude Desktop
Check the console for any error messages
License
MIT
Security Note
If you're planning to share your code or make it public:
Don't commit your API key to Git
Use the .env method (Option 2)
Add .env to your .gitignore file
Available Tools
1 toolask_perplexityC
Ask a question to Perplexity AI
Inputs: question (required), temperature, max_tokens, search_domain_filter, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Real-time web search, reasoning, and research through Perplexity's API
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Official Exa MCP for web search, content fetching, and multi-step research.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn 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.-