Skip to content

Releases: zalez/perplexity-agent-mcp

v0.3.1 — registry listing

Choose a tag to compare

@zalez zalez released this 28 Jul 07:20
fd93610

Patch release. v0.3.0 published both PyPI packages successfully but its MCP Registry entry was rejected on the final step: description was 130 characters against a documented 100-character limit.

Fixed

  • server.json description shortened to fit.
  • tests/test_docs_version_pins.py now validates server.json against every documented registry constraint — required fields, all four length limits, the name pattern — so the next one fails in CI rather than after both packages are published and unrepublishable.

The v0.3.0 tag was deliberately not moved: it is what CI validated and what the PyPI 0.3.0 artifacts were built from.

Now live

uvx perplexity-agent-mcp                 # the MCP server
llm install llm-perplexity-agent         # the llm CLI plugin

Listed in the MCP Registry as io.github.zalez/perplexity-agent-mcp.

v0.2.0 — optional llm plugin

Choose a tag to compare

@zalez zalez released this 26 Jul 10:58

The same Perplexity Agent client, now reachable two ways: as an MCP server, and as a model for Simon Willison's llm CLI.

llm install 'perplexity-agent-mcp[llm] @ git+https://github.com/zalez/perplexity-agent-mcp@v0.2.0'
llm keys set perplexity        # skip if already set for llm-perplexity
llm -m perplexity-agent 'What changed in MCP 2026-07-28?'

The MCP server is unchanged in how you use it, and still has zero runtime dependencies. The llm adapter is an optional extra the server never imports.

Why this exists

llm has no MCP support — simonw/llm#696 has been open since January 2025 — and the existing llm-perplexity plugin wraps the older Sonar chat models rather than the Agent API. That is the same gap this project already filled for MCP, in a different tool.

It is a second adapter on the same core, not a fork: bands 1–3 of perplexity_agent_mcp.py were already a complete Perplexity Agent client, so every API quirk, retry rule, redirect refusal and payload bound is shared between the two.

Added

  • llm -m perplexity-agent, with -o preset, -o recency, -o domains, -o timeout, -o spotlight
  • Poll progress on stderr, so a long run does not look hung and the answer still pipes cleanly
  • Reuses an existing llm keys set perplexity, and falls back to PERPLEXITY_API_KEY — no extra configuration either way

Changed

  • Importing the server no longer claims the process's stdout. The sys.stdout rebind moved from import time into main(). Importing used to redirect the importing program's entire output to stderr — harmless for the server, fatal for anything reusing the client. The guarantee for the server is unchanged.
  • Build backend is setuptools, was flit_core. flit builds one module per distribution and this project now ships two. setuptools is the only backend that keeps the property flit was chosen for: one package, zero transitive dependencies.
  • Truncated source URLs keep both ends, so two long citations from the same site no longer render identically.

Fixed

  • perplexity_agent_cancel no longer implies a cancellation it cannot confirm — Perplexity returns an identical HTTP 400 whether a run already finished or the id never existed.

Verification

190 tests, green on Python 3.10–3.14. All 9 CI jobs green against this tag, including a job that installs the llm extra and fails if the adapter tests skip.

Full notes in CHANGELOG.md.

v0.1.0 — first release

Choose a tag to compare

@zalez zalez released this 23 Jul 13:24
524b566

A single-file, zero-third-party-dependency MCP server exposing Perplexity's Agent API (POST /v1/agent) — multi-step web research with citations — to any MCP client over stdio.

Python standard library only: no MCP SDK, no HTTP library, nothing generated at build time. The audit boundary is exactly one file.

Tools

Tool What it does
perplexity_agent Start a research run. Blocks for the answer, or returns a response_id with wait: false.
perplexity_agent_result Collect a run. Reports real progress while it is still going.
perplexity_agent_cancel Ask Perplexity to stop a run you no longer need.

Install

Both paths ship the same bytes. See the README for the trust-chain comparison and the full config.

{
  "mcpServers": {
    "perplexity-agent": {
      "command": "/absolute/path/to/uvx",
      "args": ["--from", "git+https://github.com/zalez/perplexity-agent-mcp@v0.1.0",
               "perplexity-agent-mcp"],
      "env": { "PERPLEXITY_API_KEY": "pplx-…" }
    }
  }
}

Verification

158 tests (stdlib unittest, no install step), green on Python 3.10–3.14. Every acceptance criterion exercised against the live API.

Security posture, including the prompt-injection mitigation and its limits, is documented honestly in SECURITY.md.