# mcp-perplexity-server

> MCP Server

This repository hosts a Model Context Protocol (MCP) server that leverages Perplexity AI to offer intelligent code analysis and debugging, including error analysis, pattern detection, and comprehensive solutions for Python

## Overview

- **Category:** Developer Tools
- **Language:** JavaScript
- **Stars:** 13
- **Forks:** 2
- **Owner:** PoliTwit1984
- **GitHub:** https://github.com/PoliTwit1984/mcp-perplexity-server
- **Homepage:** https://github.com/PoliTwit1984/mcp-perplexity-server/blob/main/README.md
- **Created:** 2024-12-27T21:30:17+00:00
- **Updated:** 2025-02-26T03:52:39+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-perplexity-ai-code-analysis-server

## Setup

## Setup

### Prerequisites
- Node.js 18 or higher
- A Perplexity AI API key

### Option 1: Install from npm (Recommended)

```bash
# Using npm
npm install -g perplexity-mcp

# Or using the repository directly
npm install -g git+https://github.com/yourusername/perplexity-mcp.git
```

### Option 2: Install from Source

1. Clone the repository:
```bash
git clone https://github.com/yourusername/perplexity-server.git
cd perplexity-server
```

2. Install dependencies:
```bash
npm install
```

3. Build and install globally:
```bash
npm run build
npm install -g .
```

### Configure Claude Desktop

Add to your Claude desktop configuration file:

**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`

```json
{
  "mcpServers": {
    "perplexity": {
      "command": "perplexity-mcp",
      "args": [],
      "env": {
        "PERPLEXITY_API_KEY": "your-api-key-here"
      }
    }
  }
}
```

Or if installed from source:

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

## Tools

## Available Tools

1.  Intelligent Error Analysis (Detailed breakdown of coding errors with root cause analysis)
2.  Pattern Detection (Automatically recognizes common error patterns and provides targeted solutions)
3.  Comprehensive Solutions (Step-by-step fixes with multiple implementation alternatives)
4.  Best Practices (Includes coding standards and error prevention tips)
5.  Python Support (Specialized handling of Python type errors and common coding issues)
