Home / MCP / Perplexity MCP Server

Perplexity MCP Server

Provides Perplexity tool integration with Claude Desktop for single questions and multi-turn conversations.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "perplexity": {
            "command": "node",
            "args": [
                "/absolute/path/to/perplexity-mcp/server.js"
            ],
            "env": {
                "PERPLEXITY_API_KEY": "your_perplexity_api_key"
            }
        }
    }
}

This MCP server enables Perplexity AI to be used as a tool provider inside Claude Desktop. You can run it locally or install it globally, connect through Claude Desktop, and choose Perplexity models for single questions or multi-turn conversations.

How to use

You will run the Perplexity MCP server locally or globally, then configure Claude Desktop to load the Perplexity tools. Once set up, Claude can send questions or chat messages to Perplexity and receive responses for display in the Claude interface.

How to install

Prerequisites you need before installing are Node.js v16 or higher, Claude Desktop (latest), and a Perplexity API key.

Option 1: Clone and Run Locally

1. Clone the repository

2. Install dependencies

3. Create a .env file with your API key

4. Test the server

Option 2: Install Globally

1. Clone and navigate to the repository as above

2. Install globally

3. Run the server from anywhere

Additional configuration details

To connect Claude Desktop to the Perplexity MCP server, use one of the MCP JSON configurations shown below. Choose the standard local setup for a direct node run, or the global setup to run via npx. If you use Node Version Manager (NVM), use absolute paths in your configuration.

Standard Configuration

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": [
        "/absolute/path/to/perplexity-mcp/server.js"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_perplexity_api_key"
      }
    }
  }
}

Global Installation Configuration

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "perplexity-mcp"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_perplexity_api_key"
      }
    }
  }
}

NVM Users

{
  "mcpServers": {
    "perplexity": {
      "command": "/Users/username/.nvm/versions/node/v16.x.x/bin/node",
      "args": [
        "/Users/username/path/to/perplexity-mcp/server.js"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_perplexity_api_key"
      }
    }
  }
}

Troubleshooting and notes

If you encounter issues, check the log files for clues, verify that your API key is valid, ensure the configuration file is correctly formatted, and enable verbose logging by setting the DEBUG environment variable to 1.

Available tools

perplexity_ask

Send a single question to Perplexity. Accepts a required query and an optional model.

perplexity_chat

Engage in a multi-turn conversation with Perplexity. Accepts an array of messages and an optional model.