
How to add Perplexity to Windsurf
Official Perplexity MCP server — web search, ask, deep research, and reasoning via Sonar models. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 15, 2026 · 2.3k★ · stdio · apikey · official
Windsurf config for Perplexity
npx -y @perplexity-ai/mcp-server{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": [
"-y",
"@perplexity-ai/mcp-server"
],
"env": {
"PERPLEXITY_API_KEY": "<your-perplexity-api-key>"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the Perplexity config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5Perplexity's tools become available to Cascade.
Before you start
- Node.js with npx available
- A Perplexity API key from the API portal at https://www.perplexity.ai/account/api/group (set as PERPLEXITY_API_KEY)
- API access requires adding a payment method / credits to your Perplexity account
What Perplexity can do in Windsurf
perplexity_searchDirect web search via the Perplexity Search API, returning ranked search results.
perplexity_askGeneral-purpose conversational answers with real-time web search using the sonar-pro model.
perplexity_researchDeep, comprehensive research and detailed reports using the sonar-deep-research model.
perplexity_reasonAdvanced reasoning and problem-solving for complex analytical tasks using sonar-reasoning-pro.
Security
Requires a PERPLEXITY_API_KEY that incurs usage charges; keep it secret and rotate if exposed. Returned answers summarize live web content, so verify citations before relying on them for high-stakes decisions.
Perplexity + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Perplexity config there under the "mcpServers" key and restart the client.
Is Perplexity safe to use with Windsurf?
Requires a PERPLEXITY_API_KEY that incurs usage charges; keep it secret and rotate if exposed. Returned answers summarize live web content, so verify citations before relying on them for high-stakes decisions.
Is the Perplexity API free?
No. The Sonar API is usage-based and requires a payment method/credits on your Perplexity account; there is no fully free tier for the MCP server's API calls.
What is the difference between perplexity_research and perplexity_reason?
Research uses sonar-deep-research for thorough, report-style analysis, while reason uses sonar-reasoning-pro for structured multi-step problem solving on complex analytical tasks.
What does the strip_thinking parameter do?
On the research and reasoning tools, setting strip_thinking: true removes intermediate thinking tags from the response, reducing token usage in your client's context.