NativeAIHub
Perplexity MCP Server

Perplexity MCP Server

Give your AI agent access to Perplexity's search engine for real time information, sourced answers with citations, and deep multi-source research. Four tools ranging from quick lookups to thorough investigations.

MCP Serverยท3 sectionsยท1 min read
research
Install Prompt

Paste this into Claude Code to set it up:

I want to add the Perplexity MCP Server to my Claude Code setup.

IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.

Prerequisites: You need a Perplexity API key. Sign up at perplexity.ai and generate an API key from your account settings.

Run this command to add the MCP server (replace pplx-your-key with your actual API key):
```bash
jq '.mcpServers["perplexity"] = {"type": "stdio", "command": "npx", "args": ["-y", "@anthropic/perplexity-mcp"], "env": {"PERPLEXITY_API_KEY": "pplx-your-key"}}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```

After adding, restart Claude Code. You get four tools at different research depths: perplexity_search (fast lookups), perplexity_ask (quick cited answers), perplexity_research (deep multi-source investigation), and perplexity_reason (step-by-step logical analysis).

01What It Does

Real time accuracy for every question

Instead of relying on stale training data, your agent can search the live web for current information. Pricing changes, library updates, competitor moves, regulatory shifts: your agent can verify all of it in real time with cited sources.
SpeedDepthBest For
perplexity_searchFastSurface levelFinding URLs, facts, recent news
perplexity_askFastMediumQuick questions with cited answers
perplexity_researchSlow (30s+)DeepMulti-source investigation and analysis
perplexity_reasonMediumDeepStep by step logical analysis of tradeoffs

02Real Scenarios

1

"What's the latest pricing for Anthropic's API?"

The agent uses perplexity_ask to get current, cited pricing data rather than recalling potentially outdated training data.

2

"Research the task management competitive landscape"

The agent uses perplexity_research to analyze competitors, their positioning, pricing, and recent product updates with sources.

3

"Is this library still maintained?"

The agent uses perplexity_search to check recent commits and community discussion, then perplexity_reason to evaluate whether it is a safe dependency.

4

"What changed in GDPR this year?"

The agent uses perplexity_research with a recency filter to surface only recent regulatory updates with source links for verification.

03Setup and Best Practices

# Add to ~/.claude.json under mcpServers
"perplexity": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@anthropic/perplexity-mcp"],
  "env": { "PERPLEXITY_API_KEY": "pplx-your-key" }
}
Start with search or ask. Most questions only need a quick lookup. Reserve research for high stakes analysis.
Use recency filters. When checking current pricing or recent releases, set the filter to avoid outdated results.
Verify critical claims. Citations make verification straightforward. Check the source links for anything that affects business decisions.