Perplexity Advanced

Advanced MCP tool for Perplexity and OpenRouter API integration.
  • python

39

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "code-yeongyu-perplexity-advanced-mcp": {
      "command": "uvx",
      "args": [
        "perplexity-advanced-mcp",
        "-o",
        "<openrouter_api_key>"
      ],
      "env": {
        "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY",
        "PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
      }
    }
  }
}

Perplexity Advanced MCP is a versatile server that combines OpenRouter and Perplexity APIs to handle simple and complex queries with optional file context. It provides a CLI and an API client to enable efficient, reliable interactions with AI models, including robust retry logic and configurable logging for debugging and monitoring.

How to use

You run the MCP server using the UVX CLI and interact with it through an MCP client. The server supports running with either an OpenRouter API key or a Perplexity API key (but not both at the same time). Provide your chosen API key via a command-line option or environment variable, and start the server to process both quick, simple queries and deeper, context-rich requests that may include file attachments.

How to install

# Prerequisites: ensure you have Node.js and npm installed
# Install the UVX CLI (example flow; adapt to your environment)
npm install -g uvx

# Optional: install the MCP client via Smithery to get the Perplexity Advanced MCP CLI
npx -y @smithery/cli install @code-yeongyu/perplexity-advanced-mcp --client claude

# Start the MCP server using UVX with your preferred API key
# OpenRouter
uvx perplexity-advanced-mcp -o <openrouter_api_key>

# Or Perplexity
uvx perplexity-advanced-mcp -p <perplexity_api_key>

# Alternatively, configure API keys via environment variables and run
export OPENROUTER_API_KEY="your_key_here"
export PERPLEXITY_API_KEY="your_key_here"

uvx perplexity-advanced-mcp

Configuration options

Choose your API provider and enable the appropriate query type mappings. The server maps simple queries to lighter models for cost efficiency and complex queries to more capable models for deeper reasoning. If you want to include file content as context, prepare the files and attach them to your queries as needed.

Notes on usage

Only one API key provider can be active at a time. If both OPENROUTER_API_KEY and PERPLEXITY_API_KEY are supplied, you will encounter an error. CLI options take precedence when both CLI arguments and environment variables are provided.

Available tools

ask_perplexity

MCP search tool integrated to handle simple and complex queries, including processing file attachments to provide additional context.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational