Perplexity AI MCP Server

by mkusaka

Integrations

  • Integrates with Perplexity AI's API to provide advanced search capabilities through the perplexity_search tool, supporting multiple Sonar models including sonar-reasoning-pro, sonar-reasoning, sonar-pro, and sonar

Perplexity AI MCP Server

An MCP server implementation that integrates Perplexity AI's API, providing advanced search capabilities with multiple model options.

Features

  • Search using Perplexity AI's models
  • Support for all official Sonar models
  • Configurable result count
  • Detailed error handling and logging
  • MCP Inspector compatible

Available Models

  • sonar-reasoning-pro (127k context)
  • sonar-reasoning (127k context)
  • sonar-pro (200k context)
  • sonar (127k context)

Installation

pnpm install pnpm build

Configuration

API Key

  1. Sign up for a Perplexity AI account
  2. Get your API key from the dashboard
  3. Set the environment variable:
export PERPLEXITY_API_KEY=your_api_key_here

Usage

Direct Execution

node dist/index.js # or if you made it executable ./dist/index.js

Development

pnpm dev

Testing with MCP Inspector

pnpm inspect

Tool Reference

Performs a search using Perplexity AI's models.

Parameters:

  • query (string, required): The search query
  • model (string, optional): Model to use (default: "sonar")
    • Available options: sonar-reasoning-pro, sonar-reasoning, sonar-pro, sonar
  • count (number, optional): Number of results (1-10, default: 5)

Development

Project Structure

src/perplexity/ ├── index.ts # Main server implementation ├── lib/ │ └── logger.ts # Logging configuration └── adr.md # Architectural decisions

Logging

Logs are written to perplexity-mcp.log in the project root directory.

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server integrating Perplexity AI's API to offer advanced search capabilities with support for multiple models and result configuration.

  1. Features
    1. Available Models
      1. Installation
        1. Configuration
          1. API Key
        2. Usage
          1. Direct Execution
          2. Development
          3. Testing with MCP Inspector
        3. Tool Reference
          1. perplexity_search
        4. Development
          1. Project Structure
          2. Logging
        5. License
          1. Contributing

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              This server allows users to perform web searches using Perplexity AI, providing a tool for retrieving search results through a simple API interface.
              Last updated -
              1
              2
              TypeScript
            • 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
            • A
              security
              F
              license
              A
              quality
              Provides a standardized way to integrate Perplexity AI's features like chat, search, and documentation access into MCP-based systems.
              Last updated -
              5
              JavaScript
            • -
              security
              F
              license
              -
              quality
              Allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information using the Perplexity API, with features for filtering results by time period.
              Last updated -
              8
              Python
              • Apple

            View all related MCP servers

            ID: s45iho8wbk