Overview
Perplexity Web Search MCP Server is a simple Model Context Protocol (MCP) server that provides web search functionality using the Perplexity API, enabling AI assistants to access up-to-date information from the web.
To use the server, clone the repository, install the dependencies, set your Perplexity API key, and run the server using the provided commands. You can also test the server functionality with a test script.
- Powerful web search capabilities using the Perplexity API - Comprehensive search results with sources and citations - Filtering of results by time period (day, week, month, year) - Ready-to-use prompt template for web searches - Support for loading API key from environment variables or a .env file
- Integrating web search functionality into AI assistants like Claude.
- Retrieving the latest news and research on various topics.
- Providing users with accurate and up-to-date information from the web.
Add to your AI client
Use these steps to connect Perplexity Web Search 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-nachoal": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}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-nachoal": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"perplexity-mcp-nachoal": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}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-nachoal": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"perplexity-mcp-nachoal": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"perplexity-mcp-nachoal": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-perplexity-mcp-nachoal"
]
}
}
}FAQ
How do I get a Perplexity API key?
Visit the Perplexity API Settings, create an account, and generate an API key.
Can I filter search results by time?
Yes! You can filter results by day, week, month, or year.
Is there a test script available?
Yes! A test script is included to test the server functionality without running the full server.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2316,"uuid":"7126c10d-ddbf-4bb4-b8b1-9b900f55d555","name":"perplexity-mcp","title":"Perplexity Web Search MCP Server","description":"A perplexity MCP server","avatar_url":"https://avatars.githubusercontent.com/u/3743461?v=4","created_at":"2025-03-09T07:31:57.349Z","updated_at":"2025-03-12T10:21:15.496Z","status":"created","author_name":"nachoal","author_avatar_url":"https://avatars.githubusercontent.com/u/3743461?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/nachoal/perplexity-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"7\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-05 23:43:31\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]