MCP ExplorerExplorer

Mcp Server Perplexity

@mkusakaon 10 months ago
1 MIT
FreeCommunity
AI Systems
The Perplexity AI MCP Server integrates Perplexity AI's API, offering advanced search capabilities with multiple model options. Features include support for official Sonar models, configurable result counts, and detailed error handling. It is also compatible with MCP Inspector, making it an efficient tool for intelligent searches.

Overview

What is Mcp Server Perplexity

mcp-server-perplexity is an MCP server implementation that integrates Perplexity AI’s API, offering advanced search capabilities with various model options for enhanced query processing.

Use cases

Use cases include implementing intelligent search features in applications, enhancing user query experiences, conducting research with AI-assisted insights, and integrating with other software systems for improved data retrieval.

How to use

To use mcp-server-perplexity, install the dependencies with ‘pnpm install’, build the project using ‘pnpm build’, and execute the server with ‘node dist/index.js’. You can also run it in development mode with ‘pnpm dev’.

Key features

Key features include the ability to search using Perplexity AI’s models, support for all official Sonar models, configurable result counts, detailed error handling and logging, and compatibility with MCP Inspector.

Where to use

mcp-server-perplexity can be used in various fields such as data analysis, research, customer support, and any application requiring advanced search functionalities.

Content

Perplexity AI MCP Server

An MCP server implementation that integrates Perplexity AI’s API, providing advanced search capabilities with multiple model options.

Features

  • Search using Perplexity AI’s models
  • Support for all official Sonar models
  • Configurable result count
  • Detailed error handling and logging
  • MCP Inspector compatible

Available Models

  • sonar-reasoning-pro (127k context)
  • sonar-reasoning (127k context)
  • sonar-pro (200k context)
  • sonar (127k context)

Installation

pnpm install
pnpm build

Configuration

API Key

  1. Sign up for a Perplexity AI account
  2. Get your API key from the dashboard
  3. Set the environment variable:
export PERPLEXITY_API_KEY=your_api_key_here

Usage

Direct Execution

node dist/index.js
# or if you made it executable
./dist/index.js

Development

pnpm dev

Testing with MCP Inspector

pnpm inspect

Tool Reference

perplexity_search

Performs a search using Perplexity AI’s models.

Parameters:

  • query (string, required): The search query
  • model (string, optional): Model to use (default: “sonar”)
    • Available options: sonar-reasoning-pro, sonar-reasoning, sonar-pro, sonar
  • count (number, optional): Number of results (1-10, default: 5)

Development

Project Structure

src/perplexity/
├── index.ts        # Main server implementation
├── lib/
│   └── logger.ts   # Logging configuration
└── adr.md         # Architectural decisions

Logging

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

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers