Perplexity API Platform MCP Server
OFFICIAL SERVERWeb search, quick answers, reasoning and long research runs from Perplexity's API
Sends questions to Perplexity's Sonar Pro, Sonar Reasoning Pro and Sonar Deep Research models
By Sumit Datta (individual) TypeScript Local · stdio Web searchAI and ML
27 popularity score ★ 297 ↓ 1.4k/wk
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs PERPLEXITY_API_KEY. Replace each <NAME> with your value.
claude mcp add perplexity -e PERPLEXITY_API_KEY=<PERPLEXITY_API_KEY> -- npx -y perplexity-mcp{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": [
"-y",
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": [
"-y",
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}{
"servers": {
"perplexity": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}[mcp_servers.perplexity]
command = "npx"
args = ["-y", "perplexity-mcp"]
[mcp_servers.perplexity.env]
PERPLEXITY_API_KEY = "<PERPLEXITY_API_KEY>"gemini mcp add --scope user -e PERPLEXITY_API_KEY=<PERPLEXITY_API_KEY> perplexity npx -- -y perplexity-mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs PERPLEXITY_API_KEY. Replace each <NAME> with your value.
git clone https://github.com/DaInfernalCoder/researcher-mcp.git
cd researcher-mcp
npm install
npm run buildclaude mcp add perplexity -e PERPLEXITY_API_KEY=<PERPLEXITY_API_KEY> -- node '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'{
"mcpServers": {
"perplexity": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}{
"mcpServers": {
"perplexity": {
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}{
"servers": {
"perplexity": {
"type": "stdio",
"command": "node",
"args": [
"<ABSOLUTE_PATH_TO_CLONE>/build/index.js"
],
"env": {
"PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>"
}
}
}
}[mcp_servers.perplexity]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/build/index.js"]
[mcp_servers.perplexity.env]
PERPLEXITY_API_KEY = "<PERPLEXITY_API_KEY>"gemini mcp add --scope user -e PERPLEXITY_API_KEY=<PERPLEXITY_API_KEY> perplexity node -- '<ABSOLUTE_PATH_TO_CLONE>/build/index.js'PERPLEXITY_API_KEY |
Required: Perplexity API key; the server exits at start without one. Can instead be passed with --api-key or read from a .env file in the folder given with --cwd. |
|---|
Researcher MCP (published on npm as perplexity-mcp) is a small stdio server that forwards an assistant's questions to the Perplexity API and returns the model's answer with its cited web sources listed as numbered links. It offers three tools, one per Perplexity model: search for short lookups on sonar-pro, reason for multi-step explanations on sonar-reasoning-pro, and deep_research for long reports on sonar-deep-research, which also takes a list of focus areas.
The search tool does not always use sonar-pro. In src/index.ts, unless force_model is true, a search query is checked for keywords: words such as "how", "why", "explain" or "compare" send it to sonar-reasoning-pro, and words such as "analyze", "research", "detailed" or "evaluate" send it to sonar-deep-research. The reason and deep_research tools are never rerouted. Each query is also wrapped in a fixed prompt asking the model to use the error messages, versions and code it contains, and when the query lacks such details the server appends a note to the answer listing what was missing, nudging the assistant to ask more specific questions.
The API key can come from the PERPLEXITY_API_KEY variable, a --api-key argument (which the server masks in its own process arguments), or a .env file in a folder named with --cwd. It is a third-party project, not one published by Perplexity.
| Runtime | Node.js 18+ |
|---|
Node.js 18 or later (npx for the npm way). A Perplexity API key from perplexity.ai/settings/api; Perplexity bills API usage, and Sonar Deep Research calls cost more than Sonar Pro ones. Running from source needs git and a TypeScript build (npm install, npm run build).
Only three tools, all of them question-and-answer calls to Perplexity; it cannot fetch a given URL, set search filters such as domain or date, or pick other Perplexity models. A search query containing common words like "how" or "analyze" is silently moved to a slower, costlier model unless force_model is set to true (src/index.ts). No request timeout is set, so a long deep_research call waits as long as the API takes. The server exits at start if no key is found by any of the three methods; .env files are read only from a folder given with --cwd.
Suits someone who already pays for the Perplexity API and wants web-grounded answers with sources inside an assistant, with a choice between quick, reasoned and long research answers. Because search reroutes on keywords, users watching their API bill should pass force_model or call the tools they mean. Those who want an option maintained by Perplexity itself should look at the official server its README mentions; this one is a community project with three fixed tools.
searchreasondeep_research