Skip to content
MCP server

Prompt Optimizer

Cloud prompt optimizer with assertion tests and versioned templates for MCP clients

Runs locallyStatus and history
Pricing
Freemium
Platforms
API, CLI, Web
Runs
Locally
Version
3.8.11
Listing updated
3 days ago

About Prompt Optimizer

Prompt Optimizer is a freemium MCP server for ai models and llm tooling. It runs locally on your machine and is started by your AI client.

Prompts run through a three-tier router: simple requests are resolved by rules with no LLM call, and only prompts that need reasoning reach a model. The README says the LLM pass is a Gemini Flash rewrite, and each result comes with a confidence score and a detected context such as code generation.

Beyond rewriting, the service tests prompts. Evaluations support assertions on length, required phrases, banned words, JSON validity, regex and an LLM rubric, and return a 0 to 1 score. Pro and Enterprise plans add template version history with rollback, scheduled re-scoring of published templates, and repair attempts for anything that falls below a 0.65 pass line.

The npm package is a thin stdio bridge to the hosted API, so it needs an API key and an internet connection. A connect command writes the Claude Desktop config for you.

Install

Run in a terminal

claude mcp add mcp-prompt-optimizer --env OPTIMIZER_API_KEY='<OPTIMIZER_API_KEY>' -- npx -y mcp-prompt-optimizer

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-prompt-optimizer"
      ],
      "env": {
        "OPTIMIZER_API_KEY": "<OPTIMIZER_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-prompt-optimizer"
      ],
      "env": {
        "OPTIMIZER_API_KEY": "<OPTIMIZER_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-prompt-optimizer": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-prompt-optimizer"
      ],
      "env": {
        "OPTIMIZER_API_KEY": "<OPTIMIZER_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-prompt-optimizer"
      ],
      "env": {
        "OPTIMIZER_API_KEY": "<OPTIMIZER_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-prompt-optimizer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-prompt-optimizer"
      ],
      "env": {
        "OPTIMIZER_API_KEY": "<OPTIMIZER_API_KEY>"
      }
    }
  }
}

Configuration

  • OPTIMIZER_API_KEYYour Prompt Optimizer API key (starts with sk-opt-). A free key takes no card: https://promptoptimizer.xyz/dashboardRequired

What it does

Cost-aware routing
Simple prompts are handled by deterministic rules and only complex ones are sent to an LLM.
Assertion testing
Check an optimized prompt against length, phrase, JSON, regex and rubric assertions and get a 0 to 1 score.
Semantic drift scoring
Embedding similarity flags when an optimized prompt no longer asks for the original thing.
Template versioning
Edits keep the replaced version so you can restore it through the API.
Runtime prompt delivery
Pro plans serve the latest compiled prompt with variable interpolation and signed webhooks on change.
Skill package builds
Context Engineering generates agent SOPs and skill packages, costing 1 to 3 credits each.

Good for

  • Rewrite a rough prompt before sending it to a coding agent
  • Catch regressions after a model or prompt change with assertion tests
  • Update a production prompt without redeploying the app
  • Generate an agent SOP or skill package from a short brief
  • Roll back a prompt template to an earlier version

Pricing

Freemium, from $19 a month

Free: 20 optimizations a month; Pro $19/mo; Enterprise custom

Prices change. Check promptoptimizer.xyz before you buy.

Prompt Optimizer FAQ

Do I need an account to use it?

You need an API key that starts with sk-opt-. A free key needs no card and includes 20 optimizations a month.

What does the Pro plan cost?

Pro is listed at $19 a month for 500 optimizations and 3 skill builds. Enterprise pricing is on request.

Which clients can connect?

The README names Claude Desktop, Cursor, Windsurf, Cline, VS Code, Zed and Replit.

Does it work offline?

No. Keys are validated against the backend, though responses are cached for up to 2 hours. A structured local fallback applies if the backend is unreachable.

Is Prompt Optimizer free?

Prompt Optimizer has a free plan, with paid plans for more usage or features. Paid plans start at $19 a month.

How do I add Prompt Optimizer to Claude Code?

Run this command in your terminal: claude mcp add mcp-prompt-optimizer --env OPTIMIZER_API_KEY='<OPTIMIZER_API_KEY>' -- npx -y mcp-prompt-optimizer

What are the best alternatives to Prompt Optimizer?

The closest alternatives to Prompt Optimizer are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Prompt Optimizer

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools