Content
# Perplexity MCP Server via Polza.ai
`mcp-name: io.github.ivanantigravity-lgtm/perplexity-polza-mcp-server`
MCP server for `Claude Desktop` and `Claude Code`, which interacts with Perplexity models (`Sonar`, `Sonar Pro`, `Sonar Reasoning`, `Sonar Deep Research`) through the aggregator [Polza.ai](https://polza.ai).
## Features
- `perplexity_model_guide` — a cheat sheet for choosing a model for a task
- `perplexity_ask` — a regular question in Perplexity
- `perplexity_research` — more in-depth research with web search
- `list_perplexity_models` — a list of available `perplexity/*` models from the Polza catalog
## Requirements for Installation
- `Claude Desktop` or `Claude Code` (or any other MCP client)
- [`uv`](https://docs.astral.sh/uv/) (installs with one command, see below)
- Python 3.11+
- `POLZA_AI_API_KEY` — key taken from [polza.ai/dashboard/api-keys](https://polza.ai/dashboard/api-keys)
Install `uv`:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
## Installation in 2 Minutes (via PyPI + uvx)
This is the easiest way: no need to clone anything, `uvx` will download the package from PyPI.
### Claude Code / VS Code
Create a file `.mcp.json` in the root of your project:
```json
{
"mcpServers": {
"perplexity-polza": {
"command": "uvx",
"args": ["perplexity-polza-mcp-server@latest"],
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here"
}
}
}
}
```
Restart Claude Code — done.
### Claude Desktop (macOS)
Open the file `~/Library/Application Support/Claude/claude_desktop_config.json` and add:
```json
{
"mcpServers": {
"perplexity-polza": {
"command": "uvx",
"args": ["perplexity-polza-mcp-server@latest"],
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here"
}
}
}
}
```
Restart Claude Desktop.
### Claude Desktop (Windows)
File: `%APPDATA%\Claude\claude_desktop_config.json`. The content is the same as on macOS.
## How to Check if it Works
After restarting Claude, ask:
> Show available Perplexity models through polza
Claude should call the `list_perplexity_models` tool and return a list.
## Choosing a Model
- `Sonar` — fast search + answer. News, facts, Q&A, short summaries.
- `Sonar Pro` — denser structure, comparisons, follow-up questions.
- `Sonar Pro Search` — deeper search, more search steps.
- `Sonar Reasoning Pro` — not just find, but analyze and make a conclusion.
- `Sonar Deep Research` — full-fledged research, market scan, long report.
You can switch the default model using environment variables `PERPLEXITY_MODEL` and `PERPLEXITY_RESEARCH_MODEL` — the full list below.
## Environment Variables
| Variable | Required | Default | Description |
| --- | --- | --- | --- |
| `POLZA_AI_API_KEY` | yes | — | Key from polza.ai |
| `POLZA_BASE_URL` | no | `https://polza.ai/api/v1` | Base URL for chat completions (with `/v1` — it's expected, endpoint OpenAI-compatible) |
| `PERPLEXITY_MODEL` | no | `perplexity/sonar` | Model for `perplexity_ask` |
| `PERPLEXITY_RESEARCH_MODEL` | no | `perplexity/sonar-deep-research` | Model for `perplexity_research` |
| `LOG_LEVEL` | no | `INFO` | — |
## Local Development
```bash
git clone https://github.com/ivanantigravity-lgtm/perplexity-polza-mcp-server.git
cd perplexity-polza-mcp-server
uv sync
POLZA_AI_API_KEY=your_key uv run python -m perplexity_polza_mcp_server.server
```
For local connection from source in Claude:
```json
{
"mcpServers": {
"perplexity-polza-local": {
"command": "uv",
"args": ["run", "python", "-m", "perplexity_polza_mcp_server.server"],
"cwd": "/absolute/path/to/perplexity-polza-mcp-server",
"env": {
"POLZA_AI_API_KEY": "your-polza-api-key-here"
}
}
}
}
```
## Under the Hood
- Chat completions: `POST https://polza.ai/api/v1/chat/completions` (OpenAI-compatible format)
- Model catalog: `GET https://polza.ai/api/v1/models/catalog`
## Important Files in the Repository
- `pyproject.toml` — package metadata and entry points
- `server.json` — description for MCP Registry
- `fastmcp.json` — local configuration for FastMCP
- `.github/workflows/publish-pypi.yml` — publication in PyPI via GitHub Actions
## License
MIT.