Skip to main content
Glama

Perplexity MCP Server

by PoliTwit1984

Perplexity MCP Server

A Model Context Protocol (MCP) server that provides intelligent code analysis and debugging capabilities using Perplexity AI's API. Works seamlessly with the Claude desktop client.

Features

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

Example Usage

Ask questions like:

  • "Fix this TypeError in my Python code"
  • "What's causing this error message?"
  • "How do I fix this code?"

Include your code snippet for targeted analysis:

def calculate_total(items): total = 0 for item in items: total = total + item['price'] # TypeError: string + int data = [ {'name': 'Book', 'price': '10'}, {'name': 'Pen', 'price': '2'} ] result = calculate_total(data)

The server will provide:

  1. Root cause analysis of the error
  2. Step-by-step solution with code examples
  3. Best practices to prevent similar issues
  4. Alternative implementation approaches

Installation

Prerequisites

  • Node.js 18 or higher
  • A Perplexity AI API key
# 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:
git clone https://github.com/yourusername/perplexity-server.git cd perplexity-server
  1. Install dependencies:
npm install
  1. Build and install globally:
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

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

Or if installed from source:

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

Security

  • The API key is stored securely in Claude's desktop configuration file
  • The key is passed to the server as an environment variable
  • No sensitive data is stored in the repository
  • The server expects the API key to be provided by Claude's environment

Development

Project Structure

perplexity-server/ ├── src/ │ └── index.ts # Main server implementation ├── package.json # Project configuration └── tsconfig.json # TypeScript configuration

Available Scripts

  • npm run build: Build the project
  • npm run watch: Watch for changes and rebuild automatically
  • npm run prepare: Prepare the package for publishing
  • npm run inspector: Run the MCP inspector for debugging

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Tools

Perplexity AI의 API를 통해 지능형 코드 분석 및 디버깅을 지원하고, Claude 데스크톱 클라이언트에 대한 통합 지원과 함께 자세한 오류 분석, 패턴 감지 및 포괄적인 솔루션을 제공합니다.

  1. 특징
    1. 사용 예
      1. 설치
        1. 필수 조건
        2. 옵션 1: npm에서 설치(권장)
        3. 옵션 2: 소스에서 설치
        4. Claude Desktop 구성
      2. 보안
        1. 개발
          1. 프로젝트 구조
          2. 사용 가능한 스크립트
          3. 기여하다
        2. 특허
          1. 감사의 말

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A server facilitating web search functionality by utilizing Perplexity AI's API, designed to integrate with the Claude desktop client for enhanced search queries.
              Last updated -
              1
              229
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              A comprehensive code analysis and management tool that integrates with Claude Desktop to analyze code at project and file levels, helping adapt changes to projects intelligently.
              Last updated -
              38
              MIT License
            • A
              security
              A
              license
              A
              quality
              A custom MCP tool that integrates Perplexity AI's API with Claude Desktop, allowing Claude to perform web-based research and provide answers with citations.
              Last updated -
              1
              4
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              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.
              Last updated -
              3
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/PoliTwit1984/mcp-perplexity-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server