Perplexity MCP Server
Servidor MCP de Perplexity
Un servidor de Protocolo de Contexto de Modelo (MCP) que proporciona análisis inteligente de código y depuración mediante la API de Perplexity AI. Funciona a la perfección con el cliente de escritorio Claude.
Características
Análisis inteligente de errores : desglose detallado de errores de codificación con análisis de causa raíz
Detección de patrones : reconoce automáticamente patrones de error comunes y proporciona soluciones específicas
Soluciones integrales : soluciones paso a paso con múltiples alternativas de implementación
Mejores prácticas : incluye estándares de codificación y consejos para prevenir errores.
Compatibilidad con Python : manejo especializado de errores de tipo de Python y problemas de codificación comunes
Related MCP server: Perplexity MCP Server
Ejemplo de uso
Haga preguntas como:
"Corregir este TypeError en mi código Python"
"¿Qué está causando este mensaje de error?"
"¿Cómo puedo solucionar este código?"
Incluya su fragmento de código para un análisis específico:
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)El servidor proporcionará:
Análisis de la causa raíz del error
Solución paso a paso con ejemplos de código
Mejores prácticas para prevenir problemas similares
Enfoques de implementación alternativos
Instalación
Prerrequisitos
Node.js 18 o superior
Una clave API de Perplexity AI
Opción 1: Instalar desde npm (recomendado)
# Using npm
npm install -g perplexity-mcp
# Or using the repository directly
npm install -g git+https://github.com/yourusername/perplexity-mcp.gitOpción 2: Instalar desde la fuente
Clonar el repositorio:
git clone https://github.com/yourusername/perplexity-server.git
cd perplexity-serverInstalar dependencias:
npm installConstruir e instalar globalmente:
npm run build
npm install -g .Configurar Claude Desktop
Añade a tu archivo de configuración de escritorio de Claude:
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"
}
}
}
}O si se instala desde la fuente:
{
"mcpServers": {
"perplexity": {
"command": "node",
"args": ["/absolute/path/to/perplexity-server/build/index.js"],
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}
}Seguridad
La clave API se almacena de forma segura en el archivo de configuración del escritorio de Claude
La clave se pasa al servidor como una variable de entorno.
No se almacenan datos confidenciales en el repositorio
El servidor espera que la clave API la proporcione el entorno de Claude
Desarrollo
Estructura del proyecto
perplexity-server/
├── src/
│ └── index.ts # Main server implementation
├── package.json # Project configuration
└── tsconfig.json # TypeScript configurationScripts disponibles
npm run build: Construye el proyectonpm run watch: vigila los cambios y reconstruye automáticamentenpm run prepare: prepara el paquete para su publicaciónnpm run inspector: ejecuta el inspector MCP para depurar
Contribuyendo
Bifurcar el repositorio
Crea tu rama de funciones (
git checkout -b feature/amazing-feature)Confirme sus cambios (
git commit -m 'Add some amazing feature')Empujar a la rama (
git push origin feature/amazing-feature)Abrir una solicitud de extracción
Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
Expresiones de gratitud
Gracias a Perplexity AI por su potente API
Construido con el Protocolo de Contexto de Modelo
Available Tools
1 toolsearchB
Search Perplexity for coding help
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The error or coding question to analyze | |
| code | No | Code snippet to analyze (optional) | |
| language | No | Programming language of the code snippet (optional) | auto |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full responsibility. It merely states the tool's purpose without disclosing behavioral traits like external dependencies, rate limits, or result format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that efficiently conveys the tool's purpose with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite a simple schema, the description fails to explain output format or side effects. For a search tool, this is incomplete; agents need to know what the results look like.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The tool description adds no additional meaning beyond the schema, which is minimally adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Search Perplexity for coding help' clearly states the verb (search), resource (Perplexity), and domain (coding help). With no sibling tools, differentiation is not required.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor any exclusions or context. The description only implies it is for coding help but does not elaborate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
search
TDQS
Scored across 1 tool
Only one tool exists, so there is no risk of confusion between tools.
With a single tool named 'search', the naming is consistent and follows a verb_noun pattern.
A single tool is borderline for a server named 'Perplexity MCP Server', as it may imply broader capabilities, but it is reasonable for a focused search helper.
The tool covers the primary search function, but lacks additional features like filtering or retrieving different result types, leaving minor gaps.
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
The bug mediator for AI-built apps: plain-English diagnosis + a ready fix, in your editor.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Related MCP Servers
- AlicenseBqualityDmaintenanceA 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.45MIT
- FlicenseAqualityDmaintenanceIntegrates Perplexity AI's search-enhanced language models with Claude Desktop, providing three tools with different complexity levels for quick fact-checking, technical analysis, and deep research.32-
- AlicenseCqualityCmaintenanceEnables AI-powered automated testing, security scanning, code review, and maintenance tasks directly within Claude Code or desktop.124MIT
- AlicenseAqualityCmaintenanceEnables real-time code analysis for JavaScript, TypeScript, and Python through Claude Desktop and other MCP clients, detecting bugs, code smells, and security vulnerabilities with automated quick fixes.7192 npm4MIT