
Claude Prompt Optimizer
This is a prompt quality gate that runs entirely client-side with zero LLM calls. It scores prompts across five dimensions, detects vague objectives and missing constraints through 14 deterministic rules, routes tasks to the right model tier, and estimates token costs across ten providers before you send anything. The MCP exposes optimize_prompt to compile structured prompts with blocking questions, refine_prompt to iteratively improve them, and approve_prompt to lock in the final version. It's designed for the approval loop: analyze your prompt, surface ambiguities, show you what changed, then require explicit sign-off before execution. Useful when you need guardrails on prompt quality or want to catch structural gaps before burning tokens on underspecified requests.
- GitHub stars
- 1
- tools
- 20
- transport
- STDIO
- env vars
- 2
- last updated
- Feb 27, 2026
Tools
20 toolsPublic tool metadata for what this MCP can expose to an agent.
pre_flightThe lead tool. Classify, assess risk, route model, score quality: one call, full analysis
The lead tool. Classify, assess risk, route model, score quality: one call, full analysis
No parameter schema in public metadata yet.
optimize_promptFull pipeline. Analyze, score, compile, estimate cost, surface blocking questions, return PreviewPack
Full pipeline. Analyze, score, compile, estimate cost, surface blocking questions, return PreviewPack
No parameter schema in public metadata yet.
refine_promptIterative: answer questions, add edits, get updated PreviewPack
Iterative: answer questions, add edits, get updated PreviewPack
No parameter schema in public metadata yet.
approve_promptSign-off gate: returns final compiled prompt
Sign-off gate: returns final compiled prompt
No parameter schema in public metadata yet.
check_promptLightweight pass/fail + score + top 2 issues
Lightweight pass/fail + score + top 2 issues
No parameter schema in public metadata yet.
estimate_costMulti-provider token + cost estimator (Anthropic, OpenAI, Google, Perplexity)
Multi-provider token + cost estimator (Anthropic, OpenAI, Google, Perplexity)
No parameter schema in public metadata yet.
compress_contextPrune irrelevant context, report token savings
Prune irrelevant context, report token savings
No parameter schema in public metadata yet.
classify_taskClassify prompt by task type, reasoning complexity, risk, and suggested profile
Classify prompt by task type, reasoning complexity, risk, and suggested profile
No parameter schema in public metadata yet.
route_modelRoute to optimal model with decision_path audit trail
Route to optimal model with decision_path audit trail
No parameter schema in public metadata yet.
prune_toolsScore and rank MCP tools by task relevance, optionally prune low-relevance tools
Score and rank MCP tools by task relevance, optionally prune low-relevance tools
No parameter schema in public metadata yet.
configure_optimizerSet mode, threshold, strictness, target, lock/unlock config with passphrase
Set mode, threshold, strictness, target, lock/unlock config with passphrase
No parameter schema in public metadata yet.
get_usageUsage count, limits, remaining, tier info
Usage count, limits, remaining, tier info
No parameter schema in public metadata yet.
prompt_statsAggregates: total optimized, avg score, top task types, cost savings
Aggregates: total optimized, avg score, top task types, cost savings
No parameter schema in public metadata yet.
set_licenseActivate a Pro or Power license key (Ed25519 offline validation)
Activate a Pro or Power license key (Ed25519 offline validation)
No parameter schema in public metadata yet.
license_statusCheck license status, tier, expiry. Shows purchase link if free tier.
Check license status, tier, expiry. Shows purchase link if free tier.
No parameter schema in public metadata yet.
list_sessionsList session history (metadata only, no raw prompts)
List session history (metadata only, no raw prompts)
No parameter schema in public metadata yet.
export_sessionFull session export with rule-set hash + policy hash for reproducibility
Full session export with rule-set hash + policy hash for reproducibility
No parameter schema in public metadata yet.
delete_sessionDelete a single session by ID
Delete a single session by ID
No parameter schema in public metadata yet.
purge_sessionsBulk purge by age policy, with dry-run + keep_last safety
Bulk purge by age policy, with dry-run + keep_last safety
No parameter schema in public metadata yet.
save_custom_rulesSave custom governance rules built in the Enterprise Console
Save custom governance rules built in the Enterprise Console
No parameter schema in public metadata yet.
Sponsors
Configuration
PROMPT_OPTIMIZER_PROSet to 'true' to enable Pro tier via environment variable (alternative to license key)
PROMPT_OPTIMIZER_LOG_LEVELLog verbosity level: debug, info, warn, error
Readme
Prompt Control Plane
The control plane for AI prompts. Score, enforce policy, lock config, and audit every prompt decision. Free tier included.
Quick Start
# Install globally (requires Node.js 20+)
npm install -g pcp-engine
# Pre-flight: classify, score, route, and enforce policy in one call
pcp preflight "your prompt here" --json
# Run the guided demo
pcp demo
Two powerhouse commands:
Details
- Repository
- github.com/rishiatlan/claude-prompt-optimizer-mcp
- Category
- AI & LLM Tools
- Package
claude-prompt-optimizer-mcp- Transport
- STDIO
- Registry
- MCP registry, active