About Prompt Optimizer MCP
Prompt Optimizer MCP is an MCP server published by rishiatlan in the AI category: the prompt linter for LLM applications. Score, analyze, and standardize prompt quality. Open-source MCP server + Node.js API. Conduid read 20 tools from its source: approve_prompt, check_prompt, classify_task, compress_context, configure_optimizer, delete_session and 14 more. No package is published for it, so it installs from a source checkout.
The repository has 2 stars and 0 forks, is licensed MIT, and its last commit was on 30 Nov 2026. The latest release is v5.3.4 (18 Jun 2026): Security release: dependency remediation and audit cleanup.\n\n- Refreshed vulnerable root transitive dependencies behind the MCP SDK, including hono, @hono/node-server,… It follows v5.3.2 (6 Mar 2026), and the 5 most recent releases go back to v5.2.1 (4 Mar 2026). It passes 2 of the 3 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include context-compression, freemium, cost-reduction and lint.
Install
git clone https://github.com/rishiatlan/Prompt-Optimizer-MCPTools (20)
approve_promptApprove the compiled prompt. Returns the final optimized prompt ready for use.| Parameter | Type | Description |
|---|---|---|
| session_id * | string | Session ID from optimize_prompt |
check_promptQuick pass/fail check of a prompt. Returns score, top issues, and a suggestion. No compilation, no session.| Parameter | Type | Description |
|---|---|---|
| context | string | Optional context |
| raw_prompt * | string | The prompt to check |
classify_taskClassify a prompt by task type, reasoning complexity, risk level, and suggested profile. Free — no metering.| Parameter | Type | Description |
|---|---|---|
| context | string | Optional context: repo info, file contents, preferences |
| prompt * | string | The prompt to classify |
compress_contextCompress context (code, docs) by removing irrelevant sections. Returns pruned context with token savings.| Parameter | Type | Description |
|---|---|---|
| context * | string | The context text to compress |
| intent * | string | What the task is about — used to determine relevance |
configure_optimizerConfigure optimizer behavior: mode, threshold, strictness, default target, ephemeral mode, session limits. Supports config locking with passphrase protection.| Parameter | Type | Description |
|---|---|---|
| audit_log | boolean | Enable append-only JSONL audit trail (default: false) |
| auto_compile | boolean | Auto-compile prompts |
| default_target | string | Default output/provider target |
| ephemeral_mode | boolean | Ephemeral mode: sessions in-memory only |
| lock | boolean | Lock config — prevents changes until unlocked with the same secret |
| lock_secret | string | Passphrase to lock/unlock config (min 4 chars). Stored as SHA-256 hash only. |
| max_session_dir_mb | number | Max session directory size in MB |
| max_session_size_kb | number | Max session size in KB |
| max_sessions | number | Max session count |
| mode | string | Optimization mode |
| policy_mode | string | Policy enforcement mode (default: advisory) |
| session_retention_days | number | Auto-purge sessions older than N days (undefined = no auto-purge) |
| strictness | string | Strictness level |
| threshold | number | Quality threshold (0-100) |
| unlock | boolean | Unlock config — requires the same secret used to lock |
delete_sessionDelete a single optimization session by ID. Returns deleted status. Free tool, not metered.| Parameter | Type | Description |
|---|---|---|
| session_id * | string | Session ID to delete |
estimate_costEstimate token count and cost across providers for any prompt text. No session needed.| Parameter | Type | Description |
|---|---|---|
| prompt_text * | string | The prompt text to estimate cost for |
| target | string | Target platform for model recommendations |
export_sessionExport full session details including raw prompt. Free tool, not metered.| Parameter | Type | Description |
|---|---|---|
| session_id * | string | Session ID to export |
get_usageGet current usage count, limits, remaining quota, and tier information.license_statusCheck current license status, tier, and expiry. Returns purchase link if no license is active.list_sessionsList all optimization sessions with metadata (no raw prompts). Free tool, not metered.| Parameter | Type | Description |
|---|---|---|
| createdAfter | number | Only sessions created after this Unix timestamp |
| createdBefore | number | Only sessions created before this Unix timestamp |
| limit | number | Maximum number of sessions to return (default: 100, max: 100) |
optimize_promptAnalyze a raw prompt, detect ambiguities, compile an optimized version, score quality, and estimate cost across providers. Returns a PreviewPack for review.| Parameter | Type | Description |
|---|---|---|
| context | string | Optional context: repo info, file contents, preferences |
| raw_prompt * | string | The raw user prompt to optimize |
| target | string | Output/provider target: claude (XML), openai (system/user), google/perplexity/generic (markdown) |
pre_flightFull pre-flight analysis: classify task, assess risk, route model, score quality. Returns complete decision bundle. Metered — counts as 1 optimization use.| Parameter | Type | Description |
|---|---|---|
| budgetSensitivity | string | Budget sensitivity |
| context | string | Optional context |
| latencySensitivity | string | Latency sensitivity |
| profile | string | Optimization profile |
| prompt * | string | The prompt to analyze |
| target | string | Output/provider target |
prompt_statsGet aggregated optimization statistics: total count, average score, top task types, estimated savings.| Parameter | Type | Description |
|---|---|---|
| period | string | Stats period (Phase A: lifetime only) |
prune_toolsScore and rank MCP tools by relevance to a task intent. Optionally prune low-relevance tools to save context tokens.| Parameter | Type | Description |
|---|---|---|
| intent * | string | The task description or user intent to score tools against |
| mode | string | rank: score and sort all tools. prune: also mark bottom-M tools for removal |
| prune_count | number | Number of lowest-scoring tools to prune (only in prune mode, default 5) |
| tools * | array | Tool name |
purge_sessionsPurge optimization sessions by age policy or delete all. Safe-by-default: requires explicit parameters. Free tool, not metered.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview what would be deleted without actually deleting |
| keep_last | number | Always protect the N newest sessions |
| older_than_days | number | Delete sessions older than N days |
| purge_all | boolean | Explicit opt-in to delete ALL sessions |
refine_promptRefine a prompt by answering blocking questions or providing manual edits. Re-runs analysis and returns updated PreviewPack.| Parameter | Type | Description |
|---|---|---|
| answers | object | Answers to blocking questions: { question_id: answer } |
| edits | string | Manual edits or additional context to incorporate |
| session_id * | string | Session ID from optimize_prompt |
| target | string | Change output/provider target |
route_modelRoute to the optimal model based on task complexity, risk, budget, and latency preferences. Returns recommendation with decision_path audit trail. Free — no metering.| Parameter | Type | Description |
|---|---|---|
| budgetSensitivity | string | Budget sensitivity (default: from profile) |
| complexity | string | Reasoning complexity (auto-detected if prompt provided) |
| context | string | Optional context |
| latencySensitivity | string | Latency sensitivity (default: from profile) |
| profile | string | Optimization profile |
| prompt | string | Raw prompt text (for auto-classification and research intent detection) |
| target | string | Output/provider target for provider preference |
| taskType | string | Task type (auto-detected if prompt provided) |
save_custom_rulesSave custom governance rules to the local rules file (~/.prompt-control-plane/custom-rules.json). Validates all rules against the product schema, writes to disk, and returns the rule-set hash. Rules take effect on the next optimization. Works with any LLM connected to PCP. Open source for every community user.| Parameter | Type | Description |
|---|---|---|
| rules | array | Snake_case rule ID — must start with lowercase letter (a-z), then a-z0-9_ chars |
set_licenseRead legacy license metadata. No license key is required; all PCP features are available under Apache-2.0.| Parameter | Type | Description |
|---|---|---|
| license_key * | string | License key string (starts with pcp_) |
Security checks
- ✓README presentThe repository's README runs to about 7.0K words.
- ✓License declaredThe repository declares the MIT license.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
3 checks have not been run yet.
Releases
README
The repository's README runs to about 7.0K words. The original in the repository is authoritative.
Read full README