Perplexity MCP Server logo

Perplexity MCP Server

by cyanheads

An MCP server providing tools to interact with the Perplexity AI API, built using the mcp-ts-template. This server allows AI agents compatible with the Model Context Protocol (MCP) to leverage Perplexity's search-augmented query capabilities.

View on GitHub

Last updated: N/A

What is Perplexity MCP Server?

This is an MCP server that provides a tool for AI agents to interact with the Perplexity AI API. It enables search-augmented queries through the Model Context Protocol (MCP).

How to use Perplexity MCP Server?

To use this server, you need to clone the repository, install dependencies, build the project, configure the environment variables (including the Perplexity API key), and add the server to your MCP client settings. Detailed installation and configuration instructions are provided in the README.

Key features of Perplexity MCP Server

  • Reusable utilities for logging, error handling, ID generation, rate limiting, and request context management.

  • Type safety with TypeScript.

  • Robust error handling system.

  • Basic security features like input sanitization.

  • A ready-to-use tool for interacting with the Perplexity Search API (perplexity_search).

Use cases of Perplexity MCP Server

  • Enabling AI agents to perform web searches and synthesize answers.

  • Integrating Perplexity's search capabilities into MCP-compatible applications.

  • Building reasoning models that can show their internal reasoning process.

  • Creating AI workflows that require access to up-to-date information.

FAQ from Perplexity MCP Server

What is Model Context Protocol (MCP)?

MCP is a framework that enables AI systems to interact with external tools and resources.

What is the perplexity_search tool?

The perplexity_search tool performs search-augmented queries using the Perplexity API.

What environment variables are required?

The required environment variables include PERPLEXITY_API_KEY, PERPLEXITY_DEFAULT_MODEL, PERPLEXITY_DEFAULT_SEARCH_CONTEXT, LOG_LEVEL, and NODE_ENV.

How do I install the server?

Clone the repository, install dependencies using npm install, and build the project using npm run build.

How do I configure the server?

Set the required environment variables and add the server to your MCP client settings.