Perplexity Ask MCP Server

by perplexityai

Not rated
GitHub

About

A connector for the Perplexity API to enable web search within the MCP ecosystem.

Details

Author
perplexityai
Categories
Search, Other, AI

Setup

Install Perplexity Ask MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/perplexityai/modelcontextprotocol

Follow the installation instructions in the repository README, then restart your MCP client.

A connector for the Perplexity API to enable web search within the MCP ecosystem.

What can you do with Perplexity Ask MCP?

- Real-time web search— Ask for current information viaperplexity_search, with optional recency filters and domain restrictions.
- Quick conversational Q&A— Useperplexity_askfor everyday questions backed by live web search.
- Deep research reports— Request comprehensive analysis throughperplexity_research, which streams progress on long-running runs.
- Advanced reasoning tasks— Tackle complex analytical problems withperplexity_reasonfor step-by-step problem-solving.

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

The remote MCP server is hosted by Perplexity and is the easiest way to get started: same tools, nothing to install or update. The Cursor and VS Code buttons at the top of this page connect to it with one click. If your MCP client does not support remote servers yet, skip to thelocal serversetup below. Connect over Streamable HTTP with yourPerplexity API key:

claude mcp add --transport http perplexity https://api.perplexity.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"

See theMCP integration docsfor manual Cursor/VS Code configuration, usage from the Anthropic API, and setup for other clients.
- Get your Perplexity API Key from the
API Portal
- Replaceyour_key_herein the configurations below with your API key
- (Optional) Set timeout:PERPLEXITY_TIMEOUT_MS=600000(default: 5 minutes)
- (Optional) Set custom base URL:PERPLEXITY_BASE_URL=https://your-custom-url.com(default:
https://api.perplexity.ai)
- (Optional) Set log level:PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR(default: ERROR)

claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server
export PERPLEXITY_API_KEY="your_key_here" claude # Then run: /plugin marketplace add perplexityai/modelcontextprotocol # Then run: /plugin install perplexity
codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server

This repository is packaged as anAgent Plugin, so clients that support the standard can install it directly from this repository. The Agent Plugins format does not carry secrets, so set thePERPLEXITY_API_KEYenvironment variable through your client's plugin or MCP settings.

Most clients can be configured manually using the samemcpServerswrapper in their client config (as shown for Cursor). If a client has a different schema, check its docs for the exact wrapper format.

For manual setup, these clients all use the samemcpServersstructure:

{ "mcpServers": { "perplexity": { "command": "npx", "args": ["-y", "@perplexity-ai/mcp-server"], "env": { "PERPLEXITY_API_KEY": "your_key_here" } } } }

If you are running this server at work—especially behind a company firewall or proxy—you may need to tell the program how to send its internet traffic through your network's proxy. Follow these steps:

- Ask your IT department for your HTTPS proxy address and port.
- You may also need a username and password.

The easiest and most reliable way for Perplexity MCP is to usePERPLEXITY_PROXY. For example:

export PERPLEXITY_PROXY=https://your-proxy-host:8080

If your proxy needs a username and password, use:

export PERPLEXITY_PROXY=https://username:password@your-proxy-host:8080

3. Alternate: Standard environment variables

If you'd rather use the standard variables, we supportHTTPS_PROXYandHTTP_PROXY.

[!NOTE] The server checks proxy settings in this order:PERPLEXITY_PROXYHTTPS_PROXYHTTP_PROXY. If none are set, it connects directly to the internet. URLs must includehttps://. Typical ports are8080,3128, and80.

For cloud or shared deployments, run the server in HTTP mode.

docker build -t perplexity-mcp-server . docker run -p 8080:8080 -e PERPLEXITY_API_KEY=your_key_here perplexity-mcp-server
export PERPLEXITY_API_KEY=your_key_here npm install && npm run build && npm run start:http

The server will be accessible athttp://localhost:8080/mcp

Direct web search using the Perplexity Search API. Returns ranked search results with metadata, perfect for finding current information. Supports recency filters (search_recency_filter) and domain restrictions (search_domain_filter).

General-purpose conversational AI with real-time web search, backed by the Agent APIfastpreset. Great for quick questions and everyday searches.

Deep, comprehensive research backed by the Agent APIhighpreset. Ideal for thorough analysis and detailed reports. Runs can take minutes; the server streams the run and reports progress to clients that request it.

Advanced reasoning and problem-solving backed by the Agent APImediumpreset. Perfect for complex analytical tasks.

[!NOTE] Presets are managed configurations (model, search setup, step budget) that Perplexity keeps tuned over time; see thepresets guide. Earlier versions of this server called the legacysonar-pro,sonar-reasoning-pro, andsonar-deep-researchmodels and acceptedstrip_thinking/reasoning_effortparameters. Those parameters are no longer part of the tool schemas and are ignored if sent; the Agent API produces no<think>tags.

The package also exports the server factory for embedding in your own Node process:

import { createPerplexityServer } from "@perplexity-ai/mcp-server"; // Single-tenant: reads PERPLEXITY_API_KEY from the environment. const server = createPerplexityServer("my-service"); // Multi-tenant hosts resolve the key per call instead. When a provider is // set, the environment variable is never consulted, and a provider that // returns no key fails the call rather than falling back. const tenantServer = createPerplexityServer("my-service", { apiKey: () => currentRequestApiKey, });

Mount the returned server on any MCP transport (stdio, streamable HTTP, in-memory).

- API Key Issues: EnsurePERPLEXITY_API_KEYis set correctly
- Connection Errors: Check your internet connection and API key validity
- Tool Not Found: Make sure the package is installed and the command path is correct
- Timeout Errors: For very long research queries, setPERPLEXITY_TIMEOUT_MSto a higher value
- Proxy Issues: Verify yourPERPLEXITY_PROXYorHTTPS_PROXYsetup and ensureapi.perplexity.aiisn't blocked by your firewall.
- EOF / Initialize Errors: Some strict MCP clients fail becausenpxwrites installation messages to stdout. Usenpx -yqinstead ofnpx -yto suppress this output.

For support, visitcommunity.perplexity.aiorfile an issue.

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

Structural AI Search Readiness MCP. Audit, dry-run fixes, rescore, doctor. No LLM rankings.

Perform web searches with the Brave Search API and analyze research papers using Google's Gemini model.

Provides AI-powered web search and summarization using the Gemini API's grounding feature.

Integrate search grounded Gemini output into your workflow.

Generates responses using the Gemini API and Google Search for up-to-date information.

Performs web searches using the Gemini Web Search Tool via the local gemini-cli.

A server providing Google AI-powered search and documentation tools for developers.

Comprehensive web, news, and social media search and analysis using xAI's Grok API.

Enhances LLM responses with factual, real-time web content using Jina AI's grounding capabilities.

Integrates with Jina AI APIs for web reading, search, and fact-checking.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.