Listed from the MCP registry; nobody on Odel publishes it.
Optimize prompts and generate agent SOPs and skill packages with the Prompt Optimizer cloud API.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted โ your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y mcp-prompt-optimizer
MCP client config
{
"mcpServers": {
"prompt-optimizer": {
"command": "npx",
"args": [
"-y",
"mcp-prompt-optimizer"
]
}
}
}๐ Professional cloud-based MCP server for AI-powered prompt optimization with intelligent context detection, template management, team collaboration, and enterprise-grade reliability. Starting at $0/month.
New here? A free API key takes no card and includes 20 optimizations a month. Start free, or try one optimization with no account first.
๐ง AI Context Detection โ Automatically detects and optimizes for code, creative writing, image generation, communication, and more ๐ Template Management โ Auto-save high-confidence optimizations, search & reuse patterns ๐ฅ Team Collaboration โ Shared quotas, team templates, role-based access ๐ Confidence Scoring โ Honest quality signal with per-tier annotations โ๏ธ Cloud Processing โ Always up-to-date AI models via backend LLM pipeline ๐ง Resilient Fallback โ Structured local optimization if the backend is unreachable ๐๏ธ Personal Model Choice โ Use your own OpenRouter models via WebUI configuration ๐ง Universal MCP โ Works with Claude Desktop, Cursor, Windsurf, Cline, VS Code, Zed, Replit
1. Get your API key:
sk-opt-*): 20 LLM optimizations/month, 1 API key โ no credit card requiredsk-opt-*): 500 optimizations/month, full model config, Context Engineersk-team-*): Unlimited optimizations, team keys, shared quotasSign up and generate your key at promptoptimizer.xyz/dashboard.
2. Install:
npm install -g mcp-prompt-optimizer
3. Connect to Claude Desktop (one command):
npx mcp-prompt-optimizer connect
This wizard reads your API key and writes the MCP server entry to Claude Desktop config automatically. Cross-platform (macOS, Windows, Linux).
Or configure manually โ add to ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-prompt-optimizer": {
"command": "npx",
"args": ["-y", "mcp-prompt-optimizer"],
"env": {
"OPTIMIZER_API_KEY": "sk-opt-your-key-here"
}
}
}
}
4. Restart your MCP client and start optimizing.
Note: API keys are validated against the backend server. An internet connection is required (responses are cached for up to 2 hours for reliability).
Prompts are routed through a three-tier pipeline based on complexity and context. Each tier produces a different output format and confidence range.
The backend routes complex or high-sophistication prompts through a Gemini Flash LLM pass that genuinely rewrites and enriches the prompt. This is the highest-quality output.
# ๐ฏ Optimized Prompt
My Python script crashes with a KeyError on line 47. I need help diagnosing
the root cause. I am using Python 3.11 with pandas 2.0. The error occurs
when accessing dictionary keys after a merge operation.
**Confidence:** 82.0%
**AI Context:** code_generation
For simpler or lower-sophistication prompts the backend applies rules-based optimization without an LLM. When this happens, confidence will be below 25% and a note will appear explaining what to check if you expected full LLM enhancement.
# ๐ฏ Optimized Prompt
My Python script crashes with a KeyError. Please provide the error message
and relevant code.
> โน๏ธ *Low confidence indicates the backend applied rules-based optimization
> (no LLM). Ensure `OPENROUTER_API_KEY` is configured in the backend for
> full LLM enhancement.*
**Confidence:** 18.0%
**AI Context:** code_generation
If the backend is unreachable, the npm package applies optimization locally using a library of domain-specific templates. The output is a structured, user-facing prose prompt โ no XML scaffolding. The confidence annotation makes the quality tier explicit.
# ๐ง Rules-Based Optimization Applied
โ ๏ธ *Backend unreachable โ your prompt has been structured using local rule
templates (no LLM). Re-run when the backend is available for full LLM
optimization.*
**Template:** `debugging_request`
**Optimized Prompt:**
My Python script crashes with a KeyError
To address this effectively:
Response format: Step-by-step debugging walkthrough with a specific fix or next diagnostic steps.
**Confidence:** 51.0% *(rules-based โ LLM optimization typically 70โ95%)*
**AI Context:** code_generation
The server automatically detects your prompt type and routes it to the appropriate optimization template.
| Context | ai_context value | Example patterns |
|---|---|---|
| Code & debugging | code_generation | debug, fix, error, python, sql, refactor |
| Web development | code_generation | landing page, react, css, html, tailwind |
| API & integration | api_automation | api, rest, endpoint, oauth, webhook |
| DevOps & automation | technical_automation | deploy, docker, ci/cd, terraform, bash |
| Data & schemas | structured_output | json, schema, csv, yaml, transform |
| Analysis & research | llm_interaction | analyze, explain, compare, research |
| Creative writing | creative_writing | story, poem, script, blog, copywriting |
| Email & communication | human_communication | email, letter, memo, formal, reply |
| Image generation | image_generation | photorealistic, midjourney, dall-e, portrait |
| Business & Strategy | business_strategy | market analysis, swot, business plan |
| Technical Strategy | technical_strategy | architecture, system design, migration plan |
| Legal & Compliance | legal_compliance | contract, gdpr, terms of service, audit |
| Medical & Health | medical_healthcare | clinical, diagnosis, treatment, hipaa |
| Education | educational_content | lesson plan, syllabus, curriculum, quiz |
| General | general_assistant | Everything else |
Image prompts are handled separately. The local fallback appends style-matched quality boosters directly to the prompt (comma-separated), rather than producing structured bullets. This matches how image generation models consume prompts.
Input: "Draw a photorealistic portrait of an astronaut"
Output: "Draw a photorealistic portrait of an astronaut, ultra realistic,
sharp focus, professional photography, dynamic lighting, balanced
composition, high quality, 4K"
optimize_promptAI optimization with context detection, auto-save, and insights.
{
"prompt": "Your prompt text",
"goals": ["clarity", "specificity"],
"ai_context": "code_generation"
}
detect_ai_contextDetect the AI context for a given prompt.
{
"prompt": "The prompt text for which to detect the AI context"
}
create_templateSave an optimization as a reusable template.
{
"title": "Template title",
"description": "Optional description",
"original_prompt": "The original prompt",
"optimized_prompt": "The optimized prompt",
"optimization_goals": ["clarity"],
"confidence_score": 0.9,
"ai_context_detected": "code_generation",
"is_public": false,
"tags": ["debugging", "python"]
}
get_templateRetrieve a saved template by ID.
{
"template_id": "the-template-id"
}
update_templateUpdate an existing template.
{
"template_id": "the-template-id",
"title": "Updated title",
"is_public": true
}
search_templatesSearch your saved template library.
{
"query": "debugging",
"ai_context": "code_generation",
"limit": 5,
"sort_by": "confidence_score",
"sort_order": "desc"
}
get_quota_statusCheck subscription status and quota usage. No parameters required.
get_optimization_insights (conditional)Experimental and off by default (set ENABLE_BAYESIAN_OPTIMIZATION=true to list it). It calls an analytics endpoint that the hosted service does not currently provide, so it reports that insights are unavailable; it never returns made-up data.
{
"analysis_depth": "detailed",
"include_recommendations": true
}
get_real_time_status (conditional)Real-time optimization status and AG-UI capabilities. Requires the feature to be enabled in the backend; returns mock data otherwise. No parameters required.
Free accounts get a limited monthly Context Engineering allowance on the default model; Pro and Enterprise get more, and generate_harness_bundle requires Pro or Enterprise. CE tools generate agentic scaffolding artifacts (SOPs, skill packages, framework code) directly in your IDE.
generate_agent_sopGenerate a structured SOP document for an AI agent from a goal description. Returns markdown SOP ready for use.
{
"goal": "What the agent should accomplish",
"context": "Additional context, constraints, or domain info (optional)",
"model_id": "Model to use (optional)"
}
generate_skill_packageGenerate a complete skill package (SOP + SKILL.md + reference + examples + helper.py) for a given agent goal. Takes 30โ90 seconds (async with polling).
{
"goal": "What the agent should accomplish",
"format": "knowledge_doc",
"model_id": "Model to use (optional)"
}
format currently accepts only knowledge_doc (the default); it is optional.
generate_harness_bundleGenerate a deployment-ready Agentic Harness ZIP bundle for a specific platform. Returns a confirmation when the bundle is queued for download.
{
"goal": "The workflow goal the harness is built for",
"deploy_target": "claude_code",
"sop_content": "The SOP markdown content (required if no session_id)",
"session_id": "Optional: session ID from a prior generate_skill_package call"
}
deploy_target accepts a single string (Pro+) or an array of strings (Enterprise โ multi-platform simultaneously). Supported targets include claude_code, langchain, autogen, crewai, amazon_q, aider, continue_dev, and more. amazon_q, aider, continue_dev, crewai require Enterprise.
explore_sop_approachesGenerate 3 parallel SOP variants (process-oriented, decision-tree, role-based) for comparison before committing to one. Returns an HTML comparison grid, a variants array, and a recommended variant. Enterprise required.
{
"goal": "The workflow goal to generate SOP variants for",
"context": "Optional background context",
"blend_description": "Optional: blend all 3 variants into one SOP using this description"
}
IntentFrame fields (perspective, out_of_scope, success_definition) are also accepted to scope the generation.
transform_for_frameworkTransform a SOP into native code for your agent framework: LangChain tool, AutoGen agent, or Claude Code skill.
{
"sop_content": "The SOP markdown content",
"goal": "What the agent should accomplish",
"framework": "langchain_tool"
}
framework is one of langchain_tool, autogen_agent, or claude_skill.
get_ce_quota_statusCheck your Context Engineer credit balance and what workflows are available at your tier. No parameters required.
Configure custom models in the WebUI and the MCP server uses them automatically.
Step 1 โ Configure in WebUI:
Step 2 โ Use the npm package as normal. Your WebUI model settings are applied automatically โ no changes to the MCP configuration required.
1. Your WebUI-configured models (highest priority)
2. Request-specific model override
3. System default (google/gemini-flash-1.5-8b)
| Use case | Optimization model | Evaluation model |
|---|---|---|
| Creative / complex | anthropic/claude-3-5-sonnet | google/gemini-pro-1.5 |
| Fast / simple | openai/gpt-4o-mini | openai/gpt-3.5-turbo |
| Code / technical | anthropic/claude-3-5-sonnet | anthropic/claude-3-haiku |
Two different API keys:
- Service key (
sk-opt-*orsk-team-*) โ your MCP Prompt Optimizer subscription- OpenRouter key โ your personal OpenRouter account for model usage costs
| Plan | Price | Optimizations/month | CE Credits | API Keys |
|---|---|---|---|---|
| ๐ Free | $0 | 20 LLM | โ | 1 |
| โญ Pro | $19/mo | 500 | 5 | 1 |
| ๐ข Enterprise | Custom | Unlimited | 50 | 10 (shared) |
All plans include AI context detection, template management, personal model configuration, and optimization insights.
npx mcp-prompt-optimizer connect # Interactive wizard: add API key to Claude Desktop config
mcp-prompt-optimizer check-status # Check API key and quota status
mcp-prompt-optimizer validate-key # Validate API key with backend
mcp-prompt-optimizer diagnose # Run comprehensive diagnostic
mcp-prompt-optimizer clear-cache # Clear validation cache
mcp-prompt-optimizer help # Show help and setup instructions
mcp-prompt-optimizer version # Show version information
sk-team-*)sk-opt-*)~/.mcp-cloud-api-cache.json and ~/.mcp-cloud-health.json: a cache of your key's validation result and network-health counters. mcp-prompt-optimizer clear-cache removes them.generate_harness_bundle saves the ZIP it generates under OPTIMIZER_OUTPUT_DIR (default: a mcp-prompt-optimizer folder in the system temp directory), with a timestamped name; it never overwrites. The tool's optional output_dir argument may only name a subfolder of that location. To save elsewhere, set OPTIMIZER_OUTPUT_DIR in your own environment.npx mcp-prompt-optimizer connect edits your MCP client's config file (a .bak backup is written first).{
"mcpServers": {
"mcp-prompt-optimizer": {
"command": "npx",
"args": ["-y", "mcp-prompt-optimizer"],
"env": { "OPTIMIZER_API_KEY": "sk-opt-your-key-here" }
}
}
}
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"mcp-prompt-optimizer": {
"command": "npx",
"args": ["-y", "mcp-prompt-optimizer"],
"env": { "OPTIMIZER_API_KEY": "sk-opt-your-key-here" }
}
}
}
Windsurf, Cline, VS Code, Zed, Replit, JetBrains IDEs, and Neovim are all supported via standard MCP server configuration.
npm run test:contract pins the /optimize response shape (Pydantic fields + runtime-injected quota_used/quota_limit + metadata routing_score/routing_tier/model_used) against a canonical fixture. Catches backend drift before publish..github/workflows/ci.yml runs npm ci + health check + contract check on push/PR across Node 18, 20, and 22.sk-opt-*) and use the MCP server at no cost (currently 20 LLM optimizations/month). Previously, key creation was blocked in the live service due to a bug introduced when the free-tier launch landed in an unused module. Keys with subscription_status: NULL (all free accounts) now validate correctly.connect wizard โ npx mcp-prompt-optimizer connect interactively writes your API key to Claude Desktop config on macOS, Windows, and Linux. Replaces manual JSON editing for new users.connect subcommand added (interactive Claude Desktop config wizard)explore_sop_approaches tool: generates 3 parallel SOP variants (process-oriented, decision-tree, role-based) for comparison before committing. Optionally accepts blend_description to blend variants directly. Enterprise tier required.generate_harness_bundle tool: generates deployment-ready ZIP harness for 14+ platforms. Single deploy target (Pro+) or multi-platform array (Enterprise).perspective, out_of_scope, success_definition) added to generate_agent_sop for scoped SOP generation.transform_for_framework tool: converts SOP to native LangChain tool, AutoGen agent, or Claude Code skillcreative_writing context now routes correctly to the creative writing template (previously fell through to a generic fallback).general_assistant context now maps explicitly to the LLM interaction template.OPENROUTER_API_KEY configuration).*(rules-based โ LLM optimization typically 70โ95%)* so users understand where their result sits relative to full LLM optimization.Start free at promptoptimizer.xyz โ 20 LLM optimizations/month, no credit card required.