Perplexity AI MCP Server logo

Perplexity AI MCP Server

by MCP-Mirror

An MCP server implementation that integrates Perplexity AI's API, providing advanced search capabilities with multiple model options. It supports various Perplexity AI models and offers configurable result counts.

View on GitHub

Last updated: N/A

What is Perplexity AI MCP Server?

This is an MCP (Modular Component Platform) server that leverages the Perplexity AI API to provide advanced search functionalities. It allows users to perform searches using different Perplexity AI models and customize the number of results returned.

How to use Perplexity AI MCP Server?

  1. Install the server using pnpm install and build it with pnpm build. 2. Obtain a Perplexity AI API key and set it as an environment variable (PERPLEXITY_API_KEY). 3. Run the server using node dist/index.js or ./dist/index.js. 4. You can also use pnpm dev for development and pnpm inspect for testing with MCP Inspector.

Key features of Perplexity AI MCP Server

  • Search using Perplexity AI's models

  • Support for all official Sonar models

  • Configurable result count

  • Detailed error handling and logging

  • MCP Inspector compatible

Use cases of Perplexity AI MCP Server

  • Integrating advanced search capabilities into applications

  • Performing AI-powered searches with specific models

  • Building custom search tools with configurable result counts

  • Utilizing the server within an MCP environment

FAQ from Perplexity AI MCP Server

What models are supported?

The server supports sonar-reasoning-pro, sonar-reasoning, sonar-pro, and sonar.

How do I configure the API key?

You need to sign up for a Perplexity AI account, get your API key from the dashboard, and set it as an environment variable: export PERPLEXITY_API_KEY=your_api_key_here.

How do I specify the model to use in a search?

Use the 'model' parameter in the perplexity_search tool. Available options are sonar-reasoning-pro, sonar-reasoning, sonar-pro, and sonar. The default model is 'sonar'.

How do I specify the number of results?

Use the 'count' parameter in the perplexity_search tool. The value should be between 1 and 10. The default is 5.

Where are the logs stored?

Logs are written to perplexity-mcp.log in the project root directory.