claudekit / tools / perplexity-mcp
[ MCP · Data Engineering ]

Perplexity MCP

The official MCP server implementation for the Perplexity API Platform. Provides AI assistants with real-time web search, reasoning, and research capabilities through Sonar models and the Search API.

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

What it does

Claude’s training data has a cutoff, so questions that require fresh information — recent news, just-shipped docs, latest releases — can’t be answered from memory alone. The usual workaround is to switch to a browser, run a search, and paste results back. Perplexity MCP collapses that loop: Claude calls the search directly through MCP tools and gets answers grounded in real-time web data.

Because Perplexity’s Sonar models synthesize answers from search results rather than returning raw pages, Claude doesn’t have to re-read full result pages itself.

Key features — four tools

  • perplexity_search — direct web search

    Returns ranked Perplexity Search API results unmodified. Use when you want the raw result set rather than a synthesized answer.

  • perplexity_ask — conversational AI with real-time web search

    The most common entry point. Runs on sonar-pro and returns a synthesized answer over current web data in a single call.

  • perplexity_research — deep research

    Runs on sonar-deep-research and produces longer-form research that combines multiple sources. Better suited for topic-wide questions than one-shot queries.

  • perplexity_reason — advanced reasoning

    Runs on sonar-reasoning-pro and adds an explicit reasoning step on top of search results.

Both perplexity_research and perplexity_reason accept a strip_thinking boolean to drop thinking tags from output and save tokens.

Installation

Claude Code (recommended) — one-liner that registers and installs the server.

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

Codex — same pattern.

codex mcp add perplexity \
  --env PERPLEXITY_API_KEY="your_key_here" \
  -- npx -y @perplexity-ai/mcp-server

Cursor · Claude Desktop · Kiro · Windsurf · VS Code — add the server to the client’s mcpServers JSON config (file location varies per client).

Docker · HTTP server — for shared or cloud deployments. Either docker build and docker run -p 8080:8080 -e PERPLEXITY_API_KEY=..., or run the HTTP mode directly with npm install && npm run build && npm run start:http.

Environment variables

VariableRequiredDefaultPurpose
PERPLEXITY_API_KEYAPI key. Generate at https://www.perplexity.ai/account/api/group
PERPLEXITY_TIMEOUT_MS5 minutesAPI call timeout
PERPLEXITY_BASE_URLhttps://api.perplexity.aiCustom endpoint
PERPLEXITY_LOG_LEVELERROROne of DEBUG, INFO, WARN, ERROR
PERPLEXITY_PROXY / HTTPS_PROXY / HTTP_PROXYCorporate proxy. Format: https://[username:password@]host:port

HTTP server deployment also reads: PORT (default 8080), BIND_ADDRESS (default 0.0.0.0), and ALLOWED_ORIGINS.

Notes

  • Officially operated by Perplexity — maintained in the github.com/perplexityai org, distinct from community wrappers.
  • API usage is billed separately by Perplexity — Anthropic charges for Claude tokens, Perplexity charges for API calls. Track usage on each platform separately if cost monitoring matters.
  • Proxy support — set PERPLEXITY_PROXY, HTTPS_PROXY, or HTTP_PROXY; any of the three is recognized.
  • Use strip_thinking to save tokens — the research and reason tools include thinking tags in output by default. When only the final answer is needed, enable the option to reduce token usage.
  • MIT licensed — free for commercial and personal use.
§ 6

See also

same category · curated
[01]
[MCP] Hugging Face · Hugging Face's official remote MCP server, hosted by Hugging Face. Search models, datasets, Spaces, papers, and docs in natural language and call Gradio Space tools from Claude Code.
tool · claudekit.io / tools / huggingface
[02]
[Skill] Last30Days · An AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web — then synthesizes a grounded summary. The engine scores results by actual engagement metrics (upvotes, likes, view counts, prediction market odds) rather than editorial authority, resolves entities first (handles, subreddits, GitHub repos, hashtags), runs parallel multi-source queries, merges duplicate stories across platforms, and produces cited briefs. Reddit, HN, Polymarket, and GitHub work immediately with zero configuration.
tool · claudekit.io / tools / last30days
[03]
[Tool] Firecrawl · 🔥 The API to search, scrape, and interact with the web for AI. Three integrated capabilities — Search, Scrape, Interact — exposed through one API. Open source under AGPL-3.0 and self-hostable via docker-compose, the engine also powers the firecrawl.dev cloud SaaS run by the same team.
tool · claudekit.io / tools / firecrawl
§ 7

Frequently Asked Questions

frequently asked
§ 7.1
What is Perplexity MCP?
The official MCP server implementation for the Perplexity API Platform. It gives AI assistants real-time web search, reasoning, and research capabilities through Perplexity's Sonar models (`sonar-pro`, `sonar-deep-research`, `sonar-reasoning-pro`) and the Search API.
§ 7.2
Where does it run?
Claude Code, Claude Desktop, Codex, Cursor, Kiro, Windsurf, and VS Code. Any standard MCP client can connect via manual `mcpServers` JSON configuration.
§ 7.3
How do I install it?
On Claude Code, run `claude mcp add perplexity --env PERPLEXITY_API_KEY="..." -- npx -y @perplexity-ai/mcp-server`. Codex uses the equivalent `codex mcp add` command. Docker and a Node.js HTTP server deployment are also supported.
§ 7.4
Where do I get the API key?
Generate one at https://www.perplexity.ai/account/api/group and set it as the `PERPLEXITY_API_KEY` environment variable.
§ 7.5
What tools does the server expose?
`perplexity_search` (direct web search), `perplexity_ask` (conversational AI on `sonar-pro`), `perplexity_research` (deep research on `sonar-deep-research`), and `perplexity_reason` (advanced reasoning on `sonar-reasoning-pro`). The last two accept an optional `strip_thinking` boolean to remove thinking tags and save tokens.
§ 7.6
What's the license?
MIT. Perplexity API usage is billed separately by Perplexity — refer to the [Perplexity documentation](https://docs.perplexity.ai/) for pricing.