{"_id":"server-perplexity-ask","_rev":"5-d57cb90f589f3c35cd6fbe63dcba8cc2","name":"server-perplexity-ask","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"server-perplexity-ask","version":"0.1.0","keywords":["ai","perplexity","mcp","modelcontextprotocol"],"author":{"url":"https://modelcontextprotocol.io","name":"Model Context Protocol"},"license":"MIT","_id":"server-perplexity-ask@0.1.0","maintainers":[{"name":"jamesliounis","email":"james.liounis@perplexity.ai"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/servers/issues"},"bin":{"mcp-server-perplexity-ask":"dist/index.js"},"dist":{"shasum":"26de8916bad9481be9c6916ac5404a517fa3cd4b","tarball":"https://registry.npmjs.org/server-perplexity-ask/-/server-perplexity-ask-0.1.0.tgz","fileCount":2,"integrity":"sha512-COMbLMCcSjH0AbzOMdeBe+XOFUXFJPObUJjuy6Kdnh95mYbec3WD9UbQEiQX3H9IHl9M28D7s1XTKMS57TNhjg==","signatures":[{"sig":"MEYCIQCZTSsbP2kPAXonu2PVKd9Ss3OjwriOLvzbjyyTzh/S+QIhANnRzxAJ8w0MS7GPRX39nPLhON4sVEjUwN2jAlfRm3Yd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9287},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"4a5637f62987e7e99eeae85c89071772c417790c","scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"jamesliounis","email":"james.liounis@perplexity.ai"},"repository":{"url":"git+https://github.com/modelcontextprotocol/servers.git","type":"git"},"_npmVersion":"11.2.0","description":"MCP server for Perplexity API integration","directories":{},"_nodeVersion":"23.9.0","dependencies":{"axios":"^1.6.2","dotenv":"^16.3.1","@modelcontextprotocol/sdk":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/server-perplexity-ask_0.1.0_1743559827441_0.5626252299972685","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"server-perplexity-ask","version":"0.1.1","keywords":["ai","perplexity","mcp","modelcontextprotocol"],"author":{"url":"https://modelcontextprotocol.io","name":"Model Context Protocol"},"license":"MIT","_id":"server-perplexity-ask@0.1.1","maintainers":[{"name":"jamesliounis","email":"james.liounis@perplexity.ai"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/servers/issues"},"bin":{"mcp-server-perplexity-ask":"dist/index.js"},"dist":{"shasum":"97db37ad98cd2306ddce6808df705a9a3d3de0ba","tarball":"https://registry.npmjs.org/server-perplexity-ask/-/server-perplexity-ask-0.1.1.tgz","fileCount":2,"integrity":"sha512-6I9TwM6Ejmrtrv2th2/OOtWFaqNJEr5BxKKLvK9z9Dp/5zUnLDBNZHjF2n3XnJpnGS0DW7aqgMHQey3WAPAKWQ==","signatures":[{"sig":"MEYCIQCodi7xFXppNIm9EIV8JHAORuhH2LtahpgHrBrQXPZn8wIhAOQngBoByacFIwA9Yz4huzR3QnqmotrJH+ph0FnYPDep","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9287},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"f897dd740a5e81a4cf4206fc4de2e55548ef2686","scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"jamesliounis","email":"james.liounis@perplexity.ai"},"repository":{"url":"git+https://github.com/modelcontextprotocol/servers.git","type":"git"},"_npmVersion":"11.2.0","description":"MCP server for Perplexity API integration","directories":{},"_nodeVersion":"23.9.0","dependencies":{"axios":"^1.6.2","dotenv":"^16.3.1","@modelcontextprotocol/sdk":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/server-perplexity-ask_0.1.1_1743560796561_0.6634473072930076","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"server-perplexity-ask","version":"0.1.2","keywords":["ai","perplexity","mcp","modelcontextprotocol"],"author":{"url":"https://modelcontextprotocol.io","name":"Model Context Protocol"},"license":"MIT","_id":"server-perplexity-ask@0.1.2","maintainers":[{"name":"jamesliounis","email":"james.liounis@perplexity.ai"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/servers/issues"},"bin":{"mcp-server-perplexity-ask":"dist/index.js"},"dist":{"shasum":"9aa5ac3359c18da7791535695c9b31be77f8b2bd","tarball":"https://registry.npmjs.org/server-perplexity-ask/-/server-perplexity-ask-0.1.2.tgz","fileCount":3,"integrity":"sha512-XUpNvuHU1i5eDsRuHFFAJjk6FhvuTFt+x+rk/gCUa3wd7Epd2itIndIod56W5/QlsGKgAzVImBYp6/WPM9qx9g==","signatures":[{"sig":"MEYCIQDxtmh7WW6aT6S5XlyViinc+nCCtNSW3/Hpui4DLA157AIhAK03BZ3IerryhzK5hHDdTeDHdMAdmBsCuVZXu7LV6Eov","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12887},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"f897dd740a5e81a4cf4206fc4de2e55548ef2686","scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"jamesliounis","email":"james.liounis@perplexity.ai"},"repository":{"url":"git+https://github.com/modelcontextprotocol/servers.git","type":"git"},"_npmVersion":"11.2.0","description":"MCP server for Perplexity API integration","directories":{},"_nodeVersion":"23.9.0","dependencies":{"axios":"^1.6.2","dotenv":"^16.3.1","@modelcontextprotocol/sdk":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/server-perplexity-ask_0.1.2_1743560864367_0.14549017886830096","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.3":{"name":"server-perplexity-ask","version":"0.1.3","keywords":["ai","perplexity","mcp","modelcontextprotocol"],"author":{"url":"https://modelcontextprotocol.io","name":"Model Context Protocol"},"license":"MIT","_id":"server-perplexity-ask@0.1.3","maintainers":[{"name":"jamesliounis","email":"james.liounis@perplexity.ai"}],"homepage":"https://modelcontextprotocol.io","bugs":{"url":"https://github.com/modelcontextprotocol/servers/issues"},"bin":{"mcp-server-perplexity-ask":"dist/index.js"},"dist":{"shasum":"f8fdc3087de89acd238a2e6b394945a719810328","tarball":"https://registry.npmjs.org/server-perplexity-ask/-/server-perplexity-ask-0.1.3.tgz","fileCount":3,"integrity":"sha512-3jW3IXIi/LgdQnM6aHTRShyyzn/AkWGP0b9AGIXI6aTYlYRhi+6Jwku7BVuiHRWaewj2BtwypjwfcBLG3e0fjw==","signatures":[{"sig":"MEUCIQCiun1JfHW1t7LXKlhUhEUoUuYMr47K6zqYgV4WVXHLpgIgGuNUIc17evpbaGeEyWvpHU+My40mblJwOaxfOU/q13A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12845},"main":"dist/index.js","type":"module","engines":{"node":">=18"},"gitHead":"f897dd740a5e81a4cf4206fc4de2e55548ef2686","scripts":{"build":"tsc && shx chmod +x dist/*.js","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"jamesliounis","email":"james.liounis@perplexity.ai"},"repository":{"url":"git+https://github.com/modelcontextprotocol/servers.git","type":"git"},"_npmVersion":"11.2.0","description":"MCP server for Perplexity API integration","directories":{},"_nodeVersion":"23.9.0","dependencies":{"axios":"^1.6.2","dotenv":"^16.3.1","@modelcontextprotocol/sdk":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/server-perplexity-ask_0.1.3_1743560955755_0.4979276357396407","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2025-04-02T02:10:27.387Z","modified":"2025-10-07T23:19:50.373Z","0.1.0":"2025-04-02T02:10:27.603Z","0.1.1":"2025-04-02T02:26:36.737Z","0.1.2":"2025-04-02T02:27:44.529Z","0.1.3":"2025-04-02T02:29:15.967Z"},"bugs":{"url":"https://github.com/modelcontextprotocol/servers/issues"},"author":{"url":"https://modelcontextprotocol.io","name":"Model Context Protocol"},"license":"MIT","homepage":"https://modelcontextprotocol.io","keywords":["ai","perplexity","mcp","modelcontextprotocol"],"repository":{"url":"git+https://github.com/modelcontextprotocol/servers.git","type":"git"},"description":"MCP server for Perplexity API integration","maintainers":[{"name":"jamesliounis","email":"james.liounis@perplexity.ai"}],"readme":"# Perplexity Ask MCP Server\n\nAn MCP server implementation that integrates the Sonar API to provide Claude with unparalleled real-time, web-wide research.\n\n![Demo](/assets/demo_screenshot.png)\n\n\n## Tools\n\n- **perplexity_ask**\n  - Engage in a conversation with the Sonar API for live web searches.\n  - **Inputs:**\n    - `messages` (array): An array of conversation messages.\n      - Each message must include:\n        - `role` (string): The role of the message (e.g., `system`, `user`, `assistant`).\n        - `content` (string): The content of the message.\n\n## Configuration\n\n### Step 1: \n\nClone the MCP repository:\n\n```bash\ngit@github.com:modelcontextprotocol/servers.git\n```\n\nNavigate to the `perplexity-ask` directory and install the necessary dependencies:\n\n```bash\ncd servers/src/perplexity-ask && npm install\n```\n\n### Step 2: Get a Sonar API Key\n\n1. Sign up for a [Sonar API account](https://docs.perplexity.ai/guides/getting-started).\n2. Follow the account setup instructions and generate your API key from the developer dashboard.\n3. Set the API key in your environment as `PERPLEXITY_API_KEY`.\n\n### Step 3: Configure Claude Desktop\n\n1. Download Claude desktop [here](https://claude.ai/download). \n\n2. Add this to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"perplexity-ask\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"PERPLEXITY_API_KEY\",\n        \"mcp/perplexity-ask\"\n      ],\n      \"env\": {\n        \"PERPLEXITY_API_KEY\": \"YOUR_API_KEY_HERE\"\n      }\n    }\n  }\n}\n```\n\n### NPX\n\n```json\n{\n  \"mcpServers\": {\n    \"perplexity-ask\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"server-perplexity-ask\"\n      ],\n      \"env\": {\n        \"PERPLEXITY_API_KEY\": \"YOUR_API_KEY_HERE\"\n      }\n    }\n  }\n}\n```\n\nYou can access the file using:\n\n```bash\nvim ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n```\n\n### Step 4: Build the Docker Image\n\nDocker build:\n\n```bash\ndocker build -t mcp/perplexity-ask:latest -f src/perplexity-ask/Dockerfile .\n```\n\n### Step 5: Testing\n\nLet’s make sure Claude for Desktop is picking up the two tools we’ve exposed in our `perplexity-ask` server. You can do this by looking for the hammer icon:\n\n![Claude Visual Tools](/assets/visual-indicator-mcp-tools.png)\n\nAfter clicking on the hammer icon, you should see the tools that come with the Filesystem MCP Server:\n\n![Available Integration](/assets/available_tools.png)\n\nIf you see both of these this means that the integration is active. Congratulations! This means Claude can now ask Perplexity. You can then simply use it as you would use the Perplexity web app.  \n\n### Step 6: Advanced parameters\n\nCurrently, the search parameters used are the default ones. You can modify any search parameter in the API call directly in the `index.ts` script. For this, please refer to the official [API documentation](https://docs.perplexity.ai/api-reference/chat-completions).\n\n### Troubleshooting \n\nThe Claude documentation provides an excellent [troubleshooting guide](https://modelcontextprotocol.io/docs/tools/debugging) you can refer to. However, you can still reach out to us at api@perplexity.ai for any additional support or [file a bug](https://github.com/ppl-ai/api-discussion/issues). \n\n\n## License\n\nThis MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.\n\n\n\n","readmeFilename":"README.md"}