This is a Model Context Protocol (MCP) server that integrates with the Perplexity AI API to provide web search capabilities.
- Python 3.10+
- A Perplexity API Key
- Clone this repository.
- Install dependencies:
pip install -r requirements.txt
Set the PERPLEXITY_API_KEY environment variable.
export PERPLEXITY_API_KEY="your-api-key"Run the server using Python:
python server.pyThis server communicates via Stdio, so it is designed to be run by an MCP client (like Claude Desktop or VSCode Extension).
Add the following to your VSCode MCP settings (usually in settings.json under mcp.servers or via the MCP extension config):
{
"perplexity": {
"command": "python",
"args": ["/path/to/perplexity-mcp-server/server.py"],
"env": {
"PERPLEXITY_API_KEY": "your-api-key"
}
}
}