Perplexity is an MCP server that provides Model Context Protocol clients with direct access to Perplexity's specialized search, reasoning, and research AI models. Built for developers, technical analysts, and researchers using tools like Claude or Cursor, it expands agent capabilities with live web search and deep online information gathering. The server integrates three distinct tools mapped to specific Perplexity models: quick search via Sonar Pro for straightforward queries, multi-step analysis via Sonar Reasoning Pro for complex explanations and comparisons, and Sonar Deep Research for exhaustive reports across specific focus areas. It incorporates automatic query complexity detection to route prompts to the appropriate model, while also supporting explicit model overrides. By connecting an agent to Perplexity APIs, users can conduct targeted external research, verify facts, analyze engineering trade-offs, and generate comprehensive research summaries directly inside their development environments and MCP clients without manual web browsing.
Category: AI & LLM Tooling
Tags: perplexity, reasoning, research, search
json { "mcpServers": { "perplexity": { "command": "npx", "args": ["-y", "perplexity-mcp"], "env": { "PERPLEXITY_API_KEY": "your_api_key" } } } } 4. Alternatively, clone the repository, build the project, and run it using node /path/to/perplexity-server/build/index.js. 5. If your client cannot read environment variables, pass the key via the --api-key your_key command-line argument or specify a .env directory using --cwd /path/to/project.Part of MCP Servers
The server includes three primary tools: search, reason, and deep_research. The search tool uses Sonar Pro for fast information lookup on simple queries. The reason tool uses Sonar Reasoning Pro for complex, multi-step evaluations and technical comparisons. The deep_research tool uses Sonar Deep Research to perform comprehensive investigations across specified focus areas.
You can configure it via NPX by specifying the npx command, the perplexity-mcp package, and setting your PERPLEXITY_API_KEY environment variable in your client settings. Alternatively, you can clone the repository from GitHub, compile the files, and run the server script directly using Node.js.
The server provides fallback configuration methods if your MCP client cannot parse environment variables. You can pass the API key directly using the --api-key command-line argument, or point the server to a directory containing a valid .env file using the --cwd argument. Command-line flags take priority over environment variables.
Yes. While the server includes automatic query complexity detection to select the best model, each tool supports an optional force_model argument. Setting this boolean parameter to true forces the MCP server to execute the prompt using that specific tool regardless of the query length or complexity.