Perplexity AI MCP Server: Real-time Search & Reasoning for AI

Explore Perplexity AI MCP Server for real-time web search, advanced reasoning, and comprehensive research. Empower your AI with up-to-date information and detailed answers.

GitHub starsnpm versionnpm downloads

Overview

The Perplexity API Platform MCP Server is the official Model Context Protocol implementation from Perplexity AI, enabling AI assistants to access real-time web search, advanced reasoning, and comprehensive research capabilities through Perplexity's powerful Sonar models and Search API.

Official Implementation:

Developed and maintained by Perplexity AI

Key Features

🔍

Real-Time Web Search

Direct access to current web information with ranked results and metadata. Learn more about Knowledge Graph Memory.

🧠

Advanced Reasoning

Leverage sonar-reasoning-pro for complex problem-solving and analysis. Explore advanced reasoning with Ollama Deep Researcher.

📚

Deep Research

Conduct comprehensive multi-source research with detailed reports. Discover Sequential Thinking for enhanced research.

💬

Conversational AI

Natural language interaction with real-time web context

Available Tools

Quick Reference

ToolPurposeModelBest For
perplexity_searchDirect web searchSearch APIFinding current information
perplexity_askConversational AI with searchsonar-proQuick questions & answers
perplexity_researchDeep comprehensive researchsonar-deep-researchDetailed analysis & reports
perplexity_reasonAdvanced reasoningsonar-reasoning-proComplex problem-solving

Detailed Usage

perplexity_search

Performs direct web search and returns ranked results with metadata. Ideal for discovering current information and getting quick search results.

use_mcp_tool({
  server_name: "perplexity",
  tool_name: "perplexity_search",
  arguments: {
    query: "latest developments in quantum computing 2025"
  }
});

Returns: Ranked search results with URLs, titles, snippets, and relevance scores

perplexity_ask

General-purpose conversational AI with real-time web search using the sonar-pro model. Perfect for getting quick, accurate answers to questions.

use_mcp_tool({
  server_name: "perplexity",
  tool_name: "perplexity_ask",
  arguments: {
    query: "What are the key features of Next.js 15?",
    temperature: 0.7
  }
});

Model: sonar-pro
Returns: Conversational response with web-sourced information

perplexity_research

Extended Timeout:

Deep research may take longer. Consider setting PERPLEXITY_TIMEOUT_MS higher (e.g., 600000 for 10 minutes)

Deep, comprehensive research using the sonar-deep-research model. Ideal for thorough analysis and detailed reports on complex topics.

use_mcp_tool({
  server_name: "perplexity",
  tool_name: "perplexity_research",
  arguments: {
    query: "Comprehensive analysis of AI safety measures in 2025",
    temperature: 0.3
  }
});

Model: sonar-deep-research
Returns: Detailed research report with multiple sources and comprehensive analysis

perplexity_reason

Advanced reasoning and problem-solving using the sonar-reasoning-pro model. Best for complex analytical tasks and multi-step reasoning.

use_mcp_tool({
  server_name: "perplexity",
  tool_name: "perplexity_reason",
  arguments: {
    query: "Analyze the trade-offs between microservices and monolithic architecture for a startup",
    temperature: 0.2
  }
});

Model: sonar-reasoning-pro
Returns: Detailed logical analysis with step-by-step reasoning

Installation

Prerequisites

API Key Required:

You need a Perplexity API key. Get one from the Perplexity API Portal

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "-y",
        "@perplexity-ai/mcp-server"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your-api-key-here",
        "PERPLEXITY_TIMEOUT_MS": "300000"
      }
    }
  }
}
Environment Variables:
  • PERPLEXITY_API_KEY - Your API key from Perplexity (required)
  • PERPLEXITY_TIMEOUT_MS - Request timeout in milliseconds (optional, default: 300000 = 5 minutes)

Sonar Models

Model Comparison

ModelPurposeToolSpeed
sonar-proGeneral conversational AI with searchperplexity_ask⚡ Fast
sonar-reasoning-proAdvanced reasoning & problem-solvingperplexity_reason⚡⚡ Medium
sonar-deep-researchComprehensive multi-source researchperplexity_research⚡⚡⚡ Thorough

Use Cases

Quick Information Discovery

Use perplexity_search to find current information and get ranked search results for:

  • Breaking news and current events
  • Latest product releases or updates
  • Real-time data and statistics
  • Recent research papers or articles

Conversational Assistance

Use perplexity_ask with sonar-pro for:

  • Quick questions with up-to-date answers
  • Fact-checking and verification
  • Getting summaries of current topics
  • General knowledge queries with web context

Complex Problem-Solving

Use perplexity_reason with sonar-reasoning-pro for:

  • Analyzing trade-offs and decision-making
  • Technical architecture comparisons
  • Multi-step logical reasoning
  • Systematic problem breakdown

Deep Research & Analysis

Use perplexity_research with sonar-deep-research for:

  • Comprehensive market research
  • Academic literature reviews
  • Industry trend analysis
  • Detailed technical documentation
  • Multi-source fact compilation

Configuration Tips

Timeout Settings

For different use cases, adjust the timeout:

{
  "env": {
    "PERPLEXITY_TIMEOUT_MS": "300000"  // 5 minutes - default
  }
}

Recommended timeouts:

  • Search & Ask: 300000 (5 minutes) - default is fine
  • Reasoning: 450000 (7.5 minutes) - for complex analysis
  • Deep Research: 600000+ (10+ minutes) - allow time for comprehensive research

Temperature Settings

Control response creativity:

  • 0.0-0.3: Factual, precise, deterministic
  • 0.4-0.7: Balanced creativity and accuracy
  • 0.8-1.0: More creative, varied responses

Troubleshooting

Common Issues

API Key Not Working
  1. Verify your API key is correct from the Perplexity API Portal
  2. Ensure the environment variable is properly set: PERPLEXITY_API_KEY
  3. Check that your API key has sufficient credits
  4. Restart your MCP client after updating the configuration
Timeout Errors on Research Queries

Deep research queries can take longer to complete. Increase the timeout:

"PERPLEXITY_TIMEOUT_MS": "600000" // 10 minutes

Installation Issues
  1. Ensure you have Node.js installed (version 16+)
  2. Try running manually: npx @perplexity-ai/mcp-server
  3. Clear npm cache: npm cache clean --force
  4. Check your internet connection
Poor Search Results
  • Make queries more specific and detailed
  • Include relevant time frames (e.g., "2025", "recent", "latest")
  • Use perplexity_research for comprehensive coverage
  • Try adjusting temperature settings for different result styles

Sources