claude-orator-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-orator-mcpoptimize this prompt: explain quantum computing to a 10-year-old"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-orator-mcp
An Model Context Protocol (MCP) server for deterministic prompt optimization in Claude Code. Score prompts across 7 quality dimensions, auto-select from 11 Anthropic techniques, and return a structural scaffold. No LLM calls, no network, sub-millisecond.

install
Requirements:
From shell:
claude mcp add claude-orator-mcp -- npx claude-orator-mcpFrom inside Claude (restart required):
Add this to our global mcp config: npx claude-orator-mcp
Install this mcp: https://github.com/Vvkmnn/claude-orator-mcpFrom any manually configurable mcp.json: (Cursor, Windsurf, etc.)
{
"mcpServers": {
"claude-orator-mcp": {
"command": "npx",
"args": ["claude-orator-mcp"],
"env": {}
}
}
}There is no npm install required -- no external dependencies or databases, only deterministic heuristics.
However, if npx resolves the wrong package, you can force resolution with:
npm install -g claude-orator-mcpRelated MCP server: Refine Prompt
skill
Optionally, install the skill to teach Claude when to proactively optimize prompts:
npx skills add Vvkmnn/claude-orator-mcp --skill claude-orator --global
# Optional: add --yes to skip interactive prompt and install to all agentsThis makes Claude automatically optimize prompts before dispatching subagents, writing system prompts, or crafting any prompt worth improving. The MCP works without the skill, but the skill improves discoverability.
plugin
For automatic prompt optimization with hooks and commands, install from the claude-emporium marketplace:
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-orator@claude-emporiumThe claude-orator plugin provides:
Hooks (fires before subagent dispatch):
Before Task -- Suggest prompt optimization before launching agents
Commands: /reprompt-orator
Requires the MCP server installed first. See the emporium for other Claude Code plugins and MCPs.
features
MCP server with a single tool. Prompt in, optimized prompt out.
orator_optimize
Analyze a prompt across 7 quality dimensions, auto-select from 11 Anthropic techniques, and return a structurally optimized scaffold with before/after scores.
orator_optimize prompt="Write a function that sorts users"
> Returns optimized scaffold with XML tags, output format, examples section
orator_optimize prompt="You are a helpful assistant" intent="system"
> Returns role-assigned system prompt with structure and constraints
orator_optimize prompt="Extract all emails from this text" techniques=["xml-tags", "few-shot"]
> Force-applies specific techniques regardless of auto-selectionScore meter (gradient fill bar):
๐ชถ 3.2 โโโโโโโโโโโ 7.8
+xml-tags +few-shot +structured-output ยท 3 issues
Wrapped in XML tags, added examples, specified output formatThree-zone bar: โโโ (baseline) โโโโโ (improvement) โโ (headroom to 10).
Minimal case (already well-structured):
๐ชถ โโ already well-structured (8.4)Input:
Parameter | Type | Required | Description |
| string | Yes | The raw prompt to optimize |
| enum | No |
|
| enum | No |
|
| string[] | No | Force-apply specific technique IDs |
Output:
Field | Type | Description |
| string | Rewritten prompt scaffold (primary output) |
| number | Quality score of original (0-10) |
| number | Quality score after optimization (0-10) |
| string | 1-line explanation of improvements |
| string | Auto-detected intent category |
| string[] | Technique IDs applied |
| string[] | Detected problems |
| string[] | Actionable fixes |
The optimized_prompt is a structural scaffold. Claude refines it with domain knowledge, codebase context, and conversation history.
methodology
How claude-orator-mcp works:
๐ชถ claude-orator-mcp
โโโโโโโโโโโโโโโโโโโโ
orator_optimize
โโโโโโโโโโโโโโ
PROMPT
โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ Detect โ โ Measure โ
โ Intent โ โ Complexity โ
โโโโโโโฌโโโโโโ โโโโโโโโฌโโโโโโ
โ โ
system > code > word count +
extraction > clause depth
analysis > โ
creative > โ
conversation โ
+ disambiguation โ
+ fallback heuristics โ
โ โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโ
โ Score Before โ
โ โ
โ clarity 20% โ strong verbs, single task
โ specificity 20% โ named tech, constraints
โ structure 15% โ XML tags, headers, lists
โ examples 15% โ input/output pairs
โ constraints 10% โ scope, edge cases
โ output_fmt 10% โ format specification
โ efficiency 10% โ no filler, no redundancy
โ โ
โ โโโโโโโโโโ 3.2 โ
โโโโโโโโโโฌโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโ techniques?
โ Select Techniques โโโโโโ (force override)
โ โ
โ when_to_use() ร โ 11 predicates
โ intent match ร โ filtered
โ score gaps ร โ sorted by impact
โ cap at 4 โ
โโโโโโโโโโฌโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโ
โ Template Assembly โ
โ โ
โ role preamble โ expert identity
โ โ <context> โ grounding data first
โ โ <task> โ XML-wrapped prompt
โ โ <requirements> โ constraints + gaps
โ โ <examples> โ multishot I/O pairs
โ โ output format โ format specification
โโโโโโโโโโฌโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโ
โ Score After โ
โ โ
โ โโโโโโโโโโโโ 7.8โ
โโโโโโโโโโฌโโโโโโโโโโโ
โ
โผ
OUTPUT
optimized_prompt
+ scores + techniques
+ issues + suggestions
score meter (gradient fill bar):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ชถ 3.2 โโโโโโโโโโโ 7.8
+xml-tags +few-shot +structured-output
Wrapped in XML, added examples, format
โโโ baseline โโโ improvement โโ headroom7 quality dimensions (weighted scoring, deterministic):
Dimension | Weight | Measures |
Clarity | 20% | Strong verbs, single task, no hedging |
Specificity | 20% | Named tech, numbers, constraints |
Structure | 15% | XML tags, headers, lists |
Examples | 15% | Input/output pairs, demonstrations |
Constraints | 10% | Negative constraints, scope, edge cases |
Output Format | 10% | Format spec, structure definition |
Token Efficiency | 10% | No filler, no redundancy |
11 Anthropic techniques (auto-selected based on intent, scores, and complexity):
ID | Name | Auto-selected when |
| Analysis intent, complex tasks | |
| Long prompt + low structure score | |
| Low example score + extraction/code | |
| System intent or low specificity | |
| Low output format score | |
| API target + extraction/code | |
| Complex + multiple subtasks | |
| Analysis or extraction intent | |
| Complex + analysis/code intent | |
| Long prompt (>2000 chars or >50 lines) | |
| Prompt mentions tool/function calling |
Core algorithms:
Intent detection (
detectIntent): Priority-ordered regex patterns across 6 categories:system > code > extraction > analysis > creative > conversation. Includes disambiguation (e.g.,system+codesignals resolves tocode) and fallback heuristics for code blocks, "build me" patterns, and debugging language.Heuristic scoring (
scorePrompt): 7-dimension weighted analysis. Each dimension 0-10, overall is weighted sum. Also generates flatissues[]andsuggestions[]arrays.Technique selection (
selectTechniques): Each technique has awhen_to_use()predicate. Auto-selected based on intent + scores + complexity. Sorted by impact, capped at 4.Template assembly (
optimize): Builds structural scaffold from selected techniques. Context-first ordering: role โ<context>โ<task>โ<requirements>โ<examples>โ output format.
Design principles:
Single tool: one entry point, minimal cognitive overhead
Deterministic: same input, same output. No LLM calls, no network
Scaffold, not final: the optimized prompt is structural; Claude adds substance
Lean output: flat string arrays for issues/suggestions, no nested objects
Weighted dimensions: clarity and specificity matter most (20% each)
Technique cap: max 4 techniques per optimization (diminishing returns beyond)
Anti-pattern detection: 12 Claude-specific anti-patterns + 20 industry patterns from 34 production AI tools
Zero dependencies: only
@modelcontextprotocol/sdk+zod
alternatives
Every existing prompt optimization tool requires LLM calls, labeled datasets, or evaluation infrastructure. When you need structural improvement at zero latency (CI/CD, subagent dispatch, offline), they cannot help.
Feature | orator | DSPy | promptfoo | TextGrad | OPRO | LLMLingua | Anthropic Generator |
Zero latency | Yes (<1ms) | No (LLM calls) | No (eval runs) | No (LLM calls) | No (LLM calls) | No (LLM calls) | No (LLM call) |
Offline/airgapped | Yes | No | Partial | No | No | No | No |
Deterministic | Yes | No | No | No | No | Partial | No |
No labeled data | Yes | No (examples) | No (test cases) | No (feedback) | No (examples) | Yes | Yes |
Claude-specific | Yes (anti-patterns) | No | No | No | No | No | Yes |
MCP native | Yes | No | No | No | No | No | No |
Structural scoring | 7 dimensions | None | Custom metrics | None | None | None | None |
Dependencies | 0 (pure TS) | PyTorch + LLM | Node + LLM | PyTorch + LLM | LLM | PyTorch + LLM | LLM API |
DSPy: Stanford's framework for compiling LM programs with automatic prompt optimization. Requires labeled examples, LLM calls for optimization, and PyTorch. Optimizes for task accuracy, not structural quality. Latency: seconds to minutes per optimization. Use DSPy when you have labeled data and want to tune for a specific metric.
promptfoo: Test-driven prompt evaluation framework. Requires test cases, LLM calls for evaluation, and an evaluation dataset. Measures output quality, not prompt structure. Complementary: use Orator for structural scaffolding, then promptfoo to evaluate output quality.
TextGrad: Automatic differentiation via text feedback from LLMs. Requires LLM calls for both forward and backward passes. Research-oriented, PyTorch dependency. Latency: minutes. Use when iterating on prompt wording with measurable objectives.
OPRO: DeepMind's optimization by prompting. Uses an LLM to iteratively rewrite prompts. Requires examples of good/bad outputs, multiple LLM calls per iteration. Latency: minutes. Use when exploring creative prompt variations with evaluation feedback.
LLMLingua: Microsoft's prompt compression via perplexity-based token removal. Reduces token count by 2-20x but requires a local LLM for perplexity scoring. Different goal: compression, not structural improvement. Use when context window is the bottleneck.
Anthropic Prompt Generator: Anthropic's own tool that generates prompts via Claude. Excellent quality but requires an LLM call, non-deterministic, and not available offline or via MCP. Use when you want Claude to write your prompt from scratch.
Orator's approach is deliberately different: structural analysis via deterministic heuristics. No LLM calls means no API keys, no latency variance, no cost per optimization, and identical results every run. The trade-off is that Orator optimizes prompt structure (clarity, specificity, constraints, format) rather than prompt wording. It can't tell you if your prompt produces good output, only that it's well-formed for Claude. This makes it complementary to evaluation tools like promptfoo: scaffold with Orator, then validate with eval.
development
git clone https://github.com/Vvkmnn/claude-orator-mcp && cd claude-orator-mcp
npm install && npm run build
npm testPackage requirements:
Node.js: >=20.0.0 (ES modules)
Runtime:
@modelcontextprotocol/sdk,zodZero external databases: works with
npx
Development workflow:
npm run build # TypeScript compilation with executable permissions
npm run dev # Watch mode with tsc --watch
npm run start # Run the MCP server directly
npm run lint # ESLint code quality checks
npm run lint:fix # Auto-fix linting issues
npm run format # Prettier formatting (src/)
npm run format:check # Check formatting without changes
npm run typecheck # TypeScript validation without emit
npm run test # Lint + type check + vitest (25 tests)
npm run prepublishOnly # Pre-publish validation (build + lint + format:check)Git hooks (via Husky):
pre-commit: Auto-formats staged
.tsfiles with Prettier and ESLint
Contributing:
Fork the repository and create feature branches
Follow TypeScript strict mode and MCP protocol standards
Learn from examples:
Official MCP servers for reference implementations
TypeScript SDK for best practices
Creating Node.js modules for npm package development
Anthropic prompt engineering docs for technique details
acknowledgments
Industry pattern data derived from deep analysis of system prompts from 34 AI coding tools collected in system-prompts-and-models-of-ai-tools, including Claude Code, Cursor, Windsurf, v0, Devin, Cline, Lovable, Replit, Amp, Gemini, and 25 others. Patterns are curated with prevalence data and embedded โ no external dependency or installation required. Cross-referenced with research from the Prompt Report (1,500 papers surveyed) and Anthropic's prompt engineering documentation.
license
Cicero Denounces Catiline by Cesare Maccari (1889). "Quo usque tandem abutere, Catilina, patientia nostra?" (How long, Catiline, will you abuse our patience?) - Claudius.
Available Tools
1 toolorator_optimizeOptimize PromptARead-onlyIdempotent
Analyze and optimize a prompt using Anthropic best practices. Returns an optimized prompt scaffold with score metrics, detected issues, and applied techniques.
| Name | Required | Description | Default |
|---|---|---|---|
| intent | No | Intent category (auto-detected if omitted) | |
| prompt | Yes | The raw prompt to optimize | |
| target | No | Target environment for the optimized prompt (default: claude-code) | claude-code |
| techniques | No | Force-apply specific technique IDs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so the agent knows this is a safe, repeatable operation. The description adds valuable context about the tool's behavior: it returns a scaffold with score metrics, detected issues, and applied techniques, which goes beyond the safe-read nature. It does not describe any side effects, but the annotations cover that, and the output details provide transparency about what the tool produces.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action and followed by a concise summary of the return value. Every word earns its place; there is no fluff or repetition. It is highly efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 4 parameters and no output schema, so the description must explain return values clearly to compensate. It does so by stating the optimized prompt scaffold includes score metrics, detected issues, and applied techniques. This is sufficient for a moderate-complexity tool with no siblings and no side effects. However, it could elaborate on how the target environment or techniques influence the output, leaving a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% parameter description coverage, with each parameter (intent, prompt, target, techniques) carrying a clear description. The tool description does not add any parameter-specific semantics beyond what the schema already provides, so the baseline of 3 is appropriate. The schema itself is well-defined, making the description's lack of parameter detail acceptable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool analyzes and optimizes prompts using Anthropic best practices, which is a specific verb-resource pairing. It also distinguishes the tool's output by mentioning the optimized prompt scaffold with score metrics, detected issues, and applied techniques, leaving no ambiguity about its function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys a clear context: use this tool when you want to optimize a prompt. It does not explicitly state when not to use it or mention alternatives, but since there are no sibling tools, the context is sufficient. The phrase 'using Anthropic best practices' implies a specific methodology, but it could benefit from more explicit usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool available, there is zero risk of confusion or overlapping purposes. The tool's function is unambiguous by nature of being the sole option.
The single tool name 'orator_optimize' follows a clear verb_noun pattern, and with only one tool there are no inconsistencies to evaluate. The name accurately reflects its function.
The server has exactly one tool, which feels thin for a general-purpose utility but is appropriate given the narrow scope of prompt optimization. It is borderline but not excessive.
The tool covers the core prompt optimization workflowโanalysis, scoring, and generation of an optimized version. A possible gap is the lack of a separate analysis-only mode, but the combined approach is sufficient for the domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Cloudflare Workers MCP server: ai-prompt-optimizer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides research-backed prompt optimization tools and professional domain templates designed to improve AI performance through strategies like Tree of Thoughts and Medprompt. It enables users to analyze, auto-optimize, and refine prompts using advanced reasoning patterns and safety-critical alignment techniques.24MIT
- AlicenseAqualityDmaintenanceAn MCP server that uses Claude 3.5 Sonnet to transform ordinary prompts into structured, professionally engineered instructions for any LLM. It enhances AI interactions by adding context, requirements, and structural clarity to raw user inputs.13MIT
- AlicenseAqualityDmaintenanceAn MCP server that automatically enhances user prompts by applying advanced engineering techniques like chain-of-thought and few-shot reasoning based on identified intent. It optimizes technique selection through local learning and integrates directly into Claude sessions to improve output quality without additional API costs.6MIT

preflightofficial
AlicenseNot gradedqualityDmaintenanceAn MCP server for Claude Code that catches vague prompts, applies triage and correction pattern learning, and provides semantic search, cross-service contracts, and scorecards to reduce wasted tokens.1912MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vvkmnn/claude-orator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server