Skip to main content
Glama
wysh3

Perplexity MCP Server

by wysh3

Perplejidad MCP Zerver 📋

Una implementación de servidor de Protocolo de Contexto de Modelo (MCP) de nivel de investigación que proporciona capacidades de investigación impulsadas por IA al interactuar con el sitio web de Perplexity sin necesidad de una clave API.

Características

  • 🔍 Integración de búsqueda web a través de la interfaz web de Perplexity.

  • 💬 Historial de chat persistente para contexto conversacional.

  • 📄 Herramientas para la recuperación de documentación, búsqueda de API y análisis de código.

  • 🚫 No se requiere clave API (depende de la interacción web).

  • Implementación basada en TypeScript primero.

  • 🌐 Utiliza Puppeteer para la automatización del navegador.

Related MCP server: Perplexity AI MCP Server

Herramientas

1. Buscar ( search )

Realiza una consulta de búsqueda en Perplexity.ai. Admite respuestas brief , normal o detailed . Devuelve texto sin formato.

2. Obtener documentación ( get_documentation )

Solicita a Perplexity que proporcione documentación y ejemplos para una tecnología o biblioteca, centrándose opcionalmente en un contexto específico. Devuelve texto sin formato.

3. Buscar API ( find_apis )

Solicita a Perplexity que encuentre y evalúe las API según los requisitos y el contexto. Devuelve texto sin formato.

4. Verificar código obsoleto ( check_deprecated_code )

Solicita a Perplexity que analice un fragmento de código en busca de funciones obsoletas en un contexto tecnológico específico. Devuelve texto sin formato.

5. Extraer el contenido de la URL ( extract_url_content )

Extrae el texto principal del artículo de las URL mediante la automatización del navegador y la legibilidad de Mozilla. Gestiona repositorios de GitHub a través de gitingest.com. Admite la exploración recursiva de enlaces a gran profundidad. Devuelve JSON estructurado con contenido y metadatos.

6. Chat ( chat_perplexity )

Mantiene conversaciones en curso con Perplexity AI. Almacena el historial de chat localmente en chat_history.db , dentro del directorio del proyecto. Devuelve un objeto JSON en formato de cadena que contiene chat_id y response .

Instalación

Simplemente copie 📋 y pegue el archivo README y deje que la IA se encargue del resto.

  1. Clonar o descargar este repositorio:

git clone https://github.com/wysh3/perplexity-mcp-zerver.git
cd perplexity-mcp-zerver
  1. Instalar dependencias:

npm install
  1. Construir el servidor:

npm run build

Importante : Asegúrate de tener instalado Node.js. Puppeteer descargará una versión compatible del navegador si es necesario durante la instalación. Reinicia tu IDE/aplicación después de compilar y configurar el proyecto para que los cambios surtan efecto.

Configuración

Agregue el servidor a su archivo de configuración de MCP (por ejemplo, cline_mcp_settings.json para la extensión VS Code o claude_desktop_config.json para la aplicación de escritorio).

Importante: reemplace /path/to/perplexity-mcp-zerver/build/index.js con la ruta absoluta al archivo index.js creado en su sistema.

Ejemplo para la extensión Cline/RooCode:

{
  "mcpServers": {
    "perplexity-server": {
      "command": "node",
      "args": [
        "/full/path/to/your/perplexity-mcp-zerver/build/index.js" // <-- Replace this path! (in case of windows for ex: "C:\\Users\\$USER\\Documents\\Cline\\MCP\\perplexity-mcp-zerver\\build\\index.js"
      ],
      "env": {},
      "disabled": false,
      "alwaysAllow": [],
      "autoApprove": [],
      "timeout": 300
    }
  }
}

Ejemplo para Claude Desktop:

