JP

jschuller/perplexity-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 3 forks 质量 81 趋势 34MIT

An enhanced MCP server for Perplexity AI that allows Claude Desktop and other MCP clients to search the web using Perplexity's powerful API.

概览

Search the web from Claude Desktop, Claude Code, or any MCP client using Perplexity AI — with fine-grained control over recency, citations, images, and model parameters. 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. perplexity_search_web exposes the complete Perplexity API — recency filtering, model selection, temperature, top_k/top_p, and citation/image toggles. Sign up at perplexity.ai and generate an API key from your account settings. Replace pplx-your-key-here with your key. -e saves it in Claude Code's user config file (~/.claude.json; local scope by default, see claude mcp add --help), so the server gets it however Claude Code is started. The key also lands in your shell history. Put the server name before -e, and keep the -- before npx. To keep the key out of the config instead, leave out -e ...

README

以下为原文 README 节选,完整内容请查看原文。

Perplexity MCP Server

Search the web from Claude Desktop, Claude Code, or any MCP client using Perplexity AI — with fine-grained control over recency, citations, images, and model parameters.


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, and citation/image toggles.

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 mcp add perplexity -e PERPLEXITY_API_KEY=pplx-your-key-here -- npx -y @jschuller/perplexity-mcp

Replace pplx-your-key-here with your key. -e saves it in plain text in Claude Code’s user config file (~/.claude.json; local scope by default, see claude mcp add --help), so the server gets it however Claude Code is started. The key also lands in your shell history. Put the server name before -e, and keep the -- before npx.

To keep the key out of the config instead, leave out -e ... and export the key in the shell you start claude from (export PERPLEXITY_API_KEY=...); a key exported in another shell does not reach the server.

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
在 GitHub 查看完整 README

安装

npx -y @jschuller/perplexity-mcp
新手?先看 mcpskill.org 教程 →

配置

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