Perplexity MCP Server
An MCP server for the Perplexity for use with Claude Code and Claude Desktop, giving you enhanced search and reasoning capabilties.
Overview
Perplexity MCP Server is a Model Context Protocol (MCP) server designed for the Perplexity API, enabling AI assistants to interact with Perplexity's large language models through the Sonar API.
To use the server, install it via Go or clone the repository. Set your Perplexity API key as an environment variable and run the server using the command perplexity-mcp.
- Integration with Perplexity's large language models. - Tools for engaging in conversations and performing complex reasoning tasks. - Customizable command line options for model selection.
- Enabling AI assistants to provide conversational responses using Perplexity's models.
- Performing complex reasoning tasks for various applications.
- Facilitating search-based queries through the Sonar API.
Add to your AI client
Use these steps to connect Perplexity MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"perplexity-mcp-alcova-ai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"perplexity-mcp-alcova-ai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"perplexity-mcp-alcova-ai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"perplexity-mcp-alcova-ai": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"perplexity-mcp-alcova-ai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"perplexity-mcp-alcova-ai": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-alcova-ai"
]
}
}
}FAQ
What programming language is used for the server?
The server is written in Go.
How do I set my API key?
You can set your API key as an environment variable using `export PERPLEXITY_API_KEY=your-api-key-here`.
Can I customize the models used?
Yes! You can specify different models using command line options or environment variables.