Cover image
Try Now
2025-01-06

用于使用困惑AI的API进行智能代码分析和调试的模型上下文协议(MCP)服务器,与Claude Desktop Client无缝集成。

3 years

Works with Finder

1

Github Watches

3

Github Forks

10

Github Stars

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.

Perplexity Server MCP server

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

Option 1: Install from npm (Recommended)

# 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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://duotify.com
  • Professional code reviewer for a unique language, friendly and helpful.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    1 (1)
    Avatar
    user_GArrBBs6
    2025-04-15

    As a dedicated user of secops-mcp by SecurityForTech, I can confidently say this product is a game-changer for anyone in the cybersecurity field. The user interface is intuitive, making navigation a breeze. Additionally, the tool's comprehensive security features and seamless integration with other services have significantly enhanced our security posture. Highly recommend it to all security professionals!