Skip to main content
The Perplexity MCP Server provides four specialized tools for different types of web-grounded tasks. Each tool is optimized for specific use cases, from quick searches to deep research.

Available Tools

Search

Find URLs, facts, and recent news with ranked search results

Ask

Get quick AI-answered questions with citations using Sonar Pro

Research

Conduct deep multi-source investigation with Sonar Deep Research

Reason

Analyze complex problems with step-by-step logic and reasoning

Tool Comparison

ToolModelSpeedBest ForReturns
searchSearch APIFastFinding URLs, verifying facts, recent newsRaw search results with titles, URLs, snippets
asksonar-proFastQuick questions, summaries, explanationsAI-generated text with citations
researchsonar-deep-researchSlow (30s+)Literature reviews, comprehensive overviewsIn-depth analysis with many citations
reasonsonar-reasoning-proMediumMath, logic, comparisons, complex argumentsReasoned response with chain-of-thought

When to Use Each Tool

  • You need to find specific URLs or websites
  • You want raw search results without AI interpretation
  • You’re checking for recent news or events
  • You need to verify facts across multiple sources
  • You want to discover available sources on a topic
  • You need a quick factual answer
  • You want a summary or explanation
  • You’re asking general Q&A questions
  • Speed and cost efficiency are priorities
  • You need citations for your answer
  • You need comprehensive, multi-source analysis
  • You’re conducting literature reviews
  • You want thorough investigative research
  • Quality and depth matter more than speed
  • You can wait 30+ seconds for results
  • You’re solving math or logic problems
  • You need step-by-step reasoning
  • You’re comparing multiple options
  • You’re analyzing complex arguments
  • You want to see the AI’s thinking process

Common Patterns

Search Refinement Flow

Start with perplexity_search to discover sources, then use perplexity_ask for synthesized answers:
// 1. Find relevant sources
const searchResults = await use_mcp_tool(
  "perplexity",
  "perplexity_search",
  { query: "latest AI model benchmarks 2026" }
);

// 2. Get AI-synthesized answer with citations
const answer = await use_mcp_tool(
  "perplexity",
  "perplexity_ask",
  {
    messages: [{
      role: "user",
      content: "Summarize the latest AI model benchmarks from 2026"
    }]
  }
);

Research to Reasoning Flow

Use perplexity_research for broad context, then perplexity_reason for specific analysis:
// 1. Gather comprehensive background
const research = await use_mcp_tool(
  "perplexity",
  "perplexity_research",
  {
    messages: [{
      role: "user",
      content: "What are the main approaches to AI alignment?"
    }]
  }
);

// 2. Reason about specific comparisons
const analysis = await use_mcp_tool(
  "perplexity",
  "perplexity_reason",
  {
    messages: [{
      role: "user",
      content: "Compare RLHF vs constitutional AI for alignment"
    }]
  }
);

Advanced Features

Search Filters

Both perplexity_ask and perplexity_reason support advanced filtering:
{
  messages: [{ role: "user", content: "Latest AI news" }],
  search_recency_filter: "day"  // hour, day, week, month, year
}

Token Optimization

For perplexity_research and perplexity_reason, use strip_thinking to reduce token usage:
{
  messages: [{ role: "user", content: "Solve this logic puzzle..." }],
  strip_thinking: true  // Removes <think>...</think> tags
}
strip_thinking is useful when you only need the final answer and want to save context tokens. The thinking process can consume significant tokens in long conversations.

Best Practices

Choose the Right Tool

Use the comparison table above to select the optimal tool for your task

Use Filters Wisely

Apply recency and domain filters to get more relevant results faster

Optimize Tokens

Enable strip_thinking when you don’t need to see the reasoning process

Handle Timeouts

Set PERPLEXITY_TIMEOUT_MS higher for deep research queries

Error Handling

All tools are read-only and safe to use, but can fail due to:
  • Invalid API Key: Ensure PERPLEXITY_API_KEY is set correctly
  • Network Issues: Check connectivity and proxy settings
  • Timeouts: Research queries may exceed default timeout (increase PERPLEXITY_TIMEOUT_MS)
  • Invalid Messages: Ensure messages array has proper role and content fields
All tools are idempotent within a short time window but results may change as web content updates.

Next Steps

Search Tool

Learn about web search parameters and response formats

Ask Tool

Explore Sonar Pro for quick AI-answered questions

Research Tool

Discover deep research capabilities with Sonar Deep Research

Reason Tool

Master advanced reasoning with Sonar Reasoning Pro