Perplexity MCP Server
This MCP server exposes a single search tool for getting Perplexity-backed coding/debugging help from an MCP client like Claude Desktop.
Send an error message or coding question (
query, required) to Perplexity.Include an optional code snippet (
code) and optional language (language, defaultauto) for analysis.Receive structured answers covering root cause, step-by-step fix, prevention best practices, and before/after/alternative code examples.
Get a built-in prewritten Python string-plus-integer
TypeErroranswer for certain price/string-number patterns without calling Perplexity.Note: as shipped, live Perplexity answers will not work because it requests a discontinued model; it also requires
PERPLEXITY_API_KEY.
Requires Node.js 18 or higher as a runtime environment for the MCP server.
Leverages Perplexity AI's API to provide intelligent code analysis, error debugging, and solution recommendations for programming issues, with specialized support for Python.
Offers specialized error analysis and debugging for Python code, including type error detection, pattern recognition, and best practice recommendations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Perplexity MCP Server Fix this TypeError in my Python code: 'int' object is not iterable"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
search
Argument | Required | Description |
| yes | The error message or coding question |
| no | A code snippet to analyze |
| no | Language of the snippet, default |
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 buildConfigure 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 toolsearchB
Search Perplexity for coding help
Inputs: query (required), code, language.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no risk of confusion between tools.
With a single tool named 'search', the naming is consistent and follows a verb_noun pattern.
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.
The tool covers the primary search function, but lacks additional features like filtering or retrieving different result types, leaving minor gaps.
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Watches your live app, explains every problem in plain language and writes the fix prompt.
Add any agent you deploy on ibl.ai to Claude Code, Cursor or Claude Desktop and talk to it there.
Related MCP Servers
- AlicenseBqualityDmaintenanceA 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.45MIT
- FlicenseAqualityDmaintenanceIntegrates 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.32-
- AlicenseCqualityDmaintenanceEnables AI-powered automated testing, security scanning, code review, and maintenance tasks directly within Claude Code or desktop.1245 PyPI4MIT
- AlicenseAqualityDmaintenanceEnables 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.7125 npm4MIT