Perplexity Web API
๐ Perplexity AI MCP without API key
What is Perplexity Web API?
Perplexity Web API is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ perplexity ai mcp without api key
๐ Perplexity AI MCP without API key
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ Perplexity AI MCP without API key
Use Cases
Maintainer
Works with
Installation
NPM
npx -y perplexity-web-api-mcpManual Installation
npx -y perplexity-web-api-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Perplexity Web API
The Perplexity Web API MCP Server gives AI assistants access to Perplexity AI's search and reasoning capabilities without requiring a Perplexity API key, by leveraging browser session tokens from an existing Perplexity account. It exposes four tools: a quick web search returning links and snippets, a comprehensive Q&A tool with source citations, an advanced reasoning tool for complex analysis, and a deep research tool for thorough multi-source investigations. A tokenless mode allows basic search and Q&A with the turbo model even without any credentials, making it immediately usable.
Prerequisites
- Node.js 18 or higher installed (for npx execution)
- A Perplexity.ai account (free tier works for basic access)
- PERPLEXITY_SESSION_TOKEN and PERPLEXITY_CSRF_TOKEN extracted from your browser cookies (required for reasoning and research tools; optional for basic search)
- An MCP-compatible client such as Claude Desktop, Cursor, or Claude Code
Extract your Perplexity session tokens (optional but recommended)
Log into 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'.
Install via npx (no pre-installation needed)
The server runs directly via npx. Test it from the command line to confirm it works before adding it to your MCP client.
npx -y perplexity-web-api-mcpConfigure Claude Desktop with session tokens
Add the server to claude_desktop_config.json with your session and CSRF tokens for full access to all four tools.
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"],
"env": {
"PERPLEXITY_SESSION_TOKEN": "your-session-token",
"PERPLEXITY_CSRF_TOKEN": "your-csrf-token"
}
}
}
}Configure for tokenless mode (basic access)
If you do not want to use session tokens, omit the env block entirely. The perplexity_search and perplexity_ask tools will work with the turbo model in this mode.
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"]
}
}
}Optionally configure model selection
Set PERPLEXITY_ASK_MODEL to choose your preferred model for the perplexity_ask tool. Available options include turbo, pro-auto, sonar, gpt-5.4, claude-4.6-sonnet, and nemotron-3-super.
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"],
"env": {
"PERPLEXITY_SESSION_TOKEN": "your-session-token",
"PERPLEXITY_CSRF_TOKEN": "your-csrf-token",
"PERPLEXITY_ASK_MODEL": "pro-auto",
"PERPLEXITY_REASON_MODEL": "gpt-5.4-thinking"
}
}
}
}Perplexity Web API Examples
Client configuration
Full configuration for claude_desktop_config.json with session tokens and model selection.
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"],
"env": {
"PERPLEXITY_SESSION_TOKEN": "your-session-token",
"PERPLEXITY_CSRF_TOKEN": "your-csrf-token",
"PERPLEXITY_ASK_MODEL": "pro-auto",
"PERPLEXITY_INCOGNITO": "true"
}
}
}
}Prompts to try
Use these prompts to invoke the four Perplexity tools โ search, ask, reason, and research โ through your AI assistant.
- "Search the web for the latest news about the EU AI Act and give me links to the top sources"
- "Ask Perplexity: What are the key differences between RAG and fine-tuning for LLM applications? Include citations."
- "Use Perplexity reasoning to help me decide whether to use PostgreSQL or MongoDB for a high-write-throughput event logging system"
- "Do deep research on the current state of quantum computing hardware and write me a 500-word summary with sources"Troubleshooting Perplexity Web API
perplexity_reason and perplexity_research return errors about missing credentials
These tools require valid session tokens. Extract PERPLEXITY_SESSION_TOKEN from the '__Secure-next-auth.session-token' cookie and PERPLEXITY_CSRF_TOKEN from the 'next-auth.csrf-token' cookie in your browser's Developer Tools while logged into perplexity.ai.
Session tokens stop working after a few days
Perplexity session cookies expire with inactivity or when you log out. Re-extract fresh token values from your browser's Developer Tools after logging back into perplexity.ai and update the env block in your config.
File attachment features do not work
File attachments (.txt, .pdf, .docx) require both PERPLEXITY_SESSION_TOKEN and PERPLEXITY_CSRF_TOKEN to be set and valid. Tokenless mode does not support attachments.
Frequently Asked Questions about Perplexity Web API
What is Perplexity Web API?
Perplexity Web API is a Model Context Protocol (MCP) server that ๐ perplexity ai mcp without api key It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Perplexity Web API?
Install via npm with the command: npx -y perplexity-web-api-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Perplexity Web API?
Perplexity Web API works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Perplexity Web API free to use?
Yes, Perplexity Web API is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Perplexity Web API Alternatives โ Similar Search & Data Extraction Servers
Looking for alternatives to Perplexity Web API? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
โ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
โ 52.7k๐ท๏ธ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
โ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - ๅบไบ AI ๅฎๆดไฟ็ๆ็็ PDF ๆๆกฃๅ จๆๅ่ฏญ็ฟป่ฏ๏ผๆฏๆ Google/DeepL/Ollama/OpenAI ็ญๆๅก๏ผๆไพ CLI/GUI/MCP/Docker/Zotero
GPT Researcher
โ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
โ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu โ one CLI, zero API fees.
Xiaohongshu
โ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Perplexity Web API in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Perplexity Web API?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.