@lazymac/prompt-lint-mcp
v1.0.0
Published
ESLint-style static analysis for LLM prompts. Detects ambiguous instructions, contradicting rules, missing examples, token waste, role confusion, and more — before you spend a single API call.
Downloads
82
Maintainers
Readme
Prompt Lint MCP
Prompt Lint MCP is an ESLint-style static analyzer for LLM prompts. It detects ambiguous instructions, contradictory directives, missing JSON schemas, excessive negation, role confusion, token waste, privacy risks, and other prompt quality problems before a model call is made.
Why This Exists
Prompt failures are expensive because they often show up after model calls, failed automations, or broken downstream parsers. A lightweight lint pass catches common quality issues early. This server is deterministic, local, and fast. It does not call an LLM. It simply inspects prompt text and returns machine-readable issues with severity and suggested fixes.
Tools
lint_promptreturns issues, score, and suggestions for a prompt.score_onlyreturns a numeric score when an agent only needs a gate.list_rulesreturns all rule IDs with severity and description.explain_ruleexplains one rule so users can understand why a prompt was flagged.
Rule Coverage
The current rule set includes hedging words, contradictory directives, JSON-without-schema, politeness bloat, negation overload, mixed role voice, missing examples, wall-of-text structure, redundant repetition, unbounded output length, creativity-versus-strict-format conflict, and PII leak risk. The rules are intentionally explainable rather than opaque.
Usage
npm install
node index.jsExample:
{
"prompt": "Please maybe output JSON about the customer, be brief but very detailed.",
"options": {"min_score": 80}
}An agent can use the result to block a prompt change, rewrite the prompt, or route risky prompts to human review.
Monetization Path
This server is ready for MCPize distribution as a prompt quality gate. It is useful for teams running prompt libraries, daily generated policies, support bots, or autonomous coding agents. The buyer value is fewer failed generations, lower token waste, and safer structured output.
