Perplexity Code Analysis
STDIOMCP server providing intelligent code analysis and debugging using Perplexity AI's API.
MCP server providing intelligent code analysis and debugging using Perplexity AI's API.
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.
Ask questions like:
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:
# Using npm npm install -g perplexity-mcp # Or using the repository directly npm install -g git+https://github.com/yourusername/perplexity-mcp.git
git clone https://github.com/yourusername/perplexity-server.git cd perplexity-server
npm install
npm run build npm install -g .
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" } } } }
perplexity-server/
├── src/
│ └── index.ts # Main server implementation
├── package.json # Project configuration
└── tsconfig.json # TypeScript configuration
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 debugginggit checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.