mcp-perplexity-server
10
A Model Context Protocol (MCP) server for intelligent code analysis and debugging using Perplexity AI’s API, seamlessly integrated with the Claude desktop client.
Perplexity MCP Server
A Model Context Protocol (MCP) server that provides intelligent code analysis and debugging capabilities using Perplexity AI's API.
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?"
The server will provide:
- Root cause analysis of the error
- Step-by-step solution with code examples
- Best practices to prevent similar issues
- Alternative implementation approaches
Installation
Prerequisites
- Node.js 18 or higher
- A Perplexity AI API key
Option 1: Install from npm (Recommended)
- Using npm
- Or using the repository directly
Option 2: Install from Source
- Clone the repository
- Install dependencies
- Build and install globally
Configure Claude Desktop
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
Available Scripts
npm run build
: Build the projectnpm run watch
: Watch for changes and rebuild automaticallynpm run prepare
: Prepare the package for publishingnpm run inspector
: Run the MCP inspector for debugging
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
License
This project is licensed under the MIT License.