{"type":"mcp_server","name":"modelcontextprotocol","description":"This repository provides an MCP server implementation, \"perplexity-ask,\" that integrates the Sonar API, enabling Claude to perform real-time web research and engage in conversations with live web searches.","category":"AI","language":"JavaScript","stars":2404,"forks":68,"owner":"ppl-ai","github_url":"https://github.com/ppl-ai/modelcontextprotocol","homepage":null,"setup":"## Setup\n\n**Step 1:**\n\nClone the repository:\n\n```bash\ngit clone git@github.com:ppl-ai/modelcontextprotocol.git\n```\n\nNavigate to the `perplexity-ask` directory and install dependencies:\n\n```bash\ncd modelcontextprotocol/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).\n2. Add the following 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\nNPX:\n\n```json\n{\n  \"mcpServers\": {\n    \"perplexity-ask\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol/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 Dockerfile .\n```\n\n**Step 5: Testing**\n\nVerify Claude for Desktop picks up the exposed tools by looking for the hammer icon and checking the available integrations.\n\n**Step 6: Advanced parameters**\n\nModify search parameters in the `index.ts` script, referring to the official [API documentation](https://docs.perplexity.ai/api-reference/chat-completions).","tools":"## Available Tools\n\n\t\t1. **perplexity_ask** (Engage in a conversation with the Sonar API for live web searches.)\n","faq":null,"created_at":"2025-03-10T19:44:02+00:00","updated_at":"2025-03-28T23:30:49+00:00","source_url":"https://model-context-protocol.com/servers/model-context-protocol-perplexity-web-search","related_articles":[]}