poly-mcp

poly-mcp is a skill for Claude Code, Codex from Goldziher/poly. It costs 39 tokens per session (1,437 once invoked), scanned A, original, MIT.

An MCP server that lets a coding agent run poly's code checks through structured tools. It covers linting, formatting checks, rules, configuration, caching, and project-wide tasks.

In plain words
What is it for?
Use it to lint and check formatting, inspect active rules and merged configuration, review cache usage, and run poly's project-wide checks.
Why use it?
It gives the agent consistent machine-readable results without calling the command-line program directly. Read-only tools can inspect a codebase without changing files.

Skill for Claude CodeCodex

Part of the poly plugin — 5 skills, 2 commands, 2 agents shipped together

Install

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.

agentmods
npx agentmods add skills/goldziher/poly/poly-mcp
Any agent
npx skills add Goldziher/poly --skill poly-mcp
Clone the repo
git clone --depth 1 https://github.com/Goldziher/poly

Made for: Claude Code, Codex.

Or install poly, the plugin that ships this one along with the rest of its 5 skills, 2 commands, 2 agents.

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

agentmods badge for poly-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/goldziher/poly/poly-mcp.svg)](https://agentmods.dev/skills/goldziher/poly/poly-mcp)
Your own site
<a href="https://agentmods.dev/skills/goldziher/poly/poly-mcp"><img src="https://agentmods.dev/badge/skills/goldziher/poly/poly-mcp.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,437 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.01437
Opus 5 $0.00019 $0.00718
Sonnet 5 $0.00008 $0.00287
Haiku 4.5 $0.00004 $0.00144

Measured 4d ago against content hash eabea30fa00f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

poly-mcp scanned grade A with 0 findings 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 4d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai-rulez/skills/poly-mcp/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

poly MCP

poly mcp is a stdio MCP server exposing poly's lint/format/cache/rules/config surface as tools. Prefer it over shelling out to the CLI when working through MCP — every tool returns typed structured_content (with a declared output schema) plus one text block that mirrors the CLI's --format json, or the compact TOON encoding when asked.

poly mcp --config <PATH> pins a fallback config file for requests that do not name one.

Tool surface

Eleven tools, no more. Read-only (never touch the tree):

  • lint — run the linters and return diagnostics. Mirrors poly lint.
  • format_check — report formatting drift without writing. Mirrors poly fmt --check.
  • cache_stats — result-cache footprint (entries, bytes, format version) per namespace.
  • rules — list every ast-grep rule a run would apply — poly's built-in pack plus the user rules from [rules] dirs — and optionally run their *-test.yml snippets. Mirrors poly rules list / poly rules test. Each rule carries its language, source (builtin/user), default_severity, the severity it reports at under the resolved config, and enabled.
  • config_show — the merged effective configuration. Mirrors poly config show, and is network-free: remote extends bases are not fetched.
  • version — which poly binary is serving this session (version, build id, channel, executable, pid, uptime) and whether that executable is still the file on disk. It answers even when the binary has moved, which is what makes it the tool that explains why the others stopped.

Mutating (write to the tree):

  • lint_fix — apply lint autofixes. Mirrors poly lint --fix.
  • format_write — format files in place. Mirrors poly fmt --fix.
  • cache_clean — clear the result cache and report freed bytes.

Whole-project (long-running):

  • workspace_lint — the whole-project phase in check mode: cargo clippy / cargo-sort / cargo-machete / cargo-deny and configured inline whole-project jobs, over the whole repository (it takes no paths).
  • workspace_lint_fix — the same phase in fix mode; writes files.

Read the full file on GitHub · 107 lines

Changes

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.

  1. 4d ago First seen · 107 lines · 39 tokens per session scan A eabea30fa00f

Subscribe to this mod's changes

poly-mcp is a skill published in the GitHub repository Goldziher/poly (10 stars, last pushed 5d ago), licensed MIT. It adds 39 tokens to every session and 1,437 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.