Skip to content
← All guides

Perplexity MCP for Claude Code

By default, Claude has no idea what happened last week. The Perplexity MCP fixes that. Two steps, one command, and Claude can search the live web while it works with you.

What is the Perplexity MCP?

Claude is smart. But it has a knowledge cutoff. Anything that happened after that cutoff (new tools, recent news, live prices, current events), Claude just doesn't know about.

The Perplexity MCP closes that gap. It connects Claude to Perplexity's search API, which means Claude can go look things up in real time while working with you. Not just retrieve cached training data. Actual live search.

Once it's installed, you get four tools inside Claude: perplexity_search for finding specific results, perplexity_ask for AI-answered questions with citations, perplexity_research for deep multi-source investigation, and perplexity_reason for step-by-step logical analysis on complex questions.

The whole thing installs in one command. No config files to edit. No JSON to write.

Step 1: Get Your API Key

You need a Perplexity API key. It takes about 60 seconds to get one.

  • 1. Go to the Perplexity console
    Open console.perplexity.ai in your browser. Create an account if you don't have one. It's free to sign up.
  • 2. Navigate to API Keys
    In the left sidebar, click API Keys. Then click Generate to create a new key.
  • 3. Copy your key
    Copy the key and keep it somewhere safe. You'll paste it into the install command in the next step.

Step 2: Run the Command

Open your terminal. Paste this command, replacing your_key_here with the key you just copied:

Install command

Terminal
claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server

That's the whole install. This command registers the Perplexity MCP globally in Claude Code. You only need to run it once.

Step 3: Restart and Test

Quit Claude Code and reopen it. The MCP will initialize on startup.

To confirm it's working, open a Claude Code session and ask something that requires current information, something Claude's training data wouldn't know. Try: "What's the latest news about Anthropic this week?"

If it starts returning real results with citations and sources, you're live.

The 4 tools now available inside Claude:

  • perplexity_search — returns ranked web results for any query in real time
  • perplexity_ask — AI-answered questions with cited sources, fast
  • perplexity_research — deep multi-source investigation, takes 30+ seconds but thorough
  • perplexity_reason — step-by-step logic on complex questions, with web-grounded evidence

What You Can Do Now

These are the use cases that actually change how you work. All of them require live internet access, which is exactly what you just gave Claude.

  • 01. Real-time research while you work
    Ask Claude to look something up mid-conversation. Competitor pricing, a new tool that just dropped, recent API changes, breaking news in your industry. Claude pulls live results and brings them directly into your workflow.
  • 02. Fact-checking before you publish
    Before sending a newsletter or posting content, have Claude verify claims, check stats, and confirm that any tools or features you're referencing still exist and work the way you described. Catches outdated info before it goes out.
  • 03. Content research on current trends
    Ask Claude what's trending in your niche right now, what people are talking about, what questions are surfacing. It returns live context from across the web, not stale training data from 18 months ago. Better content starts here.
  • 04. Market and competitive intelligence
    Tell Claude to research a competitor, a market shift, or an emerging tool. Use perplexity_research for deep dives that pull from multiple sources and synthesize findings. The kind of research that used to take an afternoon takes a few minutes.

Everything in One Place

Step 1: Get your API key

Browser
console.perplexity.ai → API Keys → Generate

Step 2: Install the MCP

Terminal
claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server

Step 3: Restart Claude Code

Quit and reopen. Test with: "What's the latest AI news this week?"