Skip to main content
Glama
thierrysays

perplexity-mcp-server

by thierrysays

perplexity-mcp-server

Servidor MCP para flujos de trabajo estructurados de vigilancia competitiva / inteligencia de mercado sobre la API Perplexity Sonar.

Corrección (2026-08-26): una versión anterior de este README afirmaba que no existía ningún conector MCP nativo de Perplexity en ninguna parte. Eso era incorrecto: Perplexity publica un servidor MCP oficial (github.com/perplexityai/modelcontextprotocol), que incluye un endpoint remoto alojado por Perplexity en https://api.perplexity.ai/mcp accesible desde una sesión programada en la nube sin necesidad de autoalojamiento. Si solo necesitas una búsqueda Sonar ad hoc genérica, regístralo en lugar de construir o ejecutar cualquier cosa aquí.

Lo que el servidor oficial no te ofrece es una salida de vigilancia semanal estructurada y comparable: expone búsqueda/razonamiento genéricos (Agent API, Search API), no un informe de empresa de secciones fijas ni un barrido de señales restringido por un esquema JSON. Esa es la razón real de que este servidor exista: es una capa fina y estrecha de dos herramientas de flujo de trabajo, no un reemplazo del propio servidor MCP de Perplexity.

Despliega esto una vez (consulta «Despliegue remoto» más abajo) con PERPLEXITY_API_KEY configurada como secreto de plataforma, y cualquier cliente MCP — incluyendo una sesión de Cowork/Claude programada en la nube — podrá llamarlo por HTTP sin tocar nunca la máquina local ni un puente de dispositivo. Regístralo junto al servidor oficial de Perplexity, no en su lugar.

Herramientas

  • perplexity_company_news — informe estructurado de noticias de empresa (gobernanza, directivos, eventos estratégicos, situación financiera, movimientos de RR. HH.), encabezados de sección fijos, lookback_days en lugar de rangos de fechas en texto libre.

  • perplexity_market_signals — barrido de señales de todo el sector (M&A, financiación, nombramientos, reestructuraciones) restringido a un esquema JSON en el lado del servidor, de modo que el resultado es un array real de señales discretas, no markdown que haya que volver a parsear. Devuelve un array vacío (no un error) cuando no se encuentra nada fechado y fiable para el período — ese es un resultado significativo, no un fallo.

Ambas herramientas admiten response_format: "markdown" | "json" y devuelven citas/fuentes. Para búsquedas de uso general, usa en su lugar el servidor MCP oficial de Perplexity — consulta la corrección anterior.

Related MCP server: INDUSS Research Intelligence MCP Server

Configuración

npm install
cp .env.example .env   # then set PERPLEXITY_API_KEY
npm run build

Uso local (stdio) — inicio rápido, NO resuelve el problema de la programación en la nube

Útil para probar, o para cualquier flujo de trabajo que ya se ejecute en tu propia máquina. Regístralo en la configuración de tu cliente MCP (p. ej., el claude_desktop_config.json de Claude Desktop):

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": ["/absolute/path/to/perplexity-mcp-server/dist/index.js"],
      "env": { "PERPLEXITY_API_KEY": "pplx-..." }
    }
  }
}

Esto sigue supeditando la disponibilidad a que esa máquina esté encendida — no resuelve el problema original de una tarea programada en la nube que necesita la clave. Para eso, usa el despliegue HTTP que se indica a continuación.

Despliegue remoto (HTTP en streaming) — la solución real para tareas programadas en la nube

Ejecuta el mismo código con TRANSPORT=http en cualquier host compatible con Node.js (una VPS pequeña, Render, Railway, Fly.io, un contenedor en cualquier proveedor de nube). Los únicos requisitos son: Node 18+, la posibilidad de establecer un secreto en una variable de entorno y una URL HTTPS pública.

PERPLEXITY_API_KEY=pplx-... TRANSPORT=http PORT=3000 npm start

El servidor expone:

  • POST /mcp — el endpoint de MCP (HTTP en streaming, JSON sin estado — un nuevo servidor+transporte por solicitud, de modo que nada se filtra entre llamadas y se escala horizontalmente sin estado compartido)

  • GET /health — comprobación simple de actividad para la sonda de salud de tu plataforma de alojamiento

