Database · MODEL CONTEXT PROTOCOL
nachoal perplexity mcp
A perplexity MCP server
WHAT IT CONNECTS
What nachoal perplexity mcp gives an AI Agent
- Search the web with Perplexity's powerful search capabilities
- Get comprehensive search results with sources and citations
- Filter results by time period (day, week, month, year)
- Includes a ready-to-use prompt template for web searches
- Supports loading API key from environment variables or .env file
- Clone this repository
- Install dependencies:
- Visit [Perplexity API Settings](https://www.perplexity.ai/settings/api)
- Create an account if you don't have one
- Generate an API key
- Edit your Claude Desktop configuration file:
- On macOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
- Add the following configuration:
- Restart Claude Desktop
- "Search the web for the latest news about artificial intelligence"
- "Use Perplexity to find information about climate change published in the past week"
- "Search for recent research papers on quantum computing from the past month"
- `query`: The search query string
- `recency`: Filter results by time period - 'day', 'week', 'month' (default), or 'year'
- A detailed summary of the search results
- Key facts and information found
- Sources with URLs for verification
- Any conflicting information if present
- `query`: The search query
- `recency`: Time period filter - 'day', 'week', 'month' (default), or 'year'
- Search for the specified query
- Focus on results from the specified time period
- Summarize key findings
- Highlight important facts
- Mention conflicting information
- Cite sources with links
SECURITY
An MCP listing is not a security review
An MCP server may receive model context, credentials, local files, or permission to call external systems. Review its code, requested environment variables, network behavior, package provenance, and maintenance status before connecting it to an agent.
README
Repository documentation
A simple MCP (Model Context Protocol) server that provides web search functionality using the Perplexity API. This server allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information.
- Search the web with Perplexity's powerful search capabilities
- Get comprehensive search results with sources and citations
- Filter results by time period (day, week, month, year)
- Includes a ready-to-use prompt template for web searches
- Supports loading API key from environment variables or .env file
- Clone this repository
- Install dependencies:
or
pip install -e .uv pip install -e .
You can set the PERPLEXITY_API_KEY environment variable with your Perplexity API key:
export PERPLEXITY_API_KEY="your-api-key-here"Alternatively, you can create a .env file in the project root with the following content:
PERPLEXITY_API_KEY=your-api-key-here
A sample .env.example file is provided for reference.
To get a Perplexity API key:
- Visit Perplexity API Settings
- Create an account if you don't have one
- Generate an API key
python server.pyYou can test the server functionality without running the full MCP server using the included test script:
python test_server.py "your search query here" --recency monthOptions for --recency are: day, week, month (default), year
-
Edit your Claude Desktop configuration file:
- On macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%/Claude/claude_desktop_config.json
- On macOS:
-
Add the following configuration:
{ "perplexity-mcp": { "env": { "PERPLEXITY_API_KEY": "your-api-key-here" }, "command": "python", "args": [ "/path/to/server.py" ] } } -
Restart Claude Desktop
- "Search the web for the latest news about artificial intelligence"
- "Use Perplexity to find information about climate change published in the past week"
- "Search for recent research papers on quantum computing from the past month"
Search the web using Perplexity API and return results.
Parameters:
query: The search query stringrecency: Filter results by time period - 'day', 'week', 'month' (default), or 'year'
Returns: A comprehensive text response containing:
- A detailed summary of the search results
- Key facts and information found
- Sources with URLs for verification
- Any conflicting information if present
Creates a prompt template for searching the web with Perplexity.
Parameters:
query: The search queryrecency: Time period filter - 'day', 'week', 'month' (default), or 'year'
Returns: A formatted prompt string that instructs the AI to:
- Search for the specified query
- Focus on results from the specified time period
- Summarize key findings
- Highlight important facts
- Mention conflicting information
- Cite sources with links
MIT
COMMUNITY