原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Claude Prompt Optimizer

作者:rishiatlan版本 2.2.2i★ –i在你的电脑上运行
注册名称io.github.rishiatlan/claude-prompt-optimizer

安装

概览

作者提供的说明(英文原文)

Scores, compiles & optimizes prompts for any LLM. Zero AI calls inside. Freemium.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: PROMPT_OPTIMIZER_PRO, PROMPT_OPTIMIZER_LOG_LEVEL

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "claude-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "claude-prompt-optimizer-mcp"
      ],
      "env": {
        "PROMPT_OPTIMIZER_PRO": "your-value",
        "PROMPT_OPTIMIZER_LOG_LEVEL": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add claude-prompt-optimizer --env PROMPT_OPTIMIZER_PRO=your-value --env PROMPT_OPTIMIZER_LOG_LEVEL=your-value -- npx -y claude-prompt-optimizer-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "claude-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "claude-prompt-optimizer-mcp"
      ],
      "env": {
        "PROMPT_OPTIMIZER_PRO": "your-value",
        "PROMPT_OPTIMIZER_LOG_LEVEL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "claude-prompt-optimizer": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "claude-prompt-optimizer-mcp"
      ],
      "env": {
        "PROMPT_OPTIMIZER_PRO": "your-value",
        "PROMPT_OPTIMIZER_LOG_LEVEL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • PROMPT_OPTIMIZER_PRO env
    Set to 'true' to enable Pro tier via environment variable (alternative to license key)
  • PROMPT_OPTIMIZER_LOG_LEVEL env
    Log verbosity level: debug, info, warn, error

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 rishiatlan 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 7271 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 7271 个服务器的 4% 更新
  • 基础检查结果等于或优于此分类中其他 7271 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Claude Prompt Optimizer 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(2.2.2)于8个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Context7, Codebase Memory, Exa

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT昨天更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT21天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT上个月更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

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:

CommandWhat it does
pcp preflight "prompt"The lead command. Classify, assess risk, route model, score: one call covers 90% of use cases
pcp optimize "prompt"Full pipeline. Analyze, compile, surface blocking questions, produce PreviewPack for approval

Supporting commands:

CommandWhat it does
pcp check "prompt"Quick quality score + top issues
pcp score "prompt"Full 5-dimension quality breakdown
pcp cost "prompt"Cost estimate across 21 costed models
pcp benchmarkRun 15-prompt regression suite

Free tier gives you 50 optimizations/month to try it out.

Try It

# Pre-flight a vague prompt: see why it scores low

pcp preflight "make the code better" --json

Pre-flight a well-specified prompt: see the full analysis

pcp preflight "Refactor auth middleware in src/auth/middleware.ts to use JWT. Do not modify the user model." --json

Run the full optimization pipeline (compile + blocking questions + approval)

pcp optimize "Build a REST API with auth" --json

Quick quality check on all prompts in a directory

pcp check --file "prompts/**/*.txt"

Run the guided demo

pcp demo

GitHub Action

# .github/workflows/prompt-quality.yml
  • uses: rishi-banerjee1/prompt-control-plane@v5 with: subcommand: preflight files: "prompts/**/*.txt"

Full GitHub Action configuration

# .github/workflows/pcp.yml

name: Prompt Quality Gate on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest permissions: pull-requests: write steps:

  • uses: actions/checkout@v4
  • uses: rishi-banerjee1/prompt-control-plane@v5 with: subcommand: preflight files: 'prompts/**/*.txt' threshold: 70 comment: 'true' # Posts results as PR comment

Run optimize in CI (full pipeline):

      - uses: rishi-banerjee1/prompt-control-plane@v5

with: subcommand: optimize files: 'prompts/**/*.txt'

This action expects your repo to be checked out (actions/checkout). Without it, file globs will match nothing.

SHA-pinned example (for enterprise users):

      - uses: rishi-banerjee1/prompt-control-plane@abc123def  # SHA-pinned

with: version: '5.0.0' # Required when pinning by SHA files: 'prompts/**/*.txt' threshold: 70

Notes:

  • The action installs pcp via npm install --prefix into $RUNNER_TEMP, then runs the binary. Falls back to prompt-lint for v4 installs.
  • Action tag @v5 maps to npm @5 (latest 5.x). Use @v5.0.0 for exact pinning.
  • subcommand input accepts check (default), preflight, optimize, or score. Use preflight for CI gates.
  • comment: 'true' posts results as a PR comment (requires pull-requests: write permission).
  • Exit code 2 means no files matched or invalid input: not "all passed." Zero matched files is always an error.
  • On Windows runners, prefer single quotes or escape glob wildcards in PowerShell.
  • Rule IDs (e.g., vague_objective, missing_constraints) are stable: treat as a public contract.

Why This Exists

  • Prompts run without any quality check. "Make the code better" gives Claude no constraints, no success criteria, and no target: leading to unpredictable results and wasted compute.
  • No structure scoring, no ambiguity detection. Even experienced engineers skip success criteria, constraints, and workflow steps. This linter flags structural gaps before you send.
  • Cost is invisible until after you've spent it. Most users have no idea how many tokens their prompt will consume. The linter shows cost breakdowns across 21 costed models from Anthropic, OpenAI, Google, and Perplexity before you commit. Cost estimates are approximate: validate for billing-critical workflows.
  • Simple tasks run on expensive models. Without routing intelligence, every prompt goes to the same model. The decision engine classifies complexity and routes simple tasks to cheaper models automatically: reducing LLM spend without changing your prompts.
  • Context bloat is the hidden cost multiplier. Sending 500 lines of code when 50 are relevant burns tokens on irrelevant context. The smart compressor runs 5 heuristics (license strip, comment collapse, duplicate collapse, stub collapse, aggressive truncation) with zone protection for code blocks and tables: standard mode is safe, aggressive mode is opt-in.
  • Human-in-the-loop approval. The MCP asks blocking questions when your prompt is ambiguous, requires you to answer them before proceeding, and only finalizes the compiled prompt after you explicitly approve. No prompt runs without your sign-off: the gate is enforced in code, not convention.

How It Works

flowchart LR

A([Your prompt]) --> B[Host Claude] B -->|calls optimize_prompt| C{PCP Engine}

subgraph C[PCP Engine: Zero LLM Calls] direction TB D[1. Tokenize & normalize] --> E[2. Detect task type] E --> F[3. Score 5 dimensions] F --> G[4. Run 14 rules] G --> H[5. Assess risk] H --> I[6. Route model] I --> J[7. Estimate cost] J --> K[8. Compile prompt] end

C -->|PreviewPack| B B --> L([User reviews & approves]) L -->|approve_prompt| B B --> M([Execute with compiled prompt])

The Approval Loop

Every prompt goes through a mandatory review cycle before it's finalized:

  1. Analyze: You type a prompt. The MCP scores it, detects ambiguities, and compiles a structured version.
  2. Ask: If the prompt is vague or missing context, the MCP surfaces up to 3 blocking questions. You answer them via refine_prompt.
  3. Review: You see the compiled prompt, quality score, cost estimate, and what changed. No surprises.
  4. Approve: You say "approve" and the compiled prompt is locked in. approve_prompt hard-fails if unanswered blocking questions remain: the gate is enforced in code, not convention.

The MCP is a co-pilot for the co-pilot. It does the structural work (decomposition, gap detection, template compilation, token counting) so Claude can focus on intelligence.

Zero LLM calls inside the MCP. All analysis is deterministic: regex, heuristics, and rule engines. The host Claude provides all intelligence. This means the MCP itself is instant, free, and predictable.

Works for all prompt types: code, writing, research, planning, analysis, communication, data, and more. The pipeline auto-detects 13 task types and adapts scoring, constraints, templates, and model recommendations accordingly. A Slack post gets writing-optimized constraints; a refactoring task gets code safety guardrails. Intent-first detection classifies prompts *about* technical topics that request non-code work correctly: the opening verb phrase takes priority over technical keywords in the body.

Benchmarks

Real results from the deterministic pipeline. PCP scores the input prompt quality, not the compiled output: the compiled prompt gets a structural checklist instead:

PromptTypeScoreConfidenceModelBlocked?
"make the code better"other50highclaude-sonnet-5N/A
"fix the login bug"debug53mediumclaude-sonnet-53 BQs
Multi-task (4 tasks in 1 prompt)refactor53mediumclaude-sonnet-53 BQs
Well-specified refactor (auth middleware)refactor68mediumclaude-sonnet-5N/A
Precise code change (retry logic)code_change63mediumclaude-sonnet-5N/A
Create REST API servercreate58mediumclaude-sonnet-51 BQ
LinkedIn post (technical topic)writing61mediumclaude-sonnet-5N/A
Blog post (GraphQL migration)writing65mediumclaude-sonnet-5N/A
Email to engineering teamwriting61mediumclaude-sonnet-5N/A
Slack announcementwriting61mediumclaude-sonnet-5N/A
Technical summary (RFC → guide)writing65mediumclaude-sonnet-5N/A
Research (Redis and Memcached)research58mediumclaude-sonnet-5N/A
Framework comparison (React and Vue)research58mediumclaude-sonnet-5N/A
Migration roadmap (REST → GraphQL)planning58mediumclaude-sonnet-5N/A
Data transformation (CSV grouping)data58mediumclaude-haiku-4-5N/A

Score = input prompt quality (0-100). Confidence = how much improvement to expect (high = prompt is weak, lots of room; low = prompt is already strong). Compiled output gets a structural checklist (e.g. 7/9 elements present), not an inflated numeric score. Vague prompts get blocked with targeted questions. Well-specified prompts get compiled with safety constraints, workflow steps, and model routing: all deterministically, with zero LLM calls.

Features

Vague Prompt Detection

Raw: "make the code better"

Quality: 50/100 Confidence: high State: ANALYZING

Blocking Questions: ⛔ Which file(s) or module(s) should this change apply to?

Changes Made: ✓ Added: role definition ✓ Added: success criteria ✓ Added: safety constraints ✓ Added: workflow (4 steps) ✓ Added: uncertainty policy

*Catches missing targets, vague objectives, and scope explosions before Claude starts working*

Well-Specified Prompt Compilation

Raw: "Refactor auth middleware in

src/auth/middleware.ts..."

Quality: 68/100 Confidence: medium State: COMPILED Risk: high (auth domain) Model: claude-opus-5 (recommended)

Detected Inputs: 📄 src/auth/middleware.ts 📄 auth.test.ts

Extracted Constraints: 🚫 Do not touch user model or DB layer

*Detects high-risk domains, extracts file paths and constraints, recommends the right model*

Multi-Task Overload Detection

Raw: "update payment processing and

also refactor the dashboard and then fix rate limiting and finally clean up tests"

Quality: 53/100 Confidence: medium Risk: high (payment domain) Blocking: 3 questions

Assumptions: 💡 Consider splitting into separate prompts for better focus.

*Detects when one prompt tries to do too much and suggests splitting*

Context Compression

Intent: "fix updateProfile to validate

email format"

Original: ~397 tokens Compressed: ~169 tokens Saved: ~228 tokens (57%)

What Was Removed: 🗑️ Trimmed 7 import statements 🗑️ Removed 15-line block comment 🗑️ Removed test code (not relevant) 🗑️ Collapsed excessive blank lin

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx