Skip to main content
Glama
README.md
# PPX-MCP

**Unofficial** MCP server for Perplexity AI with real-time web search.

Uses your Perplexity Pro subscription instead of the Perplexity API — no API keys needed, just your browser cookies. Supports model selection including GPT-5.1, Claude 4.5, Gemini, Grok, and more.

> ⚠️ **Disclaimer:** This is an unofficial project and is not affiliated with, endorsed by, or associated with Perplexity AI in any way.

## Platform Support

| Platform | Status |
|----------|--------|
| Windows + Chrome | ✅ Tested |
| macOS / Linux | ⚠️ Untested — may need tweaks |

The login tool requires Chrome to be installed. On non-Windows platforms, you may need to manually set cookies or adjust the Chrome path in the code.

## Installation

```bash
npm install -g ppx-sub-mcp
```

Or run directly with npx:
```bash
npx ppx-sub-mcp
```

## Usage with Kiro / Claude Desktop

Add to your MCP config:

```json
{
  "mcpServers": {
    "ppx": {
      "command": "npx",
      "args": ["ppx-sub-mcp"]
    }
  }
}
```

Cookies are stored in `~/.ppx-mcp/settings.json` (persists across updates).

## Tools

| Tool | Description |
|------|-------------|
| `perplexity_ask` | Ask Perplexity AI with web search |
| `perplexity_list_models` | List available models |
| `perplexity_login` | Open browser to log in and auto-save cookies |
| `perplexity_status` | Check config and cookie status |

### perplexity_ask

| Parameter | Required | Description |
|-----------|----------|-------------|
| `query` | Yes | Question to ask |
| `model` | No | See models below (default: `sonar`) |

## Available Models

| Model | Description |
|-------|-------------|
| `sonar` | Sonar - Perplexity's fast model |
| `best` | Best - Auto-selects the best model |
| `research` | Research - Deep research |
| `gpt51` | GPT-5.1 - OpenAI's latest |
| `gpt51-thinking` | GPT-5.1 Thinking - With reasoning |
| `claude` | Claude 4.5 - Anthropic's newest |
| `claude-thinking` | Claude 4.5 Thinking - With reasoning |
| `gemini` | Gemini 3 Pro - Google's model |
| `grok` | Grok 4.1 - xAI's model |
| `kimi` | Kimi K2 - Moonshot's model |

## Getting Cookies

**Option 1: Use the login tool**
- Call `perplexity_login` — opens a browser window
- Log in to Perplexity
- Cookies are automatically saved

**Option 2: Manual**
1. Open Firefox → perplexity.ai → log in
2. DevTools (F12) → Network tab
3. Send a message
4. Find `perplexity_ask` request → copy Cookie header
5. Edit `settings.json` directly

## Credits

Inspired by [perplexity-webui-scraper](https://github.com/henrique-coder/perplexity-webui-scraper).

## License

MIT

This is an unofficial project and is not affiliated with Perplexity AI.

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: perplexity_ask is for querying, perplexity_list_models for listing models, perplexity_login for authentication, and perplexity_status for configuration checks. There is no overlap in functionality, making tool selection straightforward for an agent.

Naming Consistency5/5

All tool names follow a consistent 'perplexity_' prefix with descriptive action suffixes (ask, list_models, login, status). This uniform snake_case pattern ensures predictability and readability across the tool set.

Tool Count5/5

With 4 tools, the server is well-scoped for interacting with Perplexity AI, covering essential operations like querying, model listing, authentication, and status checks. Each tool earns its place without being overly sparse or bloated.

Completeness4/5

The tool set covers core functionalities for a Perplexity AI MCP server, including querying, model discovery, and authentication. A minor gap exists in lacking tools for managing sessions or handling errors, but agents can work around this with the provided tools.

Maintenance

ActivityInactive
ResponsivenessNo issues