Perplexity Ask MCP Server

Perplexity Ask MCP Server

By ppl-ai GitHub

A Model Context Protocol Server connector for Perplexity API, to enable web search without leaving the MCP ecosystem.

mathgpt math-solver
Overview

what is Perplexity Ask MCP Server?

Perplexity Ask MCP Server is a Model Context Protocol Server connector for the Perplexity API, enabling web search capabilities within the MCP ecosystem.

how to use Perplexity Ask MCP Server?

To use the server, clone the MCP repository, install dependencies, obtain a Sonar API key, configure the Claude desktop, build the Docker image, and test the integration.

key features of Perplexity Ask MCP Server?

  • Real-time web search integration with the Sonar API.
  • Easy configuration and setup for users.
  • Support for advanced search parameters.

use cases of Perplexity Ask MCP Server?

  1. Conducting live web searches without leaving the MCP environment.
  2. Enhancing research capabilities for users of the Claude desktop.
  3. Integrating web search functionalities into applications using the Perplexity API.

FAQ from Perplexity Ask MCP Server?

  • How do I get a Sonar API key?

Sign up for a Sonar API account and generate your API key from the developer dashboard.

  • Is there a troubleshooting guide available?

Yes, the Claude documentation provides a troubleshooting guide for common issues.

  • What license is the MCP server under?

The MCP server is licensed under the MIT License, allowing free use, modification, and distribution.

Content

Perplexity Ask MCP Server

An MCP server implementation that integrates the Sonar API to provide Claude with unparalleled real-time, web-wide research.

Demo

Tools

  • perplexity_ask
    • Engage in a conversation with the Sonar API for live web searches.
    • Inputs:
      • messages (array): An array of conversation messages.
        • Each message must include:
          • role (string): The role of the message (e.g., system, user, assistant).
          • content (string): The content of the message.

Configuration

Step 1:

Clone the MCP repository:

git@github.com:modelcontextprotocol/servers.git

Navigate to the perplexity-ask directory and install the necessary dependencies:

cd servers/src/perplexity-ask && npm install

Step 2: Get a Sonar API Key

  1. Sign up for a Sonar API account.
  2. Follow the account setup instructions and generate your API key from the developer dashboard.
  3. Set the API key in your environment as PERPLEXITY_API_KEY.

Step 3: Configure Claude Desktop

  1. Download Claude desktop here.

  2. Add this to your claude_desktop_config.json:

{
  "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

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

You can access the file using:

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

Step 4: Build the Docker Image

Docker build:

docker build -t mcp/perplexity-ask:latest -f src/perplexity-ask/Dockerfile .

Step 5: Testing

Let’s make sure Claude for Desktop is picking up the two tools we’ve exposed in our perplexity-ask server. You can do this by looking for the hammer icon:

Claude Visual Tools

After clicking on the hammer icon, you should see the tools that come with the Filesystem MCP Server:

Available Integration

If you see both of these this means that the integration is active. Congratulations! This means Claude can now ask Perplexity. You can then simply use it as you would use the Perplexity web app.

Step 6: Advanced parameters

Currently, the search parameters used are the default ones. You can modify any search parameter in the API call directly in the index.ts script. For this, please refer to the official API documentation.

Troubleshooting

The Claude documentation provides an excellent troubleshooting guide you can refer to. However, you can still reach out to us at api@perplexity.ai for any additional support or file a bug.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Tools

perplexity_ask

Engages in a conversation using the Sonar API. Accepts an array of messages (each with a role and content) and returns a ask completion response from the Perplexity model.

perplexity_research

Performs deep research using the Perplexity API. Accepts an array of messages (each with a role and content) and returns a comprehensive research response with citations.

perplexity_reason

Performs reasoning tasks using the Perplexity API. Accepts an array of messages (each with a role and content) and returns a well-reasoned response using the sonar-reasoning-pro model.

-

mathgpt math-solver
View Details
StatSource
StatSource by jamie7893

Statsource is a standalone MCP server designed to simplify data analysis. Whether you're pulling data from a PostgreSQL database or a CSV file, Statsource delivers actionable insights with ease

mathgpt math-solver
View Details

Mirror of

mathgpt math-solver
View Details

created from MCP server demo

mathgpt math-solver
View Details

-

mathgpt math-solver
View Details

created from MCP server demo

mathgpt math-solver
View Details