Metadata-Version: 2.4
Name: perplexity-sonar-mcp
Version: 0.2.2
Summary: Tiny MCP server for Perplexity Sonar web search
Project-URL: Homepage, https://github.com/retospect/perplexity-sonar-mcp
Project-URL: Repository, https://github.com/retospect/perplexity-sonar-mcp
Author-email: Reto Stamm <reto@retostamm.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: mcp,perplexity,sonar,web-search
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.0
Description-Content-Type: text/markdown

# 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-..."}
}
```
