An open API service indexing awesome lists of open source software.

https://github.com/retospect/perplexity-sonar-mcp

Python MCP server for Perplexity Sonar web search — 3 tools: web_search, web_ask, deep_research
https://github.com/retospect/perplexity-sonar-mcp

mcp mcp-server model-context-protocol perplexity python web-search

Last synced: 4 months ago
JSON representation

Python MCP server for Perplexity Sonar web search — 3 tools: web_search, web_ask, deep_research

Awesome Lists containing this project

README

          

# perplexity-sonar-mcp

Tiny Python MCP server for Perplexity web search — 3 tools with escalating depth.

## Tools

| Tool | Speed | Use for |
|------|-------|---------|
| `web_search(query)` | 2-5s | Quick facts, simple lookups |
| `web_ask(query)` | 5-15s | Thorough answers, literature discovery |
| `deep_research(query)` | 2-10 min | Comprehensive multi-step analysis |

Both `web_search` and `web_ask` accept optional `focus` (`"academic"`, `"finance"`) and `recency` (`"day"`, `"week"`, `"month"`, `"year"`) parameters.

## Setup

```bash
pip install -e .
export PERPLEXITY_API_KEY=pplx-...
perplexity-sonar-mcp # starts stdio MCP server
```

## MCP client config

```json
{
"name": "perplexity",
"cmd": ["perplexity-sonar-mcp"],
"env": {"PERPLEXITY_API_KEY": "pplx-..."}
}
```