Perplexity Web-Search MCP

Perplexity Web-Search MCP

Enables AI assistants to perform real-time web and academic searches using Perplexity's Sonar API.

Category
Visit Server

README

šŸ” Perplexity Web-Search MCP

Supercharge your AI assistant with real-time web search and academic research capabilities

An MCP (Model Context Protocol) server that integrates Perplexity's powerful Sonar API, giving your AI assistant access to current information from the web and scholarly sources.

✨ Features

  • 🌐 Real-time web search - Get current information from across the internet
  • šŸŽ“ Academic search - Access peer-reviewed papers and scholarly sources
  • šŸ“ Location-aware results - Filter by city and country
  • ā° Time-filtered search - Get recent results (day, week, etc.)
  • 🧠 Multiple AI models - Choose from various Perplexity Sonar models
  • šŸ”Œ Universal compatibility - Works with any MCP-compatible system

šŸ¤– Compatible AI Systems

This MCP server works seamlessly with:

  • Claude
  • Amazon Q
  • Google Gemini
  • OpenAI Codex
  • Any MCP-compatible AI assistant

šŸš€ Exemplary Amazon Q Developer Setup

Here's how to properly integrate this MCP server with Amazon Q Developer:

1. Locate your Amazon Q agent configuration

~/.aws/amazonq/cli-agents/dev.json

2. Add the sonar MCP server to your configuration

{
  "$schema": "https://raw.githubusercontent.com/aws/amazon-q-developer-cli/refs/heads/main/schemas/agent-v1.json",
  "name": "dev",
  "description": "",
  "mcpServers": {
    "sonar": {
      "command": "/Users/your-username/SoftwareProjects/perplexity_sonar_mcp/.venv/bin/python",
      "args": ["/Users/your-username/SoftwareProjects/perplexity_sonar_mcp/main.py"],
      "cwd": "/Users/your-username/SoftwareProjects/perplexity_sonar_mcp",
      "env": {
        "PERPLEXITY_API_KEY": "pplx-your-api-key-here"
      }
    }
  },
  "tools": [
    "fs_read",
    "fs_write",
    "execute_bash",
    "use_aws",
    "@sonar"
  ]
}

3. Usage Example

[dev] > Web search: "Is AI a bubble?"

šŸ› ļø  Using tool: web_search from mcp server sonar
 ā‹®
 ā— Running web_search with the param:
 ā‹®  {
 ā‹®    "name": "web_search",
 ā‹®    "arguments": {
 ā‹®      "query": "Is AI a bubble?"
 ā‹®    }
 ā‹®  }

Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]: y

 ā‹®
 ā— Completed in 9.990s

> Based on current market analysis, AI is widely considered to be in a bubble phase...

Installation

With uv (recommended)

uv sync

With pip

pip install -e .

MCP Configuration

Add to your MCP client configuration:

With uv:

  • Transport Type: STDIO
  • Command: uv
  • Arguments: run main.py

With Python:

  • Transport Type: STDIO
  • Command: python
  • Arguments: main.py

Environment Setup

Set your Perplexity API key:

export PERPLEXITY_API_KEY="your-api-key-here"

Usage

With uv

uv run python main.py

With Python

python main.py

Requirements

  • Python >=3.10
  • PERPLEXITY_API_KEY environment variable

Tools

web_search

Search the web using Perplexity Sonar API for real-time information.

Parameters:

  • query (required): The search query or question
  • model (optional): Perplexity model - "sonar", "sonar-pro", "sonar-deep-research", "sonar-reasoning", "sonar-reasoning-pro" (default: "sonar")
  • recency_filter (optional): Time filter for results (e.g., 'week', 'day')
  • city (optional): City name for location-based search
  • country (optional): Two letter ISO country code

web_search_academic

Search academic sources using Perplexity Sonar API for scholarly information. Prioritizes peer-reviewed papers and academic journals.

Parameters:

  • query (required): The search query or question
  • model (optional): Perplexity model - "sonar", "sonar-pro", "sonar-deep-research", "sonar-reasoning", "sonar-reasoning-pro" (default: "sonar")
  • recency_filter (optional): Time filter for results (e.g., 'week', 'day')
  • city (optional): City name for location-based search
  • country (optional): Two letter ISO country code

Configuration

Set your Perplexity API key:

export PERPLEXITY_API_KEY="your-api-key-here"

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured