Perplexity

ppl-ai
986
Perplexity's official MCP server that connects to Perplexity's Sonar API, enabling real-time web-wide research in conversational AI

Overview

What is Perplexity

Model Context Protocol (MCP) is a server connector designed for the Perplexity API, enabling users to perform web searches seamlessly within the MCP ecosystem.

How to Use

To use the Model Context Protocol, clone the repository, install dependencies, obtain a Sonar API key, configure the Claude desktop, build the Docker image, and test the integration with Claude.

Key Features

Key features include real-time web search capabilities through the Sonar API, easy integration with Claude desktop, and customizable search parameters.

Use Cases

Use cases include conducting live web searches during conversations, enhancing research capabilities for users, and integrating web data into applications without leaving the MCP environment.

Installation

Generate your exclusive SSE URL:

MCP Server Configuration (for all clients):

Installation in Cursor

1. Click on the Cursor settings icon in the top right, find the 'MCP' option in the left menu;
2. Click the '+ Add' button in the top right of that page, which will automatically open the mcp.json configuration file.
3. Paste the MCP configuration into the file and save it (no need to delete existing content).
4. The MCP settings interface will show a green dot when the configuration is correct.

Note: If the green status is not displayed, please try restarting Cursor.

Installation in Claude

1. Open 'Settings' in the top left corner of the Claude page, go to 'Developer', and click 'Edit Config' to locate the claude_desktop_config.json configuration file;
2. Paste the MCP configuration into the file and save it (insert in the appropriate position, without deleting existing content).

After completion, restart Claude, and you can use MCP functions through the Claude dialog

SDK

Installation in Python

Install composio-toolset by running the following commands in your terminal:

pip install composio_openai

Python example code:

from composio_openai import ComposioToolSet, App
from openai import OpenAI

openai_client = OpenAI()
composio_toolset = ComposioToolSet(entity_id="default")

tools = composio_toolset.get_tools(apps=[App.GITHUB])

Installation in TypeScript

Install composio-core by running the following commands in your terminal:

npm install -g composio_core

TypeScript example code:

import { OpenAI } from "openai";
import { OpenAIToolSet } from "composio-core";

const openaiClient = new OpenAI();
const composioToolset = new OpenAIToolSet();

const tools = await composioToolset.getTools({
  apps: ["github"],
});

Content

Tool List

perplexity_ask

perplexity_research

perplexity_reason