Skip to main content
Glama

Perplexity MCP Server

Perplexity-backed code analysis and debugging, straight from your Claude conversation.

A small Model Context Protocol server that gives Claude Desktop (or any MCP client) one tool: send an error or coding question, plus optional code, to the Perplexity API and get back a structured answer.

Status

Last updated May 2026. Checked in November 2026: npm ci and npm run build succeed and the server starts and lists its tool. Live answers from Perplexity will not work as shipped. The code asks for the model llama-3.1-sonar-huge-128k-online, which Perplexity's changelog says stopped being available on February 22, 2025. Perplexity now offers the Sonar models instead.

Related MCP server: Perplexity MCP Server

Tool

Argument

Required

Description

query

yes

The error message or coding question

code

no

A code snippet to analyze

language

no

Language of the snippet, default auto

The answer comes back in four sections: root cause analysis, step-by-step solution, best practices for prevention, and code examples (before, after, alternatives).

One built-in shortcut: if the code contains item['price'], or adds a quoted value to a number, the server returns a prewritten answer about a Python string-plus-integer TypeError without calling Perplexity, whatever the question was.

Install

There is no npm package. Build from source with Node 18 or newer:

git clone https://github.com/joewilsonai/mcp-perplexity-server
cd mcp-perplexity-server
npm ci
npm run build

Configure Claude Desktop

Add this to claude_desktop_config.json, with the absolute path to your clone and your own key:

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-perplexity-server/build/index.js"],
      "env": {
        "PERPLEXITY_API_KEY": "<your-perplexity-api-key>"
      }
    }
  }
}

The key is read from the PERPLEXITY_API_KEY environment variable only; the server will not start without it. Get a key from your Perplexity API settings.

Built with

TypeScript, @modelcontextprotocol/sdk 0.6.0 and axios.

License

MIT. See LICENSE.

Available Tools

1 tool

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no risk of confusion between tools.

    Naming Consistency5/5

    With a single tool named 'search', the naming is consistent and follows a verb_noun pattern.

    Tool Count3/5

    A single tool is borderline for a server named 'Perplexity MCP Server', as it may imply broader capabilities, but it is reasonable for a focused search helper.

    Completeness3/5

    The tool covers the primary search function, but lacks additional features like filtering or retrieving different result types, leaving minor gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A powerful research assistant that integrates with Cline and Claude Desktop to leverage Perplexity AI for intelligent search, documentation retrieval, API discovery, and code modernization assistance while coding.
      4
      5
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Integrates Perplexity AI's search-enhanced language models with Claude Desktop, providing three tools with different complexity levels for quick fact-checking, technical analysis, and deep research.
      3
      2
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables real-time code analysis for JavaScript, TypeScript, and Python through Claude Desktop and other MCP clients, detecting bugs, code smells, and security vulnerabilities with automated quick fixes.
      7
      125 npm
      4
      MIT