Skip to main content
Glama
spences10

MCP Perplexity Search

by spences10

búsqueda de perplejidad mcp


⚠️ Aviso

Este repositorio ya no se mantiene.

La funcionalidad de esta herramienta ahora está disponible en mcp-omnisearch , que combina múltiples herramientas MCP en un paquete unificado.

Utilice mcp-omnisearch en su lugar.


Un servidor de Protocolo de Contexto de Modelo (MCP) para integrar la API de IA de Perplexity con LLM. Este servidor ofrece funciones avanzadas de finalización de chat con plantillas de mensajes especializados para diversos casos de uso.

Related MCP server: DocGen MCP Server

Características

  • 🤖 Finalización avanzada de chat usando los modelos de IA de Perplexity

  • 📝 Plantillas de indicaciones predefinidas para escenarios comunes:

    • Generación de documentación técnica

    • Análisis de las mejores prácticas de seguridad

    • Revisión y mejoras del código

    • Documentación de la API en formato estructurado

  • 🎯 Soporte de plantillas personalizadas para casos de uso especializados

  • 📊 Múltiples formatos de salida (texto, markdown, JSON)

  • 🔍 Inclusión opcional de URL de origen en las respuestas

  • ⚙️ Parámetros del modelo configurables (temperatura, tokens máximos)

  • 🚀 Soporte para varios modelos de Perplexity, incluidos Sonar y LLaMA

Configuración

Este servidor requiere configuración a través de su cliente MCP. A continuación, se muestran ejemplos para diferentes entornos:

Configuración de Cline

Agregue esto a su configuración de Cline MCP:

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

Escritorio Claude con configuración WSL

Para entornos WSL, agregue esto a su configuración de Claude Desktop:

{
	"mcpServers": {
		"mcp-perplexity-search": {
			"command": "wsl.exe",
			"args": [
				"bash",
				"-c",
				"source ~/.nvm/nvm.sh && PERPLEXITY_API_KEY=your-perplexity-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-perplexity-search"
			]
		}
	}
}

Variables de entorno

El servidor requiere la siguiente variable de entorno:

  • PERPLEXITY_API_KEY : Su clave API de Perplexity (obligatoria)

API

El servidor implementa una única herramienta MCP con parámetros configurables:

finalización del chat

Genere finalizaciones de chat utilizando la API de Perplexity con soporte para plantillas de indicaciones especializadas.

Parámetros:

  • messages (matriz, obligatorio): Matriz de objetos de mensaje con:

    • role (cadena): 'sistema', 'usuario' o 'asistente'

    • content (cadena): El contenido del mensaje

  • prompt_template (cadena, opcional): Plantilla predefinida para utilizar:

    • technical_docs : Documentación técnica con ejemplos de código

    • security_practices : Pautas de implementación de seguridad

    • code_review : Análisis y mejoras del código

    • api_docs : documentación de la API en formato JSON

  • custom_template (objeto, opcional): Plantilla de mensaje personalizada con:

    • system (cadena): Mensaje del sistema para el comportamiento del asistente

    • format (cadena): preferencia de formato de salida

    • include_sources (booleano): si se deben incluir fuentes

  • format (cadena, opcional): 'texto', 'markdown' o 'json' (predeterminado: 'texto')

  • include_sources (booleano, opcional): incluye URL de origen (valor predeterminado: falso)

  • model (cadena, opcional): modelo de perplejidad a utilizar (predeterminado: 'sonar')

  • temperature (número, opcional): Aleatoriedad de salida (0-1, predeterminado: 0,7)

  • max_tokens (número, opcional): longitud máxima de respuesta (predeterminado: 1024)

Desarrollo

Configuración

  1. Clonar el repositorio

  2. Instalar dependencias:

pnpm install
  1. Construir el proyecto:

pnpm build
  1. Ejecutar en modo de desarrollo:

pnpm dev

Publicación

El proyecto utiliza conjuntos de cambios para la gestión de versiones. Para publicar:

  1. Crear un conjunto de cambios:

pnpm changeset
  1. Versionar el paquete:

pnpm changeset version
  1. Publicar en npm:

pnpm release

Contribuyendo

¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios.

Licencia

Licencia MIT: consulte el archivo LICENCIA para obtener más detalles.

Expresiones de gratitud

Available Tools

1 tool
chat_completionC

Generate chat completions using the Perplexity API

ParametersJSON Schema
NameRequiredDescriptionDefault
messagesYes
prompt_templateNoPredefined prompt template to use for common use cases. Available templates: - technical_docs: Technical documentation with code examples and source references - security_practices: Security best practices and implementation guidelines with references - code_review: Code analysis focusing on best practices and improvements - api_docs: API documentation in structured JSON format with examples
custom_templateNoCustom prompt template. If provided, overrides prompt_template.
formatNoResponse format. Use json for structured data, markdown for formatted text with code blocks. Overrides template format if provided.text
include_sourcesNoInclude source URLs in the response. Overrides template setting if provided.
modelNoModel to use for completion. Note: llama-3.1 models will be deprecated after 2/22/2025sonar
temperatureNoControls randomness in the output. Higher values (e.g. 0.8) make the output more random, while lower values (e.g. 0.2) make it more focused and deterministic.
max_tokensNoThe maximum number of tokens to generate in the response. One token is roughly 4 characters for English text.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic function. It doesn't mention rate limits, authentication requirements, cost implications, error handling, or response characteristics. For a complex API tool with 8 parameters, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex chat completion tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what a 'chat completion' entails, typical use cases, or what the response looks like. The agent must rely entirely on the schema for operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 88% schema description coverage, the schema already documents most parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema, so it meets the baseline for high coverage but doesn't provide additional semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('generate chat completions') and target ('using the Perplexity API'), providing a specific verb+resource combination. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or typical use cases. It simply states what the tool does without context about appropriate scenarios or limitations.

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. 1 tool updatev1.0.0
    • First observedchat_completion

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool's purpose is clearly defined as generating chat completions using the Perplexity API, leaving no room for misselection.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'chat_completion' follows a clear verb_noun pattern, and there are no other tools to compare or create inconsistencies with.

Tool Count2/5

A single tool is generally too few for a server's purpose, as it limits functionality and may indicate an incomplete or overly narrow scope. While it could be appropriate for a very simple service, it often feels thin and lacks the breadth needed for typical agent workflows.

Completeness3/5

The tool provides a core function for chat completions, but with only one tool, the surface is notably incomplete. There are obvious gaps, such as missing operations for managing conversations, handling different models, or supporting related search functionalities, which could hinder agent performance in broader tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to generate professional documentation using structured templates based on the POWER framework. Provides access to standardized templates for README, architecture, API, components, and schema documentation.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides LLMs with up-to-date, version-specific documentation and code examples from library sources directly into prompts, eliminating outdated code generation and hallucinated APIs.
    454,123 npm
    MIT