Skip to main content
Glama

Perplexity MCP Server

by IsaiahDupree

Perplexity MCP Server

This is a Model Context Protocol (MCP) server for the Perplexity API, designed to run as an Apify Actor. It allows AI assistants to search and access information using the Perplexity API through a standardized interface.

Features

  • Search using Perplexity's powerful search capabilities
  • Chat completions with various Perplexity models
  • Model listing
  • Server-Sent Events (SSE) for real-time communication

Setup

Prerequisites

  • Node.js 18 or higher
  • Perplexity API key

Environment Variables

The following environment variables are required:

  • PERPLEXITY_API_KEY: Your Perplexity API key

Installation

  1. Clone this repository
  2. Install dependencies:
npm install

Running Locally

To run the MCP server locally:

npm run dev

Deployment to Apify

This project is designed to be deployed as an Apify Actor. To deploy:

  1. Create a new Actor on the Apify platform
  2. Set the environment variables in the Actor settings
  3. Deploy this codebase to the Actor

API Endpoints

The MCP server exposes the following endpoints:

  • /search (POST): Perform a search using Perplexity
  • /chat (POST): Generate chat completions
  • /models (GET): List available models

Example Usage

{ "query": "What is the capital of France?", "search_focus": "internet" }

Chat

{ "messages": [ {"role": "user", "content": "Tell me about quantum computing"} ], "model": "sonar-medium-online" }

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

An Apify Actor implementing the Model Context Protocol for Perplexity API, enabling AI assistants to search and access information through a standardized interface.

  1. Features
    1. Setup
      1. Prerequisites
      2. Environment Variables
      3. Installation
      4. Running Locally
    2. Deployment to Apify
      1. API Endpoints
        1. Example Usage
          1. Search
          2. Chat
        2. License

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            An MCP server integrating Perplexity AI's API to offer advanced search capabilities with support for multiple models and result configuration.
            Last updated -
            1
            696
            1
            JavaScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            This server provides access to the Perplexity AI API, enabling interaction through chatting, searching, and documentation retrieval within MCP-based systems.
            Last updated -
            5
            2
            JavaScript
          • -
            security
            F
            license
            -
            quality
            Interfaces with the Perplexity AI API to provide advanced question answering capabilities through the standardized Model Context Protocol, supporting multiple Perplexity models.
            Last updated -
            JavaScript
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that allows AI assistants to retrieve user information, search videos by ID, and find content by keywords on bilibili.com.
            Last updated -
            3
            273
            7
            TypeScript
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/IsaiahDupree/perplexity-mcp-server-actor'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server