logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

perplexity-tool

Integrate web-based research capabilities using Perplexity AI's API to provide accurate answers with citations, enhancing the information retrieval process.

Author

perplexity-tool logo

letsbuildagent

MIT License

Quick Info

GitHub GitHub Stars 4
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

citationssearchresearchperplexity toolperplexity aiweb search

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:
  2. For Mac:
    • Install Homebrew first by pasting this in Terminal: bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Then install Git: bash brew install git
  3. For Windows:

  4. Install Node.js:

  5. For Mac: bash brew install node
  6. For Windows:

  7. Verify installations by running:

git --version
node --version

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: ```bash # 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:bash npm install dotenv - Update server.js:javascript import 'dotenv/config' const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY; ```

  1. Configure Claude Desktop
  2. Open ~/Library/Application Support/Claude/claude_desktop_config.json
  3. 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:
  2. Make sure you've installed Git correctly
  3. Try restarting your terminal
  4. On Mac, make sure Homebrew is in your PATH

  5. Node.js errors:

  6. Verify Node.js installation with node --version
  7. Try reinstalling Node.js

  8. API Key issues:

  9. Make sure you've correctly copied your API key
  10. Check that there are no extra spaces in your .env file
  11. If using Option 2, verify dotenv is installed

  12. Tool not appearing in Claude:

  13. Check the path in claude_desktop_config.json
  14. Make sure the path points to your server.js file
  15. Restart Claude Desktop
  16. 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

See Also

`