Skip to content
Back to search

perplexity-mcp

A Model Context Protocol (MCP) server for research and documentation assistance using Perplexity AI. Won 1st @ Cline Hackathon

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dainfernalcoder--perplexity-mcp/badge.svg)](/listings/dainfernalcoder--perplexity-mcp)

HTML

<a href="/listings/dainfernalcoder--perplexity-mcp"><img src="/api/listings/dainfernalcoder--perplexity-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. **Prerequisites** - Node.js (from [nodejs.org](https://nodejs.org)) - Perplexity API key (from [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api)) - clone the repo somewhere

2. **Configure MCP Settings**

Add to your MCP settings file (location varies by platform):

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": ["/path/to/perplexity-server/build/index.js"],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Or use NPX to not have to install it locally (recommended for macos):

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "-y",
        "perplexity-mcp"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "your_api_key"
      }
    }
  }
}

In case the MCP Client is not able to parse the Perplexity API Key from the environment using methods like `"${env:PERPLEXITY_API_KEY}"` common in modern AI Coding Agents (e.g. Kiro), there are two fallback solutions:

**Command-Line Argument**: Pass the API key directly as a command-line argument, and you can even try to see whether "${env:PERPLEXITY_API_KEY}" works in there.

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": [
        "/path/to/perplexity-server/build/index.js",
        "--api-key",
        "your_api_key_here"
      ],
      "disabled": false,
      "autoApprove": []
    }
  }
}

**Read an explicit `.env` File**: specify the location of the project `.env` file with the environment variables and API keys for your current project with the `--cwd` command-line argument, and the MCP Server will read the `.env` file from the directory finding the Perplexity API Key from there.

{
  "mcpServers": {
    "perplexity": {
      "command": "node",
      "args": [
        "/path/to/perplexity-server/build/index.js",
        "--cwd",
        "/path/to/your/project"
      ],
      "disabled": false,
      "autoApprove": []
    }
  }
}

**Priority Order**: Command-line argument > Environment variable > .env file with `--cwd` (path needed)

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 148 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Perplexity MCP Server
  2. An intelligent research assistant powered by Perplexity's specialized AI models. Features automatic query complexity detection to route requests to the most appropriate model for optimal results. Unlike the Official server, it has search capabilities FOR EVERY TASK, essentially
  3. It also forces the agent using the MCP to be specific
  4. ## Tools
  5. ### 1. Search (Sonar Pro)
  6. Quick search for simple queries and basic information lookup. Best for straightforward questions that need concise, direct answers.
  7. ```javascript
  8. const result = await use_mcp_tool({
  9. server_name: "perplexity",
  10. tool_name: "search",
  11. arguments: {
  12. query: "What is the capital of France?",
  13. force_model: false // Optional: force using this model even if query seems complex
  14. }
  15. });
  16. ```
  17. ### 2. Reason (Sonar Reasoning Pro)
  18. Handles complex, multi-step tasks requiring detailed analysis. Perfect for explanations, comparisons, and problem-solving.
  19. ```javascript
  20. const result = await use_mcp_tool({
  21. server_name: "perplexity",
  22. tool_name: "reason",
  23. arguments: {
  24. query: "Compare and contrast REST and GraphQL APIs, explaining their pros and cons",
  25. force_model: false // Optional: force using this model even if query seems simple
  26. }
  27. });
  28. ```
  29. ### 3. Deep Research (Sonar Deep Research)
  30. Conducts comprehensive research and generates detailed reports. Ideal for in-depth analysis of complex topics.
  31. ```javascript
  32. const result = await use_mcp_tool({
  33. server_name: "perplexity",
  34. tool_name: "deep_research",
  35. arguments: {
  36. query: "The impact of quantum computing on cryptography",
  37. focus_areas: [
  38. "Post-quantum cryptographic algorithms",
  39. "Timeline for quantum threats",
  40. "Practical mitigation strategies"
  41. ],
  42. force_model: false // Optional: force using this model even if query seems simple
  43. }
  44. });
  45. ```
  46. ## Setup
  47. 1. **Prerequisites**
  48. - Node.js (from [nodejs.org](https://nodejs.org))
  49. - Perplexity API key (from [perplexity.ai/settings/api](https://www.perplexity.ai/settings/api))
  50. - clone the repo somewhere
  51. 2. **Configure MCP Settings**
  52. Add to your MCP settings file (location varies by platform):
  53. ```json
  54. {
  55. "mcpServers": {
  56. "perplexity": {
  57. "command": "node",
  58. "args": ["/path/to/perplexity-server/build/index.js"],
  59. "env": {
  60. "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
  61. },
  62. "disabled": false,
  63. "autoApprove": []
  64. }
  65. }
  66. }
  67. ```
  68. Or use NPX to not have to install it locally (recommended for macos):
  69. ```json
  70. {
  71. "mcpServers": {
  72. "perplexity": {
  73. "command": "npx",
  74. "args": [
  75. "-y",
  76. "perplexity-mcp"
  77. ],
  78. "env": {
  79. "PERPLEXITY_API_KEY": "your_api_key"
  80. }
  81. }
  82. }
  83. }
  84. ```
  85. In case the MCP Client is not able to parse the Perplexity API Key from the
  86. environment using methods like `"${env:PERPLEXITY_API_KEY}"` common in modern
  87. AI Coding Agents (e.g. Kiro), there are two fallback solutions:
  88. **Command-Line Argument**: Pass the API key directly as a command-line argument, and you can even try to see whether "${env:PERPLEXITY_API_KEY}" works in there.
  89. ```json
  90. {
  91. "mcpServers": {
  92. "perplexity": {
  93. "command": "node",
  94. "args": [
  95. "/path/to/perplexity-server/build/index.js",
  96. "--api-key",
  97. "your_api_key_here"
  98. ],
  99. "disabled": false,
  100. "autoApprove": []
  101. }
  102. }
  103. }
  104. ```
  105. **Read an explicit `.env` File**: specify the location of the project `.env` file with the environment variables and API keys for your current project with the `--cwd` command-line argument, and the MCP Server will read the `.env` file from the directory finding the Perplexity API Key from there.
  106. ```json
  107. {
  108. "mcpServers": {
  109. "perplexity": {
  110. "command": "node",
  111. "args": [
  112. "/path/to/perplexity-server/build/index.js",
  113. "--cwd",
  114. "/path/to/your/project"
  115. ],
  116. "disabled": false,
  117. "autoApprove": []
  118. }
  119. }
  120. }
  121. ```
  122. **Priority Order**: Command-line argument > Environment variable > .env file with `--cwd` (path needed)
  123. ## Star History
  124. [![Star History Chart](https://api.star-history.com/svg?repos=DaInfernalCoder/perplexity-mcp&type=Timeline)](https://www.star-history.com/#DaInfernalCoder/perplexity-mcp&Timeline)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.