Back to MCP Catalog

Perplexity Ask MCP Server

SearchJavaScript
Integrate Perplexity's Sonar API for real-time web search capabilities
Available Tools

perplexity_ask

Engage in a conversation with the Sonar API for live web searches

messages

Perplexity Ask is a Model Context Protocol server that connects to Perplexity's Sonar API, enabling AI assistants to perform real-time web searches without leaving their native environment. This integration allows Claude and other MCP-compatible AI assistants to access up-to-date information from across the web, enhancing their ability to provide accurate and current responses to user queries.

Overview

Perplexity Ask is a Model Context Protocol (MCP) server that integrates with Perplexity's Sonar API to provide AI assistants with real-time web search capabilities. This integration allows AI assistants like Claude to access current information from across the web without requiring users to switch between applications.

Installation

Prerequisites

Before installing the Perplexity Ask MCP server, you'll need:

  1. A Perplexity Sonar API key (obtain one from Perplexity's developer portal)
  2. An MCP-compatible AI assistant (such as Claude Desktop or Cursor)
  3. Docker (for the Docker installation method)

Installation Methods

You can install the Perplexity Ask MCP server using either Docker or NPX.

Docker Installation

  1. Clone the repository:
git clone git@github.com:ppl-ai/modelcontextprotocol.git
  1. Navigate to the perplexity-ask directory:
cd modelcontextprotocol/perplexity-ask
  1. Build the Docker image:
docker build -t mcp/perplexity-ask:latest -f Dockerfile .
  1. Configure your AI assistant to use the MCP server by adding the following configuration:
{
  "mcpServers": {
    "perplexity-ask": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PERPLEXITY_API_KEY",
        "mcp/perplexity-ask"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

NPX Installation

Alternatively, you can use NPX to install and run the server:

{
  "mcpServers": {
    "perplexity-ask": {
      "command": "npx",
      "args": [
        "-y",
        "server-perplexity-ask"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

Configuration File Location

For Claude Desktop, the configuration file is located at:

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

You can access it using:

vim ~/Library/Application\ Support/Claude/claude_desktop_config.json

Verification

After installation, verify that the MCP server is properly connected to your AI assistant:

  1. Look for the hammer icon in your AI assistant interface, which indicates available tools
  2. Click on the hammer icon to see the list of available tools
  3. Confirm that "perplexity_ask" appears in the list of available tools

Usage

Once installed, you can use the Perplexity Ask tool by simply asking your AI assistant to search for information on the web. The assistant will automatically use the Perplexity Sonar API to retrieve relevant and up-to-date information.

Example prompts:

  • "What are the latest developments in quantum computing?"
  • "Find recent news about climate change legislation"
  • "Search for information about the current state of AI regulation"

Advanced Configuration

You can modify the search parameters used by the Perplexity Sonar API by editing the index.ts script in the repository. Refer to the official API documentation for details on available parameters.

Troubleshooting

If you encounter issues with the Perplexity Ask MCP server:

  1. Verify that your Perplexity API key is correct and properly configured
  2. Check that the Docker image was built successfully
  3. Ensure that your AI assistant's configuration file is correctly formatted
  4. Consult the MCP troubleshooting guide

For additional support, you can contact Perplexity at api@perplexity.ai or file an issue on the GitHub repository.

Related MCPs

SearXNG
SearchTypeScript

Web search capabilities through SearXNG API integration

Hacker News
SearchPython

Access and search Hacker News content programmatically

Web Search
SearchJavaScript

Free Google search integration with no API keys required

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.