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
- Host: GitHub
- URL: https://github.com/retospect/perplexity-sonar-mcp
- Owner: retospect
- License: mit
- Created: 2026-03-10T19:19:17.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-04-02T19:55:32.000Z (4 months ago)
- Last Synced: 2026-04-03T06:44:53.783Z (4 months ago)
- Topics: mcp, mcp-server, model-context-protocol, perplexity, python, web-search
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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-..."}
}
```