Integrates with the Perplexity API to provide web search functionality, enabling real-time information retrieval with ti...
Created byApr 23, 2025
Perplexity Web Search MCP Server
A simple MCP (Model Context Protocol) server that provides web search functionality using the Perplexity API. This server allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information.
Features
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
You can set the `PERPLEXITY_API_KEY` environment variable with your Perplexity API key:
Alternatively, you can create a `.env` file in the project root with the following content:
A sample `.env.example` file is provided for reference.
To get a Perplexity API key:
Visit [Perplexity API Settings](https://www.perplexity.ai/settings/api)
Create an account if you don't have one
Generate an API key
Usage
Running the server
Testing the server
You can test the server functionality without running the full MCP server using the included test script:
Options for `--recency` are: day, week, month (default), year
Using with Claude Desktop
Edit your Claude Desktop configuration file:
- On macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`