Una vez desplegado detrás de HTTPS (https://your-host/mcp), registra esa URL como conector MCP remoto en el espacio de trabajo para que la tarea programada que depende de Perplexity pueda alcanzarlo directamente, con la clave residiendo en el lado del servidor — el mismo modelo operativo que Pappers ya utiliza (conector nativo, sin secreto local en la ruta de credenciales).

Qué se ha verificado en esta compilación

  • npm run build compila sin errores (TypeScript estricto, sin any).

  • Ambos transportes se inician sin fallos (stdio y HTTP).

  • GET /health responde correctamente.

  • El protocolo de enlace completo de MCP (initialize, tools/list) devuelve ambas herramientas con esquemas JSON, descripciones y anotaciones correctos.

  • tools/call con una clave de API no válida devuelve un resultado isError: true limpio y procesable (orientación 401 que apunta al panel de Perplexity) — el servidor no se bloquea y sigue respondiendo después.

Qué NO se ha verificado aún

No había ninguna PERPLEXITY_API_KEY real disponible en el entorno de compilación, por lo que una llamada real exitosa a Sonar — contenido de respuesta real, citas reales, la respuesta de market_signals restringida por esquema JSON parseándose realmente como JSON válido — no se ha probado de extremo a extremo. Antes de confiar en esto en la rutina de vigilancia de producción, ejecuta cada una de las dos herramientas una vez con una clave real (localmente vía stdio es suficiente para esta comprobación) y confirma que la salida coincide con las estructuras documentadas anteriormente.

Nota sobre el coste

perplexity_company_news y perplexity_market_signals usan por defecto el modelo sonar-pro (búsqueda más profunda, más fuentes, mayor coste por llamada que sonar) porque el caso de uso de vigilancia prioriza la exhaustividad y la calidad de las citas sobre la latencia/el coste — este es el valor predeterminado deliberado para ambas herramientas de este servidor, confirmado el 2026-08-26. Aquí no hay ninguna herramienta perplexity_search para optar por un modelo más barato en consultas puntuales; usa el servidor MCP oficial de Perplexity para eso (consulta la corrección al principio de este archivo). Revisa los precios actuales por modelo de Perplexity antes de ejecutar esto a la escala de la rutina semanal en docenas de empresas — una ejecución completa enriquece del orden de 50-90 empresas más un barrido de señales de mercado, por lo que el coste marginal de sonar-pro frente a sonar se acumula rápidamente.

Available Tools

2 tools
perplexity_company_newsPerplexity Company News BriefA
Read-only

Get a structured, cited news brief on one company: governance, executives, strategic events, financial situation, and senior HR moves.

This is a workflow tool built on top of Perplexity's Sonar chat/completions API: it fixes the prompt structure and section headings so every call returns a comparable, five-section brief, and maps a plain lookback_days number to Perplexity's recency buckets (there is no native "3 months" filter, so lookback_days=90 is mapped to the nearest bucket, 'month').

Args:

  • organization (string): Company name, e.g. "Doctolib".

  • lookback_days (number, 1-365, default 90): how far back to search ("90" = "last 3 months").

  • language ('fr'|'en'): default 'fr'.

  • response_format ('markdown'|'json'): default 'markdown'.

Returns: Markdown: five headed sections (Gouvernance/Governance, Dirigeants/Executives, Événements stratégiques/Strategic events, Situation financière/Financial situation, Mouvements RH/Senior HR moves), each stating "Rien à signaler"/"Nothing to report" if empty, followed by numbered Sources. JSON: { "answer": string (same structured text), "citations": string[], "search_results": [...], "organization": string, "lookback_days": number }

Examples:

  • Use when: "Quelle est l'actualité récente de Nexans ?" -> organization="Nexans"

  • Use when: weekly veille loop over a list of target companies -> call once per company

  • Don't use when: you need sector-wide signals across many companies -> use perplexity_market_signals instead.

Error Handling:

  • Returns "Error: ... Invalid Perplexity API key" if PERPLEXITY_API_KEY is missing/invalid (401).

  • Returns "Error: ... rate limit exceeded" if too many requests (429).

NameRequiredDescriptionDefault
languageNoLanguage of the synthesized answer.fr
organizationYesLegal or commercial name of the company to research, e.g. 'Doctolib'.
lookback_daysNoHow far back to look for news, in days (default 90 = 'last 3 months'). Mapped internally to Perplexity's nearest recency bucket.
response_formatNoOutput format: 'markdown' for human-readable, 'json' for machine-readable.markdown

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare read-only and non-destructive; the description adds substantial behavioral context: it explains it wraps Perplexity's API, fixes prompt/section structure, maps lookback_days to recency buckets, emits 'Nothing to report' placeholders, and returns specific errors for bad API keys or rate limits. This goes well beyond the annotations and helps predict actual behavior.

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 longer than average, but it is organized into clear, labeled sections (Args, Returns, Examples, Error Handling) with no filler. Every section contributes decision-relevant information, and the main purpose is front-loaded in the first sentence.

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?

The tool is a wraper with no output schema, so the description correctly takes on the burden of documenting return values, error behavior, parameter semantics, and usage boundaries. It covers the full range of invocation contexts and likely failure modes.

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

Parameters5/5

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

Although schema description coverage is 100%, the description adds important meaning beyond the schema: it explains that lookback_days is mapped to Perplexity's nearest recency bucket because no native '3 months' filter exists. It also details what each response_format value produces, including the JSON shape and Markdown sections.

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 opens with a specific verb and resource: 'Get a structured, cited news brief on one company,' then lists the exact content areas covered. It also names the sibling tool in the alternatives, making differentiation explicit.

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 gives explicit 'Use when' and 'Don't use when' guidance, including an example user query mapped to the organization parameter. It clearly directs agents to perplexity_market_signals for sector-wide signals instead.

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

perplexity_market_signalsPerplexity Market SignalsA
Read-only

Find recent, dated market signals (M&A, funding rounds, executive appointments, restructurings, etc.) relevant to a given professional profile and region, as a structured list.

Unlike a free-text Sonar query, this tool constrains Perplexity's response to a JSON schema server-side, so the result is a real array of discrete signals — not markdown you have to re-parse. It returns an empty list rather than fabricated signals when nothing dated and reliable is found; that empty list is itself a meaningful, actionable result (it means the sweep ran and found nothing this period), not a failure.

Args:

  • profile (string): Target professional profile, e.g. "CTO groupe / VP Technology / Chief Transformation Officer / Group CIO".

  • regions (string[], default ["France","Europe","Luxembourg"]): geographic scope.

  • lookback_days (number, 1-30, default 7): how far back to search.

  • signal_types (string[], default M&A/levée de fonds/nomination/restructuration): categories.

  • language ('fr'|'en'): default 'fr'.

  • response_format ('markdown'|'json'): default 'markdown'.

Returns: Markdown: one numbered section per signal (title, type, date, source, summary), or an explicit "no signal found" statement if the array is empty. JSON: { "signals": [{title,type,date,source_url,summary}], "count": number, "lookback_days": number, "regions": string[] }

Examples:

  • Use when: weekly sector-wide sweep independent of any specific tracked company

  • Don't use when: you already know the company and want its own news -> use perplexity_company_news instead.

Error Handling:

  • Returns "Error: ... Invalid Perplexity API key" if PERPLEXITY_API_KEY is missing/invalid (401).

  • Returns "Error: ... rate limit exceeded" if too many requests (429).

  • If Perplexity returns non-JSON content despite the schema constraint, returns "Error: could not parse signals JSON" with the raw answer included so nothing is silently lost.

NameRequiredDescriptionDefault
profileYesThe professional profile signals should be relevant to, e.g. 'CTO groupe / VP Technology / Chief Transformation Officer / Group CIO'.
regionsNoGeographic scope for signals.
languageNoLanguage of the synthesized answer.fr
signal_typesNoCategories of signal to look for.
lookback_daysNoHow far back to look for signals, in days (default 7 = 'this week').
response_formatNoOutput format: 'markdown' for human-readable, 'json' for machine-readable.markdown

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark readOnlyHInt and non-destructive, and the description adds meaningful behavior beyond that: it returns an empty list rather than fabricated signals, treating that empty result as a valid sweep outcome. It also discloses exact error behaviors for 401, 429, and per-answer parsing failures while preserving raw content, which is highly transparent.

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 well-structured with Args, Returns, Examples, and Error Handling sections. The core purpose and sibling differentiation are front-loaded, and each section contributes actionable information without filler.

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?

There is no output schema, so the description correctly takes responsibility for explaining both Markdown and JSON return shapes. It also covers error handling, empty-result semantics, and representative use cases, giving an agent everything needed to invoke and interpret the tool correctly.

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

Parameters4/5

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

Schema coverage is 100% and each parameter already has a description, so the baseline is 3. The description adds value by specifying the exact Markdown and JSON return structures tied to response_format, and by giving concrete examples for profile, signal_types, and lookback_days. This is a modest but genuine increment over the schema.

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 opens with a specific verb and resource: 'Find recent, dated market signals ... relevant to a given professional profile and region, as a structured list.' It lists concrete signal categories and explicitly contrasts itself with a free-text Sonar query and with the sibling tool perplexity_company_news, so an agent can distinguish it without opening the schema.

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?

It provides explicit 'Use when' and 'Don't use when' guidance: use for 'weekly sector-wide sweep independent of any specific tracked company' and avoid when you want a specific company's news, routing to perplexity_company_news. This leaves no ambiguity about selection versus the sibling.

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. 2 tool updatesv1.0.0
    • First observedperplexity_company_news
    • First observedperplexity_market_signals

TDQS

A4.8/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have cleanly separated domains: one compiles a structured news brief for a single named company, while the other scans for market-wide signals across profiles and regions. Their descriptions explicitly cross-reference when not to use each, removing ambiguity.

Naming Consistency5/5

Both tool names follow the same `perplexity_<object>` snake_case pattern and clearly indicate their target: `company_news` vs `market_signals`. No mixed conventions or vague verbs.

Tool Count3/5

At two tools, the surface is on the thin side and borders on feeling minimal for a server named after Perplexity. Each tool does earn its place and covers a distinct workflow, but the count is at the low end of acceptable.

Completeness4/5

The pair covers the two main read-oriented intelligence workflows: focused company monitoring and broader market sweeps. A general free-text search or ask tool is missing, but the server's stated purpose appears to be these richer structured workflows, so the gap is minor.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    B
    maintenance
    Provides an institutional research backend for AI assistants, with 15 tools for company, financial, funding, competitor, industry, and news intelligence, plus Markdown/PDF report generation, featuring deterministic source routing, extraction, validation, and citation generation.
    15
    -
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to perform institutional research and due diligence by retrieving, extracting, validating, and citing data from public sources, then generating reports in markdown, HTML, or PDF.
    23
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables agents to perform cited social listening and company research, returning mentions, sentiment, and themes in a single low-latency USDC-paid call.
    12
    1
    MIT