{
  "mcpServers": {
    "perplexity-server": {
      "command": "node",
      "args": [
        "/full/path/to/your/perplexity-mcp-zerver/build/index.js" // <-- Replace this path!
      ],
      "env": {},
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Uso

  1. Asegúrese de que el servidor esté configurado correctamente en su archivo de configuración de MCP.

  2. Reinicie su IDE (como VS Code con la extensión Cline/RooCode) o la aplicación Claude Desktop.

  3. El cliente MCP debería conectarse automáticamente al servidor.

  4. Ahora puedes pedirle al asistente de IA conectado (como Claude) que use las herramientas, por ejemplo:

    • Utilice la búsqueda en el servidor de perplejidad para encontrar las últimas noticias sobre IA.

    • "Pregunte a perplexity-server get_documentation sobre los ganchos de React".

    • "Inicie un chat con perplexity-server sobre computación cuántica".

Créditos

Gracias DaInfernalCoder:

Licencia

Este proyecto está licenciado bajo la Licencia Pública General GNU v3.0 - consulte el archivo LICENSE.md para obtener más detalles.

Descargo de responsabilidad

Este proyecto interactúa con el sitio web de Perplexity mediante automatización web (Puppeteer). Su propósito es exclusivamente educativo y de investigación. El web scraping y la automatización podrían contravenir las condiciones de servicio del sitio web de destino. El autor no respalda ni fomenta ninguna automatización no autorizada ni la violación de las condiciones de servicio. Úselo de forma responsable y ética. La estabilidad de este servidor depende de la consistencia de la estructura del sitio web de Perplexity.

Available Tools

6 tools
chat_perplexityB

Automatically call this tool for interactive, conversational queries. This tool leverages Perplexitys web search capabilities to provide real-time information and maintains conversation history using an optional chat ID for contextual follow-ups.

ParametersJSON Schema
NameRequiredDescriptionDefault
chat_idNoOptional: ID of an existing chat to continue. If not provided, a new chat will be created.
messageYesThe message to send to Perplexity AI for web search

Output Schema

ParametersJSON Schema
NameRequiredDescription
chat_idNoID of the chat session (new or existing)
responseNoPerplexity AI response to the message

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'real-time information' and 'maintains conversation history,' but lacks details on behavioral traits like rate limits, authentication needs, error handling, or what 'interactive' entails. This is insufficient for a tool with web search and chat capabilities.

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

Conciseness4/5

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

The description is concise and front-loaded, with two sentences that efficiently convey the main purpose and key features. There's no wasted text, though it could be slightly more structured for clarity.

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

Completeness3/5

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

Given the tool's complexity (web search with chat history), no annotations, and an output schema (which handles return values), the description is moderately complete. It covers the core functionality but misses important behavioral aspects like limitations or prerequisites, making it adequate but with gaps.

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?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions or usage nuances), meeting the baseline for high coverage.

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 tool's purpose: 'call this tool for interactive, conversational queries' and 'leverages Perplexity's web search capabilities to provide real-time information.' It specifies the verb (call for queries) and resource (Perplexity's web search), though it doesn't explicitly distinguish from sibling tools like 'search' or 'extract_url_content'.

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

Usage Guidelines3/5

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

The description provides some usage context: 'for interactive, conversational queries' and 'maintains conversation history,' which implies when to use it (for chat-like interactions). However, it doesn't explicitly state when not to use it or mention alternatives among sibling tools, leaving gaps in guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_deprecated_codeA

Automatically call this tool when reviewing legacy code, planning upgrades, or encountering warnings with real time web access. Helps identify technical debt. Example: During code reviews or before upgrading dependencies.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet or dependency to check
technologyNoThe technology or framework context (e.g., "React", "Node.js")

Output Schema

ParametersJSON Schema
NameRequiredDescription
responseNoThe raw text response from Perplexity analyzing the code for deprecated features.

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'real time web access,' hinting at external data fetching, but doesn't disclose key behavioral traits such as whether it's read-only, if it makes network calls, potential rate limits, or what the output looks like. This is inadequate for a tool that likely interacts with external sources.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that directly address usage and purpose. It's front-loaded with key scenarios, though the second sentence could be more tightly integrated to avoid slight redundancy in examples.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, 100% schema coverage, and an output schema exists), the description is reasonably complete. It covers usage contexts well, and since an output schema is present, it doesn't need to explain return values, though it could benefit from more behavioral 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?

Schema description coverage is 100%, so the schema already documents both parameters ('code' and 'technology') with descriptions and examples. The description doesn't add any meaning beyond what the schema provides, such as explaining how parameters interact or their impact on results, meeting the baseline for high schema coverage.

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 tool's purpose: 'Helps identify technical debt' through checking deprecated code. It specifies the action ('identify') and resource ('technical debt'), though it doesn't explicitly differentiate from sibling tools like 'find_apis' or 'get_documentation' which might also relate to code analysis.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'when reviewing legacy code, planning upgrades, or encountering warnings with real time web access.' It includes specific scenarios like 'During code reviews or before upgrading dependencies,' which clearly defines the context without mentioning alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

extract_url_contentA

Uses browser automation (Puppeteer) and Mozilla's Readability library to extract the main article text content from a given URL. Handles dynamic JavaScript rendering and includes fallback logic. For GitHub repository URLs, it attempts to fetch structured content via gitingest.com. Performs a pre-check for non-HTML content types and checks HTTP status after navigation. Ideal for getting clean text from articles/blog posts. Note: May struggle to isolate only core content on complex homepages or dashboards, potentially including UI elements.

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNoOptional: Maximum depth for recursive link exploration (1-5). Default is 1 (no recursion).
urlYesThe URL of the website to extract content from.

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusNoIndicates the outcome of the extraction attempt.
contentNoArray containing results for each explored page.
messageNoError message or context for "SuccessWithPartial" status.
rootUrlNoThe initial URL provided for exploration.
pagesExploredNoThe number of pages successfully fetched during exploration.
explorationDepthNoThe maximum depth requested for exploration.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so effectively. It discloses key behavioral traits: uses browser automation and Readability library, handles JavaScript rendering, includes fallback logic, special handling for GitHub URLs, performs pre-checks for content types and HTTP status, and notes limitations with complex pages. This covers technical implementation, error handling, and edge cases.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose in the first sentence. Each subsequent sentence adds valuable information (technologies, special cases, checks, ideal use, limitations). There is minimal waste, though it could be slightly more streamlined.

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

Completeness5/5

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

Given the tool's complexity (dynamic content extraction, fallback logic, GitHub handling) and the presence of an output schema (which means return values are documented elsewhere), the description is complete enough. It covers purpose, technology, behavior, use cases, and limitations without needing to repeat structured data.

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?

Schema description coverage is 100%, so the schema already documents both parameters (url and depth) thoroughly. The description does not add any additional meaning about parameters beyond what the schema provides, such as explaining how depth affects recursive exploration in practice. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'extract the main article text content from a given URL' using specific technologies (Puppeteer and Mozilla's Readability). It distinguishes from siblings by focusing on content extraction rather than chat, code analysis, API discovery, documentation retrieval, or general search.

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

Usage Guidelines4/5

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

The description provides clear context for when to use it ('Ideal for getting clean text from articles/blog posts') and includes a note about limitations ('May struggle... on complex homepages or dashboards'). However, it does not explicitly mention when NOT to use it or name specific alternatives among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

find_apisB

Automatically call this tool when needing external services or real time current data (like API info, latest versions, etc.) from web. Compares options based on requirements. Example: When building a shopping site, ask "Find product image APIs with free tiers".

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoAdditional context about the project or specific needs
requirementYesThe functionality or requirement you are looking to fulfill

Output Schema

ParametersJSON Schema
NameRequiredDescription
responseNoThe raw text response from Perplexity containing API suggestions and evaluations.

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'compares options based on requirements', which adds some context about its behavior. However, it lacks details on how the comparison works, what sources it uses, whether it requires authentication, rate limits, or what the output looks like. For a tool that interacts with web data, this is a significant gap in transparency.

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

Conciseness4/5

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

The description is concise and well-structured, consisting of two sentences: one stating the purpose and usage, and another providing a concrete example. Each sentence adds value without redundancy. It could be slightly improved by front-loading key information more explicitly, but overall it's efficient and clear.

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

Completeness3/5

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

Given that there is an output schema (which reduces the need to describe return values in the description), no annotations, and high schema coverage, the description is moderately complete. It covers the basic purpose and usage but lacks details on behavioral aspects like data sources, comparison methodology, and limitations. For a tool that fetches and compares web data, more context would be beneficial.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('requirement' and 'context'), including examples. The description adds minimal value beyond the schema, as it doesn't provide additional syntax, format details, or usage nuances for the parameters. The baseline score of 3 is appropriate since the schema does the heavy lifting.

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 tool's purpose: to find external services or real-time data from the web by comparing options based on requirements. It provides a specific example (shopping site scenario) that illustrates the verb 'find' and resource 'APIs'. However, it doesn't explicitly distinguish this tool from sibling tools like 'search' or 'get_documentation', which might have overlapping functionality.

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

Usage Guidelines3/5

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

The description provides some usage guidance by stating 'Automatically call this tool when needing external services or real time current data' and giving an example scenario. This implies when to use it, but it doesn't explicitly differentiate it from alternatives like 'search' or 'chat_perplexity', nor does it specify when NOT to use it. The guidance is helpful but incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_documentationA

Automatically call this tool when working with unfamiliar APIs/libraries, needing usage examples, or checking version specifics as this can access web. Example: When adding a payment gateway, ask "Get Stripe API documentation for creating charges".

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoAdditional context or specific aspects to focus on
queryYesThe technology, library, or API to get documentation for

Output Schema

ParametersJSON Schema
NameRequiredDescription
responseNoThe raw text response from Perplexity containing documentation, examples, and potentially source URLs prefixed with "Official URL(s):". The calling agent should parse this text to extract URLs if needed for further processing.

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool 'can access web,' which is a useful behavioral trait. However, it doesn't mention other important aspects like rate limits, authentication needs, response format, or potential costs. The description adds some value but leaves significant behavioral gaps uncovered.

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

Conciseness4/5

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

The description is appropriately sized with two sentences. The first sentence front-loads the purpose and usage guidelines, and the second provides a concrete example. There's minimal waste, though the phrasing could be slightly more concise (e.g., 'Automatically call this tool' is redundant with the tool name).

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is reasonably complete. It covers purpose and usage well, and the output schema exists, so the description doesn't need to explain return values. However, it lacks details on behavioral traits like web access limitations or error handling, which would improve completeness.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('query' and 'context') with descriptions and examples. The description doesn't add any parameter-specific semantics beyond what the schema provides. According to the rules, with high schema coverage, the baseline is 3 even with no param info in the description.

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 tool's purpose: 'Automatically call this tool when working with unfamiliar APIs/libraries, needing usage examples, or checking version specifics as this can access web.' It specifies the verb ('get documentation') and resource ('APIs/libraries'), but doesn't explicitly differentiate from sibling tools like 'find_apis' or 'search' which might have overlapping functionality.

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

Usage Guidelines5/5

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

The description provides explicit usage guidelines: 'when working with unfamiliar APIs/libraries, needing usage examples, or checking version specifics.' It includes a concrete example ('When adding a payment gateway, ask "Get Stripe API documentation for creating charges"') that illustrates when to use this tool. No explicit alternatives are named, but the context is clear and actionable.

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. 6 tool updatesv1.0.0
    • First observedchat_perplexity
    • First observedcheck_deprecated_code
    • First observedextract_url_content
    • First observedfind_apis
    • First observedget_documentation
    • First observedsearch

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation3/5

The tools have distinct primary purposes (e.g., chat, code review, content extraction, API discovery, documentation lookup, general search), but there is some functional overlap. For instance, 'chat_perplexity' and 'search' both perform web searches, and 'find_apis' and 'get_documentation' both relate to API information, which could cause confusion for an agent in selecting the most appropriate tool for a given task.

Naming Consistency4/5

Most tool names follow a consistent verb_noun pattern (e.g., 'extract_url_content', 'find_apis', 'get_documentation', 'check_deprecated_code'), which aids readability. However, 'chat_perplexity' deviates slightly by using a noun_verb structure, and 'search' is a standalone verb without a noun, creating minor inconsistencies in the naming convention.

Tool Count5/5

With 6 tools, the count is well-scoped for a server focused on web-based information retrieval and code assistance. Each tool appears to serve a specific function within this domain, avoiding bloat while covering key areas like conversation, search, content extraction, and technical support, making the set manageable and purposeful.

Completeness4/5

The tool set covers a broad range of web interaction and code-related tasks, including conversational search, content extraction, API discovery, documentation access, and code review. A minor gap exists in lacking explicit tools for updating or managing retrieved information (e.g., saving or organizing results), but agents can likely work around this using the provided tools effectively for most workflows.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers