Perplexity Web Search MCP Server logo

Perplexity Web Search MCP Server

by nachoal

A simple MCP server that provides web search functionality using the Perplexity API. This allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information.

View on GitHub

Last updated: N/A

What is Perplexity Web Search MCP Server?

This is an MCP (Model Context Protocol) server that integrates with the Perplexity API to provide web search capabilities to AI assistants like Claude. It allows these assistants to access and utilize up-to-date information from the web.

How to use Perplexity Web Search MCP Server?

To use this server, you need to clone the repository, install the dependencies, configure your Perplexity API key (either as an environment variable or in a .env file), and run the server. You can then configure your Claude Desktop application to use this server as a tool for web searches. Example prompts are provided for Claude.

Key features of Perplexity Web Search MCP Server

  • Search the web with Perplexity's powerful search capabilities

  • Get comprehensive search results with sources and citations

  • Filter results by time period (day, week, month, year)

  • Includes a ready-to-use prompt template for web searches

  • Supports loading API key from environment variables or .env file

Use cases of Perplexity Web Search MCP Server

  • Enabling AI assistants to answer questions requiring up-to-date web information

  • Providing context for AI models based on recent web searches

  • Automating web research tasks through AI

  • Integrating web search capabilities into AI-powered applications

FAQ from Perplexity Web Search MCP Server

How do I get a Perplexity API key?

Visit Perplexity API Settings at perplexity.ai/settings/api, create an account if you don't have one, and generate an API key.

What is the purpose of the .env file?

The .env file is used to store your Perplexity API key securely, so it's not hardcoded in your scripts. It's loaded as an environment variable when the server starts.

What are the options for the 'recency' parameter?

The 'recency' parameter allows you to filter search results by time period. The available options are 'day', 'week', 'month' (default), and 'year'.

How do I configure Claude Desktop to use this server?

Edit your Claude Desktop configuration file (claude_desktop_config.json) and add a configuration block specifying the command to run the server and the necessary environment variables.

What kind of information is returned by the search_web tool?

The search_web tool returns a comprehensive text response containing a detailed summary of the search results, key facts and information found, sources with URLs for verification, and any conflicting information if present.