Perplexity Search MCP
Enables AI-powered search capabilities through Perplexity AI's continuously refreshed index. Supports web, academic, and SEC search modes with advanced filtering options including geographic location and customizable result limits.
README
Perplexity Search MCP
This is a tool based on the Model Context Protocol (MCP) that wraps the search functionality of Perplexity AI into a standardized tool that can be called via MCP.
This project is built with TypeScript and runs on the Bun runtime.
✨ Features
- Provides the
perplexity-searchtool via MCP. - Supports various parameters for Perplexity search, such as:
query: A single or multiple search queries.max_results: Specifies the maximum number of results to return.country: Filters search results by geographic location.search_mode: Supportsweb,academic, andsecsearch modes.
- Communicates with the host environment via standard input/output (Stdio).
🚀 Getting Started
1. Prerequisites
- Ensure you have Bun installed.
- You will need an API key from Perplexity AI.
2. Installation
After cloning the project, run the following command in the root directory to install the required dependencies:
bun install
3. Configuration
This server requires the PERPLEXITY_API_KEY environment variable to be set.
4. Running the Server (Development)
To run the server directly from the TypeScript source for development, execute the following command:
bun run index.ts
The server will start and listen for MCP messages on standard I/O.
5. Building the Project
You can also build the project into a single, optimized JavaScript file.
bun run build
This command compiles index.ts and places the output in dist/perplexity-search-mcp.js.
After building, you can run the compiled file directly:
bun dist/perplexity-search-mcp.js
or
node dist/perplexity-search-mcp.js
🛠️ Tool Definition
perplexity-search
Description: Get ranked search results from Perplexity’s continuously refreshed index with advanced filtering and customization options.
Input Parameters:
| Parameter | Type | Description | Default |
|---|---|---|---|
query |
string or string[] |
The search query or queries to execute. | Required |
max_results |
number |
The maximum number of search results to return (max 20). | 10 |
country |
string |
Country code to filter results by geographic location (e.g., 'US', 'GB', 'DE'). | Optional |
max_tokens_per_page |
number |
Controls the maximum number of tokens retrieved from each webpage. Higher values provide more comprehensive content but may increase processing time. | 2048 |
search_mode |
string |
The search mode. Can be web, academic, or sec. |
web |
Output:
The tool returns a JSON string containing an array of search results from the Perplexity API.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.