mcp-perplexity-search logo

MCP Perplexity Search

by spences10

2 forks
6 stars
Free

mcp-perplexity-search is a Model Context Protocol (MCP) server developed by spences10. It serves as a bridge to integrate Perplexity's AI API with large language models (LLMs), providing advanced chat completion functionalities. The server is designed to enhance AI interactions by supporting specialized prompt templates tailored for a variety of applications. Whether you are generating technical documentation, analyzing security best practices, reviewing code, or creating structured API documentation, mcp-perplexity-search offers a robust solution for developers and AI enthusiasts.

To use mcp-perplexity-search, you need to configure it through your MCP client, which involves setting up the appropriate environment variables and command-line settings specific to your development environment.

Configuration Steps:

  1. Cline Configuration:

    • Add to your Cline MCP settings a JSON configuration that specifies the command and environment variables, including your Perplexity API key.
  2. Claude Desktop with WSL Configuration:

    • For Windows Subsystem for Linux (WSL) users, modify your Claude Desktop configuration to include a bash command that sets up the necessary environment.
  3. Environment Variables:

    • Ensure your configuration includes the PERPLEXITY_API_KEY, which is essential to access Perplexity's API.

Once set up, you can leverage the server's chat_completion API to generate responses. This involves sending an array of message objects, selecting prompt templates, and choosing output formats. You can also configure model parameters like temperature and max tokens to fine-tune the AI responses.

  • Advanced Chat Completion: Utilize Perplexity's AI models for sophisticated conversation generation.

  • Predefined Prompt Templates: Choose from templates designed for:

    • Technical Documentation
    • Security Best Practices
    • Code Review and Improvements
    • API Documentation in JSON Format
  • Custom Template Support: Create specialized prompts for unique use cases, allowing you to tailor the AI's behavior and output format.

  • Multiple Output Formats: Responses can be formatted as text, markdown, or JSON, giving you flexibility in how you handle generated content.

  • Source URL Inclusion: Optionally include source URLs in responses, adding context and credibility to the generated content.

  • Configurable Model Parameters: Adjust settings like temperature and max tokens to control the creativity and length of responses.

  • Support for Perplexity Models: Compatible with various models, including Sonar and LLaMA, offering a broad range of capabilities.

mcp-perplexity-search is an excellent tool for anyone looking to integrate advanced AI capabilities into their workflows, providing a versatile and powerful platform to enhance AI-driven interactions.

How to Use

To use the mcp-perplexity-search, follow these steps:

  1. Visit https://github.com/spence...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using mcp-perplexity-search capabilities within your Claude conversations

Additional Information

Created

January 22, 2025

Company

spences10

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More