Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/zalez/perplexity-agent-mcp/claude-mdgit clone --depth 1 https://github.com/zalez/perplexity-agent-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/zalez/perplexity-agent-mcp/claude-md)<a href="https://agentmods.dev/instructions/zalez/perplexity-agent-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/zalez/perplexity-agent-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.05403 | $0.05403 |
| Opus 5 | $0.02701 | $0.02701 |
| Sonnet 5 | $0.01081 | $0.01081 |
| Haiku 4.5 | $0.00540 | $0.00540 |
Grade A, and why
perplexity-agent-mcp CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
ergonomic than `urllib.request`. This project's entire pitch is **zero How it starts
The opening of the file, as written. The whole thing — 287 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working on perplexity-agent-mcp
This file is guardrails for an agent contributing to this repository, not a summary of what it does — read README.md for that. It exists because this project has a specific, easy-to-trip failure mode: a well-intentioned change that looks like an obvious improvement and quietly breaks the one property the whole repo exists to have. Two concrete examples that would each pass a casual glance:
- Adding
requests(or any other third-party package) because it's more ergonomic thanurllib.request. This project's entire pitch is zero runtime dependencies — see SECURITY.md for why that's a security property, not a style preference. - Adding a
print()for debugging and forgetting to remove it, or having any code path write to the real stdout. stdout is the JSON-RPC protocol stream; one stray line corrupts it, and the client-side symptom is a baffling parse error, not an obvious crash.
Both are mechanically caught before merge (tests/test_no_dependencies.py;
the stdout-rebind + tests/test_no_secrets.py), but catching a mistake in
CI is worse than not making it. This file exists so you don't make it.
Also read: CONTRIBUTING.md for the contributor workflow,
SECURITY.md for the full threat model, and
docs/specs/2026-07-22-perplexity-agent-mcp-design.md
for the original design rationale. If any of those, or this file, disagree
with perplexity_agent_mcp.py itself, the code is correct and the doc is
stale — fix the doc, don't trust it over the source.
1. Hard invariants
Every one of these applies to every change, no exceptions without discussing it with the maintainer first. Quoted from the implementation plan's Global Constraints:
- Zero third-party runtime dependencies in the server, and no extras
either. stdlib only. No
requirements.txt, no MCP SDK, nopip installfor users. Thellmadapter has dependencies, but it is a separate distribution built fromllm-plugin/— installing the server never pulls it in. Enforced bytests/test_no_dependencies.py, which allows the adapter exactly two dependencies and the server none. - Python floor
>=3.10. Nomatchstatements requiring 3.11+, notomllibin the server itself (3.11+), no PEP 695 generics. Develop on 3.14.6; CI matrix covers 3.10–3.14. - Single outbound host:
https://api.perplexity.aionly. Hardcoded constant. No environment-variable base-URL override — it is an API-key exfiltration vector (SECURITY.md §Network). - The API key is never printed, logged, echoed, or attached to an
exception. Read from
PERPLEXITY_API_KEYat call time, not import time. - stdout is exclusively JSON-RPC. All logging goes to stderr.
main()calls_claim_stdout(), which grabs the real stdout and pointssys.stdoutat stderr. It is deliberately NOT an import-time side effect: thellmadapter imports this module, and hijacking stdout on import would redirect that whole program's output. Don't move it back. - Two MCP protocol revisions, one process. Modern
2026-07-28(stateless, no handshake) and legacy2025-11-25/2025-06-18/2025-03-26. Era is decided per request, structurally — never by a flag, a setting, or state carried from an earlier request. The three precedence rules live aboveHANDLERSin the source; that comment is the authority, not this line. - Never error on version negotiation — in
initializeonly. Echo the requested legacy version on a match, else return2025-11-25. The modern path has the opposite rule and MUST return-32022for a revision it does not speak. Do not unify these two. They are pinned by tests from opposite sides precisely because unifying them looks like a tidy-up. 2026-07-28must never enterSUPPORTED_PROTOCOL_VERSIONS, which is the legacy-negotiable set. It is derived from the tail ofADVERTISED_PROTOCOL_VERSIONSso this is impossible rather than merely forbidden; keep the derivation.- Validation errors are
isError: true, never JSON-RPC-32602(SEP-1303 — see §3 below). - Line length 100. Ruff-formatted.
mypy --strictclean. Every public function annotated. - Comment density is high by design. This file's product is auditability; a reader must follow it top to bottom without cross-referencing.
- Copyright:
Copyright (c) 2026, Constantin Gonzalez. License: BSD-3-Clause. - Never claim cancellation reduces the bill — in code comments, tool descriptions, or docs.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed 5341c582f910
- 4d ago First seen · 287 lines · 5,403 tokens per session scan A 47c7d26b0e30
perplexity-agent-mcp CLAUDE.md is an instructions file published in the GitHub repository zalez/perplexity-agent-mcp (0 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 5,403 tokens to every session, about $0.0270 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
tmdb-mcp AGENTS.md
Instructions for Grinv/tmdb-mcp, covering agents.md, project shape, commands, conventions and testing the live/published server.
steam-games-mcp AGENTS.md
Instructions for Grinv/steam-games-mcp, covering agents.md, project shape, commands, conventions and testing the live/published server.
mal-mcp AGENTS.md
Instructions for Grinv/mal-mcp, covering agents.md, project shape, commands, conventions and testing the live/published server.
agentshare-mcp AGENTS.md
AGENTS.md instructions for anhmtk/agentshare-mcp, covering agentshare — briefing for ai agents (agents.md), when to select agentshare, fetch order (machine), mcp (production) and tools (12).
frame-check AGENTS.md
AGENTS.md instructions for lluvr/frame-check, covering agents.md, what this repo is, what goes in this repo, public canon discipline and what changes belong here.
tmdb-mcp CLAUDE.md
Instructions for Grinv/tmdb-mcp, a project described as: MCP server for The Movie Database (TMDB) with IMDb/Rotten Tomatoes/Metacritic ratings via OMDb.