perplexity-web-api-mcp
by mishamyrt·★ 72·Score 46
An MCP server that provides access to Perplexity AI search and reasoning without requiring API keys by using session tokens.
Overview
This MCP server enables developers to integrate Perplexity AI's powerful search, research, and reasoning capabilities directly into their AI applications. It supports multiple authentication modes including full authentication with session tokens and a tokenless mode for basic functionality. The server is built in Rust and offers multiple installation options including direct npm installation, Docker, and configuration for various AI clients like Claude Desktop, Cursor, and VS Code. It exposes four main tools: perplexity_search (web links only), perplexity_ask (comprehensive answers), perplexity_reason (advanced reasoning), and perplexity_research (in-depth analysis).
Try asking AI
After installing, here are 6 things you can ask your AI assistant:
When to choose this
Choose this when you want to access Perplexity's search capabilities without paying for their API, especially if you already have a Perplexity account.
When NOT to choose this
Avoid if you need high-volume commercial use or require stable API access, as it depends on web scraping that could break with UI changes.
Tools this server exposes
4 tools extracted from the READMEperplexity_searchQuick web search returning links, titles, and snippets
perplexity_askAsk Perplexity AI a question and get a comprehensive answer with citations
perplexity_reasonAdvanced reasoning and problem-solving with step-by-step analysis
perplexity_researchDeep, comprehensive research using sonar-deep-research model
Comparable tools
Installation
Installation
**NPM Installation (Recommended)**
npm install -g perplexity-web-api-mcp**Docker**
docker run -d -p 8080:8080 -e PERPLEXITY_SESSION_TOKEN="your-token" mishamyrt/perplexity-web-api-mcp**Claude Desktop Configuration** Add to claude_desktop_config.json:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"],
"env": {
"PERPLEXITY_SESSION_TOKEN": "your-session-token",
"PERPLEXITY_CSRF_TOKEN": "your-csrf-token"
}
}
}
}**Tokenless Mode**: Omit the environment variables above to use basic functionality without authentication.
FAQ
- Do I need a Perplexity Pro subscription to use this MCP server?
- No, you can use either a free Perplexity account or a Pro subscription. The server uses your existing account through session tokens, so you don't need to pay for API access separately.
- How do I get the authentication tokens?
- Log in to perplexity.ai in your browser, open Developer Tools (F12), go to Application → Cookies → https://www.perplexity.ai, and copy the values of __Secure-next-auth.session-token and next-auth.csrf-token.
- What's the difference between tokenless mode and authenticated mode?
- In tokenless mode, only perplexity_search and perplexity_ask (with turbo model) are available. Authenticated mode grants access to perplexity_research, perplexity_reason, model selection, and file attachments.
Compare perplexity-web-api-mcp with
Last updated · Auto-generated from public README + GitHub signals.