Skip to main content
Glama
letsbuildagent

Perplexity Tool for Claude Desktop

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

  1. 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 git
    • For Windows:

  2. Install Node.js:

    • For Mac:

      brew install node
    • For Windows:

  3. Verify installations by running:

git --version
node --version

Related MCP server: Perplexity MCP Server

Tool Installation

  1. Clone the repository

git clone https://github.com/letsbuildagent/perplexity-tool
cd perplexity-tool
  1. Install dependencies

npm install
  1. Set up your API Key

You have two options:

Option 1 (Quick setup):

  • Open server.js

  • Find 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 .env

    Or simply create a new file named .env in your text editor

  • Add your API key to the .env file:

    PERPLEXITY_API_KEY=your-api-key-here
  • Install dotenv:

    npm install dotenv
  • Update server.js:

    import 'dotenv/config'
    const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
  1. Configure Claude Desktop

  • Open ~/Library/Application Support/Claude/claude_desktop_config.json

  • Add 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.

  1. 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 length

  • search_domain_filter: Restricts search to specific domains

  • search_recency_filter: Filters by time period (day/week/month/year)

Troubleshooting

  1. Git not found:

    • Make sure you've installed Git correctly

    • Try restarting your terminal

    • On Mac, make sure Homebrew is in your PATH

  2. Node.js errors:

    • Verify Node.js installation with node --version

    • Try reinstalling Node.js

  3. 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

  4. 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 tool
ask_perplexityC

Ask a question to Perplexity AI

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYesThe question to ask
temperatureNoResponse randomness (0-2)
max_tokensNoMaximum tokens in response
search_domain_filterNoLimit search to specific domains
search_recency_filterNoFilter results by recencymonth

TDQS

C2.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose3/5

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.

Usage Guidelines2/5

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. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • Addedask_perplexity

TDQS

C2.9/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness2/5

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

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An 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.
    6
    4
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Integrates 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.
    3
    2
    -

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/letsbuildagent/perplexity-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server