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.1.1

Published

MCP server for Perplexity AI — web search with recency filtering, citations, and model control for Claude Desktop and Claude Code

Readme


What This Does

This MCP server connects AI assistants to Perplexity AI's search API. Ask questions in natural language and get grounded, cited answers from the live web — directly inside Claude or any MCP-compatible client.

One tool, full control: perplexity_search_web exposes the complete Perplexity API — recency filtering, model selection, temperature, top_k/top_p, citation/image toggles, and streaming.

Getting Started

1. Get a Perplexity API Key

Sign up at perplexity.ai and generate an API key from your account settings.

2. Install & Configure

Claude Code (Recommended)

claude mcp add perplexity -- npx -y @jschuller/perplexity-mcp

Then set your API key:

export PERPLEXITY_API_KEY=pplx-your-key-here

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": ["-y", "@jschuller/perplexity-mcp"],
      "env": {
        "PERPLEXITY_API_KEY": "pplx-your-key-here"
      }
    }
  }
}

Config location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

From Source

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

3. Verify

Ask Claude: "Search the web for the latest developments in quantum computing from the last week"

Tool Reference

perplexity_search_web

| Parameter | Type | Default | Description | |---|---|---|---| | query | string | (required) | Search query | | recency | day | week | month | year | month | Filter results by time period | | model | string | sonar | Perplexity model (model cards) | | temperature | number | — | Randomness (0 = deterministic, 2 = creative) | | max_tokens | integer | — | Maximum tokens to generate | | top_k | integer | — | Limit high-probability token pool (0 = disable) | | top_p | number | — | Nucleus sampling threshold | | frequency_penalty | number | — | Penalize repeated tokens | | presence_penalty | number | — | Encourage topic variety | | return_citations | boolean | true | Include source citations | | return_images | boolean | false | Include relevant images | | stream | boolean | false | Stream response incrementally |

Environment Variables

| Variable | Required | Default | Description | |---|---|---|---| | PERPLEXITY_API_KEY | Yes | — | Your Perplexity API key | | PERPLEXITY_MODEL | No | sonar | Default model for all queries |

Available Models

Security

  • API key stays in your local environment — never sent anywhere except the Perplexity API
  • The server communicates only with api.perplexity.ai over HTTPS
  • No data is stored or logged beyond the API request lifecycle
  • See SECURITY.md for vulnerability reporting

Troubleshooting

| Issue | Fix | |---|---| | PERPLEXITY_API_KEY is required | Set the env var in your MCP client config or shell | | 400 invalid_request_error | Update to v2.1.0+ (fixes JSON Schema validation with Claude Code) | | Server not found | Verify npx @jschuller/perplexity-mcp runs without error | | Connection timeout | Check internet connectivity and Perplexity API status |

Contributing

Contributions welcome — see CONTRIBUTING.md.

License

MIT