home / mcp / perplexity mcp server
A Model Context Protocol (MCP) server that provides web search functionality using Perplexity AI's API.
Configuration
View docs{
"mcpServers": {
"jsonallen-perplexity-mcp": {
"command": "uvx",
"args": [
"perplexity-mcp"
],
"env": {
"PERPLEXITY_MODEL": "sonar",
"PERPLEXITY_API_KEY": "XXXXXXXXXXXXXXXXXXXX"
}
}
}
}You can use this MCP server to perform web searches through Perplexity AI from your MCP-enabled clients, such as Claude Desktop. It acts as a bridge that takes your search prompts, queries Perplexity, and returns results to your chat client for quick, up-to-date web insights.
Use the perplexity MCP server from an MCP client by selecting the perplexity search tool and issuing a query. The tool is exposed as perplexity_search_web and accepts a required query string. Optionally you can filter results by recency to focus on specific time frames such as the last day, week, month, or year. The server leverages Perplexity AI’s API to fetch current web results and delivers them back into your chat session for seamless exploration.
Prerequisites you need before installing include a runtime capable of running MCP servers and a way to manage the MCP runtime. You will also need an API key from Perplexity to access the Perplexity AI API.
Install the MCP server using the package manager that supports MCP deployment in your workflow. If you are using the Clover/Claude environment, you will run the installation through the MCP deployment flow provided for Claude.
Ensure UV is installed to manage the runtime environment if your setup requires it.
Configuration relies on two environment variables: PERPLEXITY_API_KEY for authenticating with Perplexity and PERPLEXITY_MODEL to select the Perplexity model. The default model is sonar if you do not specify one.
For Claude Desktop, you can verify the server is working by invoking a prompt such as a web search query like "search the web for news about openai in the past week". If the tool is available, an alert should appear asking you to allow the tool usage for the chat.
"perplexity-mcp": {
"env": {
"PERPLEXITY_API_KEY": "XXXXXXXXXXXXXXXXXXXX",
"PERPLEXITY_MODEL": "sonar"
},
"command": "uvx",
"args": [
"perplexity-mcp"
]
}Search the web using Perplexity AI. Requires a query string and an optional recency filter (day, week, month, year). Returns web search results from Perplexity's API.