Perplexity Web API

v0.11.0โ€ขSearch & Data Extractionโ€ขstable

๐Ÿ” Perplexity AI MCP without API key

aiclaude-desktopcodexcursor-aimcp
Share:
74
Stars
0
Downloads
0
Weekly
0/5

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

AI-powered web search without API key
Real-time information retrieval for agents
mishamyrt

Maintainer

LicenseMIT
Languagerust
Versionv0.11.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y perplexity-web-api-mcp

Manual Installation

npx -y perplexity-web-api-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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'.

2

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-mcp
3

Configure 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"
      }
    }
  }
}
4

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"]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "perplexity-web-api": { "command": "npx", "args": ["-y", "perplexity-web-api-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides