npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jschuller/perplexity-mcp

v2.0.1

Published

Enhanced Perplexity MCP server with advanced Deep Research parameters for Claude Desktop and Roo Code

Readme

Perplexity MCP Server

An enhanced MCP server for Perplexity AI that allows Claude Desktop and other MCP clients to search the web using Perplexity's powerful API. This server implements the full range of Perplexity API parameters, providing fine-grained control over search behavior and response generation.

Features

  • Full Perplexity API support: All parameters from the Perplexity API are exposed
  • Recency filtering: Focus on results from the last day, week, month, or year
  • Advanced parameters: Control temperature, top_k, top_p, frequency penalties, and more
  • Citations and images: Option to include source citations and relevant images
  • Streaming support: Enable incremental response streaming
  • Model selection: Choose between different Perplexity models

Installation

You can install this MCP server directly via npm/npx or from source:

Option 1: Using npx (Recommended)

npx @jschuller/perplexity-mcp

Option 2: Global Installation

npm install -g @jschuller/perplexity-mcp

Option 3: From Source

git clone https://github.com/jschuller/perplexity-mcp.git
cd perplexity-mcp
npm install
npm run build

Configuration

Claude Desktop

Add this configuration to your Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "perplexity-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@jschuller/perplexity-mcp"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_perplexity_api_key_here",
        "PERPLEXITY_MODEL": "sonar-large-online"
      }
    }
  }
}

For macOS, the config file is located at:

~/Library/Application Support/Claude/claude_desktop_config.json

Usage

Once configured, the MCP server provides a perplexity_search_web tool with the following parameters:

Required Parameters

  • query (string): The search query

Optional Parameters

  • recency (string): Filter results by time period - 'day', 'week', 'month', 'year' (default: 'month')
  • model (string): The Perplexity model to use (default: 'sonar-large-online')
  • frequency_penalty (number): Penalty for token frequency to avoid repetition
  • presence_penalty (number): Penalty for token presence to encourage topic variety
  • max_tokens (integer): Maximum number of tokens to generate
  • temperature (number): Controls randomness (0 = deterministic, 2 = more random)
  • top_k (integer): Limits high-probability tokens to consider
  • top_p (number): Nucleus sampling threshold
  • return_citations (boolean): Include source citations (default: true)
  • return_images (boolean): Include relevant images (default: false)
  • stream (boolean): Enable streaming responses (default: false)

Environment Variables

  • PERPLEXITY_API_KEY (required): Your Perplexity API key
  • PERPLEXITY_MODEL (optional): Default model to use (default: 'sonar')

Example Usage

In Claude Desktop, you can use commands like:

Search the web for the latest developments in quantum computing from the last week

The MCP server will automatically use the appropriate parameters to focus on recent results.

Security Considerations

  • Your Perplexity API key is kept secure in your local environment
  • The MCP server only communicates with the official Perplexity API
  • No data is stored or logged beyond what's necessary for the API calls

Available Models

  • sonar: The standard Perplexity model (default)
  • sonar-pro: Enhanced model with better capabilities
  • Other models as listed at: https://docs.perplexity.ai/guides/model-cards

Troubleshooting

  1. API Key Issues: Ensure your PERPLEXITY_API_KEY is correctly set in the configuration
  2. Connection Errors: Check your internet connection and Perplexity API status
  3. MCP Server Not Found: Make sure the package is properly installed and the command path is correct

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues or questions, please file an issue on GitHub.